mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Unblock the outgoing thread after we performed pmap_switch() to
switch the region registers. pmap_switch() returns the pmap for which the region register are currently programmed, which needs to be re-programmed on the CPU the ougoing thread gets switched in. This change does not noticibly change anything or fix known bugs, but does give me a warm fuzzy feeling by being more correct.
This commit is contained in:
parent
e1b4a23921
commit
ded49c2eae
1 changed files with 2 additions and 2 deletions
|
|
@ -470,12 +470,12 @@ cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx)
|
|||
if (PCPU_GET(fpcurthread) == old)
|
||||
old->td_frame->tf_special.psr |= IA64_PSR_DFH;
|
||||
if (!savectx(oldpcb)) {
|
||||
atomic_store_rel_ptr(&old->td_lock, mtx);
|
||||
|
||||
newpcb = new->td_pcb;
|
||||
oldpcb->pcb_current_pmap =
|
||||
pmap_switch(newpcb->pcb_current_pmap);
|
||||
|
||||
atomic_store_rel_ptr(&old->td_lock, mtx);
|
||||
|
||||
#if defined(SCHED_ULE) && defined(SMP)
|
||||
while (atomic_load_acq_ptr(&new->td_lock) == &blocked_lock)
|
||||
cpu_spinwait();
|
||||
|
|
|
|||
Loading…
Reference in a new issue