blob: 9e2fa45674ff6f80abd4979dae17f23d51b08dcd [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 Felker21088ae2013-06-26 21:34:44 -04007 r = t->dead ? 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}