111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
if (pthread_attr_setinheritsched(&pattr,
PTHREAD_EXPLICIT_SCHED) != 0)
return false;
#endif
if (attr->priority < 0) {
param.sched_priority = minPrio +
(1.0 + attr->priority) *
(normalPrio - minPrio);
} else
param.sched_priority = normalPrio +
attr->priority * (maxPrio - normalPrio);
if (pthread_attr_setschedparam(&pattr, ¶m) != 0)
return false;
|
|
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
if (pthread_attr_setinheritsched(&pattr,
PTHREAD_EXPLICIT_SCHED) != 0)
return false;
#endif
if (attr->priority < 0) {
param.sched_priority = minPrio +
(1.0f + attr->priority) *
(normalPrio - minPrio);
} else
param.sched_priority = normalPrio +
attr->priority * (maxPrio - normalPrio);
if (pthread_attr_setschedparam(&pattr, ¶m) != 0)
return false;
|