*/
if (unlikely(preempt_get_count() & PREEMPT_ACTIVE))
goto pick_next_task;
-
+
switch (prev->state) {
case TASK_INTERRUPTIBLE:
if (unlikely(signal_pending(prev))) {
policy != SCHED_OTHER)
goto out_unlock;
}
-
+
/*
* Valid priorities for SCHED_FIFO and SCHED_RR are
* 1..MAX_USER_RT_PRIO, valid priority for SCHED_OTHER is 0.
return 0;
}
+
asmlinkage long sys_sched_get_priority_max(int policy)
{
int ret = -EINVAL;
goto out;
}
- /*
- * If the task is not on a runqueue, then it is sufficient
- * to simply update the task's cpu field.
- */
- if (!p->array) {
- p->thread_info->cpu = __ffs(p->cpus_allowed);
- task_rq_unlock(rq, &flags);
- goto out;
- }
-
init_MUTEX_LOCKED(&req.sem);
req.task = p;
list_add(&req.list, &rq->migration_queue);