iBack out david's last commit. the suspension code needs to be called
for non KSE processes too.
This commit is contained in:
parent
1ba72e3513
commit
053effc60e
|
@ -1240,18 +1240,6 @@ thread_userret(struct thread *td, struct trapframe *frame)
|
||||||
kg = td->td_ksegrp;
|
kg = td->td_ksegrp;
|
||||||
p = td->td_proc;
|
p = td->td_proc;
|
||||||
|
|
||||||
/*
|
|
||||||
* We need to check to see if we have to exit or wait due to a
|
|
||||||
* single threading requirement or some other STOP condition.
|
|
||||||
* Don't bother doing all the work if the stop bits are not set
|
|
||||||
* at this time.. If we miss it, we miss it.. no big deal.
|
|
||||||
*/
|
|
||||||
if (P_SHOULDSTOP(p)) {
|
|
||||||
PROC_LOCK(p);
|
|
||||||
thread_suspend_check(0); /* Can suspend or kill */
|
|
||||||
PROC_UNLOCK(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Originally bound threads never upcall but they may
|
* Originally bound threads never upcall but they may
|
||||||
* loan out their KSE at this point.
|
* loan out their KSE at this point.
|
||||||
|
|
|
@ -1240,18 +1240,6 @@ thread_userret(struct thread *td, struct trapframe *frame)
|
||||||
kg = td->td_ksegrp;
|
kg = td->td_ksegrp;
|
||||||
p = td->td_proc;
|
p = td->td_proc;
|
||||||
|
|
||||||
/*
|
|
||||||
* We need to check to see if we have to exit or wait due to a
|
|
||||||
* single threading requirement or some other STOP condition.
|
|
||||||
* Don't bother doing all the work if the stop bits are not set
|
|
||||||
* at this time.. If we miss it, we miss it.. no big deal.
|
|
||||||
*/
|
|
||||||
if (P_SHOULDSTOP(p)) {
|
|
||||||
PROC_LOCK(p);
|
|
||||||
thread_suspend_check(0); /* Can suspend or kill */
|
|
||||||
PROC_UNLOCK(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Originally bound threads never upcall but they may
|
* Originally bound threads never upcall but they may
|
||||||
* loan out their KSE at this point.
|
* loan out their KSE at this point.
|
||||||
|
|
|
@ -100,8 +100,19 @@ userret(td, frame, oticks)
|
||||||
sched_userret(td);
|
sched_userret(td);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do special thread processing, e.g. suspension checking, upcall
|
* We need to check to see if we have to exit or wait due to a
|
||||||
* tweaking and such.
|
* single threading requirement or some other STOP condition.
|
||||||
|
* Don't bother doing all the work if the stop bits are not set
|
||||||
|
* at this time.. If we miss it, we miss it.. no big deal.
|
||||||
|
*/
|
||||||
|
if (P_SHOULDSTOP(p)) {
|
||||||
|
PROC_LOCK(p);
|
||||||
|
thread_suspend_check(0); /* Can suspend or kill */
|
||||||
|
PROC_UNLOCK(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Do special thread processing, e.g. upcall tweaking and such.
|
||||||
*/
|
*/
|
||||||
if (p->p_flag & P_KSES) {
|
if (p->p_flag & P_KSES) {
|
||||||
thread_userret(td, frame);
|
thread_userret(td, frame);
|
||||||
|
|
Loading…
Reference in New Issue