Change the scheduling policy and/or rt priority of a thread.
int sched_setscheduler(struct task_struct * p, int policy, const struct sched_param * param);
p
the task in question.
policy
new policy.
param
structure containing the new RT priority.
0 on success. An error code otherwise.
NOTE that the task may be already dead.