Lock the process while sending it SIGARLM and updating p_realtimer.

This commit is contained in:
jhb 2001-03-07 03:02:56 +00:00
parent 3ef36efa7c
commit 0bc406044c

View File

@ -547,9 +547,11 @@ realitexpire(arg)
int s;
p = (struct proc *)arg;
PROC_LOCK(p);
psignal(p, SIGALRM);
if (!timevalisset(&p->p_realtimer.it_interval)) {
timevalclear(&p->p_realtimer.it_value);
PROC_UNLOCK(p);
return;
}
for (;;) {
@ -563,10 +565,12 @@ realitexpire(arg)
callout_reset(&p->p_itcallout, tvtohz(&ntv) - 1,
realitexpire, p);
splx(s);
PROC_UNLOCK(p);
return;
}
splx(s);
}
/*NOTREACHED*/
}
/*