unsigned long val, interval; 
unsigned long val, interval, expires; 
int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue){	struct task_struct *tsk = current; 	unsigned long val, interval;	cputime_t cval, cinterval, nval, ninterval;	switch (which) {	case ITIMER_REAL:again:		spin_lock_irq(&tsk->sighand->siglock);		interval = tsk->signal->it_real_incr;		val = it_real_value(tsk->signal);		/* We are sharing ->siglock with it_real_fn() */		if (try_to_del_timer_sync(&tsk->signal->real_timer) < 0) {			spin_unlock_irq(&tsk->sighand->siglock);			goto again;		}		tsk->signal->it_real_incr =			timeval_to_jiffies(&value->it_interval);		it_real_arm(tsk, timeval_to_jiffies(&value->it_value));		spin_unlock_irq(&tsk->sighand->siglock);		if (ovalue) {			jiffies_to_timeval(val, &ovalue->it_value);			jiffies_to_timeval(interval,					   &ovalue->it_interval);		}		break;	case ITIMER_VIRTUAL:		nval = timeval_to_cputime(&value->it_value);		ninterval = timeval_to_cputime(&value->it_interval);		read_lock(&tasklist_lock);		spin_lock_irq(&tsk->sighand->siglock);		cval = tsk->signal->it_virt_expires;		cinterval = tsk->signal->it_virt_incr;		if (!cputime_eq(cval, cputime_zero) ||		    !cputime_eq(nval, cputime_zero)) {			if (cputime_gt(nval, cputime_zero))				nval = cputime_add(nval,						   jiffies_to_cputime(1));			set_process_cpu_timer(tsk, CPUCLOCK_VIRT,					      &nval, &cval);		}		tsk->signal->it_virt_expires = nval;		tsk->signal->it_virt_incr = ninterval;		spin_unlock_irq(&tsk->sighand->siglock);		read_unlock(&tasklist_lock);		if (ovalue) {			cputime_to_timeval(cval, &ovalue->it_value);			cputime_to_timeval(cinterval, &ovalue->it_interval);		}		break;	case ITIMER_PROF:		nval = timeval_to_cputime(&value->it_value);		ninterval = timeval_to_cputime(&value->it_interval);		read_lock(&tasklist_lock);		spin_lock_irq(&tsk->sighand->siglock);		cval = tsk->signal->it_prof_expires;		cinterval = tsk->signal->it_prof_incr;		if (!cputime_eq(cval, cputime_zero) ||		    !cputime_eq(nval, cputime_zero)) {			if (cputime_gt(nval, cputime_zero))				nval = cputime_add(nval,						   jiffies_to_cputime(1));			set_process_cpu_timer(tsk, CPUCLOCK_PROF,					      &nval, &cval);		}		tsk->signal->it_prof_expires = nval;		tsk->signal->it_prof_incr = ninterval;		spin_unlock_irq(&tsk->sighand->siglock);		read_unlock(&tasklist_lock);		if (ovalue) {			cputime_to_timeval(cval, &ovalue->it_value);			cputime_to_timeval(cinterval, &ovalue->it_interval);		}		break;	default:		return -EINVAL;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d912d1ff218195c248c770eb677726695e07aa40/itimer.c/buggy/kernel/itimer.c