diff --git a/src/OpenThreads/pthreads/PThread.cpp b/src/OpenThreads/pthreads/PThread.cpp index 5cead3ce0..e8d48b5ce 100644 --- a/src/OpenThreads/pthreads/PThread.cpp +++ b/src/OpenThreads/pthreads/PThread.cpp @@ -64,6 +64,7 @@ using namespace OpenThreads; # define DPRINTF(arg) #endif + //----------------------------------------------------------------------------- // Initialize the static unique ids. // @@ -191,7 +192,7 @@ private: int status = pthread_setspecific(PThreadPrivateData::s_tls_key, thread); if (status) { - printf("Error: pthread_setspecific(,) returned error status, status = %d\n",status); + printf("Error: pthread_setspecific(,) returned error status, status = %d\n",status); } pthread_cleanup_push(thread_cleanup_handler, &tcs); @@ -239,12 +240,12 @@ private: if(status != 0) { printf("THREAD INFO (%d) : Get sched: %s\n", - thread->getProcessId(), + (int)thread->getProcessId(), strerror(status)); } else { printf( "THREAD INFO (%d) : Thread running at %s / Priority: %d\n", - thread->getProcessId(), + (int)thread->getProcessId(), (my_policy == SCHED_FIFO ? "SCHEDULE_FIFO" : (my_policy == SCHED_RR ? "SCHEDULE_ROUND_ROBIN" : (my_policy == SCHED_OTHER ? "SCHEDULE_OTHER" @@ -256,9 +257,8 @@ private: printf( "THREAD INFO (%d) : Max priority: %d, Min priority: %d\n", - thread->getProcessId(), + (int)thread->getProcessId(), max_priority, min_priority); - } } @@ -266,7 +266,7 @@ private: { printf( "THREAD INFO (%d) POSIX Priority scheduling not available\n", - thread->getProcessId()); + (int)thread->getProcessId()); } fflush(stdout); @@ -829,7 +829,7 @@ int Thread::setSchedulePriority(ThreadPriority priority) { pd->threadPriority = priority; - if(pd->isRunning) + if(pd->isRunning()) return ThreadPrivateActions::SetThreadSchedulingParams(this); else return 0; @@ -869,7 +869,7 @@ int Thread::setSchedulePolicy(ThreadPolicy policy) pd->threadPolicy = policy; - if(pd->isRunning) + if(pd->isRunning()) return ThreadPrivateActions::SetThreadSchedulingParams(this); else return 0;