1 <assertions> 2 <assertion id="1" tag="ref:XSH6:31437:31438"> 3 The function 4 int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy); 5 6 sets the schedpolicy attribute in the 'attr' argument. 7 </assertion> 8 9 <assertion id="2" tag="ref:XSH6:31439:31442"> 10 The supported values of 'policy' include SCHED_FIFO, SCHED_RR, 11 and SCHED_OTHER. When threads executing with the scheduling policy 12 are waiting on a mutex, they shall acquire the mutex in priority order 13 when the mutex is unlocked. 14 </assertion> 15 16 <assertion id="3" tag="ref:XSH6:31443:31444"> 17 If success, it returns zero. 18 </assertion> 19 20 <assertion id="4" tag="ref:XSH6:31445:31448"> 21 if fail, an error number shall be returned to indicate the error. 22 The pthread_attr_setschedpolicy() function may fail if: 23 [EINVAL] The value of policy is invalid. 24 </assertion> 25 26 <assertion id="5" tag="ref:XSH6:31449:31449"> 27 [ENOTSUP] An attempt to set the attribute to an unsupported value. 28 </assertion> 29 30 <assertion id="6" tag="ref:XSH6:31450:31450"> 31 Shall not return an error code of [EINTR] 32 </assertion> 33 </assertions> 34