1#include <sched.h> 2#include <errno.h> 3#include "syscall.h" 4#ifdef __LITEOS_A__ 5#include "pthread_impl.h" 6#endif 7 8int sched_setparam(pid_t pid, const struct sched_param *param) 9{ 10 int r; 11 if (!param) { 12 r = -EINVAL; 13 goto exit; 14 } 15#ifdef __LITEOS_A__ 16 r = __syscall(SYS_sched_setparam, pid, param, MUSL_TYPE_PROCESS); 17#else 18 r = __syscall(SYS_sched_setparam, pid, param); 19#endif 20exit: 21 return __syscall_ret(r); 22} 23