mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
2 changed files with 6 additions and 4 deletions
|
|
@ -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 a new issue