Changeset 275
- Timestamp:
- 06/26/06 13:36:03 (17 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libfreebob-2.0/src/libutil/PosixThread.cpp
r266 r275 80 80 pthread_attr_init(&attributes); 81 81 82 if ((res = pthread_attr_setinheritsched(&attributes, PTHREAD_EXPLICIT_SCHED))) { 83 debugError("Cannot request explicit scheduling for RT thread %d %s", res, strerror(errno)); 84 return -1; 85 } 86 if ((res = pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_JOINABLE))) { 87 debugError("Cannot request joinable thread creation for RT thread %d %s", res, strerror(errno)); 88 return -1; 89 } 90 if ((res = pthread_attr_setscope(&attributes, PTHREAD_SCOPE_SYSTEM))) { 91 debugError("Cannot set scheduling scope for RT thread %d %s", res, strerror(errno)); 92 return -1; 93 } 94 82 95 if ((res = pthread_attr_setschedpolicy(&attributes, SCHED_FIFO))) { 83 96 84 97 //if ((res = pthread_attr_setschedpolicy(&attributes, SCHED_RR))) { 85 98 debugError("Cannot set FIFO scheduling class for RT thread %d %s", res, strerror(errno)); 86 return -1;87 }88 89 if ((res = pthread_attr_setscope(&attributes, PTHREAD_SCOPE_SYSTEM))) {90 debugError("Cannot set scheduling scope for RT thread %d %s", res, strerror(errno));91 99 return -1; 92 100 } … … 157 165 //if ((res = pthread_setschedparam(fThread, SCHED_FIFO, &rtparam)) != 0) { 158 166 159 if ((res = pthread_setschedparam(fThread, SCHED_ RR, &rtparam)) != 0) {167 if ((res = pthread_setschedparam(fThread, SCHED_FIFO, &rtparam)) != 0) { 160 168 debugError("Cannot use real-time scheduling (FIFO/%d) " 161 169 "(%d: %s)", rtparam.sched_priority, res,