1 #include <sched.h> 2 #include <errno.h> 3 #include <string.h> 4 #include "syscall.h" 5 #include "pthread_impl.h" 6 sched_getparam(pid_t pid,struct sched_param * param)7int sched_getparam(pid_t pid, struct sched_param *param) 8 { 9 int r; 10 if (!param) { 11 r = -EINVAL; 12 goto exit; 13 } 14 15 memset(param, 0, sizeof(struct sched_param)); 16 r = __syscall(SYS_sched_getparam, pid, param, MUSL_TYPE_PROCESS); 17 exit: 18 return __syscall_ret(r); 19 } 20