diff --git a/src/thread/pithread.cpp b/src/thread/pithread.cpp index 4dbf9251..90ee03a8 100755 --- a/src/thread/pithread.cpp +++ b/src/thread/pithread.cpp @@ -320,8 +320,7 @@ void PIThread::setPriority(PIThread::Priority prior) { if (!running_ && (thread != 0)) return; policy_ = 0; memset(&sparam, 0, sizeof(sparam)); - struct sched_param param; - pthread_getschedparam(thread, &policy_, ¶m); + pthread_getschedparam(pthread_self(), &policy_, &sparam); sparam. # ifndef LINUX sched_priority