mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Don't call kse_set_curthread() when scheduling a new bound
thread. It should only be called by the current kse and never by a KSE on behalf of another. Submitted by: davidxu
This commit is contained in:
parent
41f0e9d32c
commit
fc40494359
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118516
@ -1351,9 +1351,10 @@ _thr_schedule_add(struct pthread *curthread, struct pthread *newthread)
|
||||
KSEG_THRQ_ADD(newthread->kseg, newthread);
|
||||
/* this thread never gives up kse */
|
||||
newthread->active = 1;
|
||||
kse_set_curthread(newthread->kse, newthread);
|
||||
newthread->kse->k_curthread = newthread;
|
||||
newthread->kse->k_kcb->kcb_kmbx.km_flags = KMF_BOUND;
|
||||
newthread->kse->k_kcb->kcb_kmbx.km_func = (kse_func_t *)kse_sched_single;
|
||||
newthread->kse->k_kcb->kcb_kmbx.km_func =
|
||||
(kse_func_t *)kse_sched_single;
|
||||
newthread->kse->k_kcb->kcb_kmbx.km_quantum = 0;
|
||||
KSE_SET_MBOX(newthread->kse, newthread);
|
||||
/*
|
||||
|
@ -1351,9 +1351,10 @@ _thr_schedule_add(struct pthread *curthread, struct pthread *newthread)
|
||||
KSEG_THRQ_ADD(newthread->kseg, newthread);
|
||||
/* this thread never gives up kse */
|
||||
newthread->active = 1;
|
||||
kse_set_curthread(newthread->kse, newthread);
|
||||
newthread->kse->k_curthread = newthread;
|
||||
newthread->kse->k_kcb->kcb_kmbx.km_flags = KMF_BOUND;
|
||||
newthread->kse->k_kcb->kcb_kmbx.km_func = (kse_func_t *)kse_sched_single;
|
||||
newthread->kse->k_kcb->kcb_kmbx.km_func =
|
||||
(kse_func_t *)kse_sched_single;
|
||||
newthread->kse->k_kcb->kcb_kmbx.km_quantum = 0;
|
||||
KSE_SET_MBOX(newthread->kse, newthread);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user