1 #include "pthread_impl.h" 2 #include "lock.h" 3 pthread_setschedprio(pthread_t t,int prio)4int pthread_setschedprio(pthread_t t, int prio) 5 { 6 int r; 7 struct sched_param param = { 8 .sched_priority = prio, 9 }; 10 11 sigset_t set; 12 __block_app_sigs(&set); 13 LOCK(t->killlock); 14 r = !t->tid ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, ¶m, MUSL_TYPE_THREAD); 15 UNLOCK(t->killlock); 16 __restore_sigs(&set); 17 return r; 18 } 19