Rich Felker | 1e21e78 | 2012-11-11 15:38:04 -0500 | [diff] [blame] | 1 | #include "pthread_impl.h" |
| 2 | |
| 3 | int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param) |
| 4 | { |
| 5 | int r; |
Jens Gustedt | c4bc0b1 | 2018-01-03 14:17:12 +0100 | [diff] [blame] | 6 | LOCK(t->killlock); |
Rich Felker | 21088ae | 2013-06-26 21:34:44 -0400 | [diff] [blame] | 7 | r = t->dead ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param); |
Jens Gustedt | c4bc0b1 | 2018-01-03 14:17:12 +0100 | [diff] [blame] | 8 | UNLOCK(t->killlock); |
Rich Felker | 1e21e78 | 2012-11-11 15:38:04 -0500 | [diff] [blame] | 9 | return r; |
| 10 | } |