blob: 8e8b5a1988d2d217616ced905f82bc08aa52a792 [file] [log] [blame]
Rich Felker1e21e782012-11-11 15:38:04 -05001#include "pthread_impl.h"
2
3int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param)
4{
5 int r;
6 __lock(t->killlock);
7 r = t->dead ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, &param);
8 __unlock(t->killlock);
9 return r;
10}