• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/kernel/

Lines Matching defs:policy

136 static inline int rt_policy(int policy)
138 if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR))
145 return rt_policy(p->policy);
1718 * same underlying policy as the spinlock_t on this architecture, which
1880 if (p->policy == SCHED_IDLE) {
2542 * Revert to default priority/policy on fork if requested.
2545 if (p->policy == SCHED_FIFO || p->policy == SCHED_RR) {
2546 p->policy = SCHED_NORMAL;
4693 __setscheduler(struct rq *rq, struct task_struct *p, int policy, int prio)
4697 p->policy = policy;
4725 static int __sched_setscheduler(struct task_struct *p, int policy,
4737 /* double check policy once rq lock held */
4738 if (policy < 0) {
4740 policy = oldpolicy = p->policy;
4742 reset_on_fork = !!(policy & SCHED_RESET_ON_FORK);
4743 policy &= ~SCHED_RESET_ON_FORK;
4745 if (policy != SCHED_FIFO && policy != SCHED_RR &&
4746 policy != SCHED_NORMAL && policy != SCHED_BATCH &&
4747 policy != SCHED_IDLE)
4760 if (rt_policy(policy) != (param->sched_priority != 0))
4767 if (rt_policy(policy)) {
4771 /* can't set/change the rt policy */
4772 if (policy != p->policy && !rlim_rtprio)
4784 if (p->policy == SCHED_IDLE && policy != SCHED_IDLE)
4797 retval = security_task_setscheduler(p, policy, param);
4808 * To be able to change p->policy safely, the apropriate
4819 if (rt_bandwidth_enabled() && rt_policy(policy) &&
4828 /* recheck policy now with rq lock held */
4829 if (unlikely(oldpolicy != -1 && oldpolicy != p->policy)) {
4830 policy = oldpolicy = -1;
4846 __setscheduler(rq, p, policy, param->sched_priority);
4864 * sched_setscheduler - change the scheduling policy and/or RT priority of a thread.
4866 * @policy: new policy.
4871 int sched_setscheduler(struct task_struct *p, int policy,
4874 return __sched_setscheduler(p, policy, param, true);
4879 * sched_setscheduler_nocheck - change the scheduling policy and/or RT priority of a thread from kernelspace.
4881 * @policy: new policy.
4889 int sched_setscheduler_nocheck(struct task_struct *p, int policy,
4892 return __sched_setscheduler(p, policy, param, false);
4896 do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
4911 retval = sched_setscheduler(p, policy, &lparam);
4918 * sys_sched_setscheduler - set/change the scheduler policy and RT priority
4920 * @policy: new policy.
4923 SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy,
4926 /* negative values for policy are not valid */
4927 if (policy < 0)
4930 return do_sched_setscheduler(pid, policy, param);
4944 * sys_sched_getscheduler - get the policy (scheduling class) of a thread
4961 retval = p->policy
5306 * @policy: scheduling class.
5311 SYSCALL_DEFINE1(sched_get_priority_max, int, policy)
5315 switch (policy) {
5331 * @policy: scheduling class.
5336 SYSCALL_DEFINE1(sched_get_priority_min, int, policy)
5340 switch (policy) {