• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "pthread_impl.h"
2 #include "lock.h"
3 
pthread_setschedprio(pthread_t t,int prio)4 int pthread_setschedprio(pthread_t t, int prio)
5 {
6 	int r;
7 
8 	if (prio < 0 || prio > PTHREAD_PRIORITY_LOWEST) {
9 		return EINVAL;
10 	}
11 
12 	LOCK(t->killlock);
13 	r = !t->tid ? ESRCH : -__syscall(SYS_sched_setparam, t->tid, prio, MUSL_TYPE_THREAD);
14 	UNLOCK(t->killlock);
15 	return r;
16 }
17