blob: ab45f2ff8ba2e290241db7d0924e1e839bce8301 [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;
Jens Gustedtc4bc0b12018-01-03 14:17:12 +01006 LOCK(t->killlock);
Rich Felker526e64f2018-05-04 14:26:31 -04007 r = !t->tid ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param);
Jens Gustedtc4bc0b12018-01-03 14:17:12 +01008 UNLOCK(t->killlock);
Rich Felker1e21e782012-11-11 15:38:04 -05009 return r;
10}