1 #include "pthread_impl.h" 2 #include "lock.h" 3 pthread_setschedparam(pthread_t t,int policy,const struct sched_param * param)4int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param) 5 { 6 int r; 7 LOCK(t->killlock); 8 r = !t->tid ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param); 9 UNLOCK(t->killlock); 10 return r; 11 } 12