Set the scheduling policy for the process identified by pid. If pid is 0, the calling process is changed. param is an instance of sched_param.
os/sched_setscheduler
sched_setscheduler