split internal lock API out of libc.h, creating lock.h
[musl.git] / src / thread / pthread_setschedprio.c
blob5bf4a0197e3abb9faac8b250733669126c814eab
1 #include "pthread_impl.h"
2 #include "lock.h"
4 int pthread_setschedprio(pthread_t t, int prio)
6 int r;
7 LOCK(t->killlock);
8 r = !t->tid ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, &prio);
9 UNLOCK(t->killlock);
10 return r;