if (policy != p->policy) 
if (policy != p->policy && !p->signal->rlim[RLIMIT_RTPRIO].rlim_cur) 
int sched_setscheduler(struct task_struct *p, int policy, struct sched_param *param){	int retval;	int oldprio, oldpolicy = -1;	prio_array_t *array;	unsigned long flags;	runqueue_t *rq;recheck:	/* double check policy once rq lock held */	if (policy < 0)		policy = oldpolicy = p->policy;	else if (policy != SCHED_FIFO && policy != SCHED_RR &&				policy != SCHED_NORMAL)			return -EINVAL;	/*	 * Valid priorities for SCHED_FIFO and SCHED_RR are	 * 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL is 0.	 */	if (param->sched_priority < 0 ||	    param->sched_priority > MAX_USER_RT_PRIO-1)		return -EINVAL;	if ((policy == SCHED_NORMAL) != (param->sched_priority == 0))		return -EINVAL;	/*	 * Allow unprivileged RT tasks to decrease priority:	 */	if (!capable(CAP_SYS_NICE)) {		/* can't change policy */		if (policy != p->policy)			return -EPERM;		/* can't increase priority */		if (policy != SCHED_NORMAL &&		    param->sched_priority > p->rt_priority &&		    param->sched_priority >				p->signal->rlim[RLIMIT_RTPRIO].rlim_cur)			return -EPERM;		/* can't change other user's priorities */		if ((current->euid != p->euid) &&		    (current->euid != p->uid))			return -EPERM;	}	retval = security_task_setscheduler(p, policy, param);	if (retval)		return retval;	/*	 * To be able to change p->policy safely, the apropriate	 * runqueue lock must be held.	 */	rq = task_rq_lock(p, &flags);	/* recheck policy now with rq lock held */	if (unlikely(oldpolicy != -1 && oldpolicy != p->policy)) {		policy = oldpolicy = -1;		task_rq_unlock(rq, &flags);		goto recheck;	}	array = p->array;	if (array)		deactivate_task(p, rq);	oldprio = p->prio;	__setscheduler(p, policy, param->sched_priority);	if (array) {		__activate_task(p, rq);		/*		 * Reschedule if we are currently running on this runqueue and		 * our priority decreased, or if we are not currently running on		 * this runqueue and our priority is higher than the current's		 */		if (task_running(rq, p)) {			if (p->prio > oldprio)				resched_task(rq->curr);		} else if (TASK_PREEMPTS_CURR(p, rq))			resched_task(rq->curr);	}	task_rq_unlock(rq, &flags);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/18586e721636527cb5177467fb17e2350615978a/sched.c/clean/kernel/sched.c