diff options
Diffstat (limited to 'lib/libc/musl/src/thread/pthread_setschedparam.c')
| -rw-r--r-- | lib/libc/musl/src/thread/pthread_setschedparam.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/libc/musl/src/thread/pthread_setschedparam.c b/lib/libc/musl/src/thread/pthread_setschedparam.c new file mode 100644 index 0000000000..038d13d8ac --- /dev/null +++ b/lib/libc/musl/src/thread/pthread_setschedparam.c @@ -0,0 +1,11 @@ +#include "pthread_impl.h" +#include "lock.h" + +int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *param) +{ + int r; + LOCK(t->killlock); + r = !t->tid ? ESRCH : -__syscall(SYS_sched_setscheduler, t->tid, policy, param); + UNLOCK(t->killlock); + return r; +} |
