• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include <sched.h>
2 #include <errno.h>
3 #include "syscall.h"
4 #include "pthread_impl.h"
5 
sched_setscheduler(pid_t pid,int sched,const struct sched_param * param)6 int sched_setscheduler(pid_t pid, int sched, const struct sched_param *param)
7 {
8 	int r;
9 	if (!param) {
10 		r = -EINVAL;
11 		goto exit;
12 	}
13 
14 	r = __syscall(SYS_sched_setscheduler, pid, sched, param->sched_priority, MUSL_TYPE_PROCESS);
15 
16 exit:
17 	return __syscall_ret(r);
18 }
19