diff --git a/src/thread/pithread.cpp b/src/thread/pithread.cpp index 90ee03a8..428762f6 100755 --- a/src/thread/pithread.cpp +++ b/src/thread/pithread.cpp @@ -328,7 +328,7 @@ void PIThread::setPriority(PIThread::Priority prior) { __sched_priority # endif = priority2System(priority_); - pthread_setschedparam(thread, policy_, &sparam); + pthread_setschedparam(pthread_self(), policy_, &sparam); #else if (!running_ && (thread != 0)) return; SetThreadPriority(thread, priority2System(priority_));