Lock the process while sending it SIGARLM and updating p_realtimer.
This commit is contained in:
parent
3ef36efa7c
commit
0bc406044c
@ -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*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user