summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-04-19 13:15:52 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-04-19 13:15:52 +0000
commit8c800ec582517905069e92bf0cfd91861baaca19 (patch)
tree9e2bb167a51b4ab89bdef35395551a97b1d6d2f3 /sys
parent6762159f447a21c4628baf709fe2e7b25826de39 (diff)
downloadFreeBSD-src-8c800ec582517905069e92bf0cfd91861baaca19.zip
FreeBSD-src-8c800ec582517905069e92bf0cfd91861baaca19.tar.gz
Use critical section functions rather than scheduler lock to protect
critical region.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/sys_machdep.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index 2159043..137674f 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -171,11 +171,11 @@ sysarch(td, uap)
sd.sd_xx = 0;
sd.sd_def32 = 1;
sd.sd_gran = 1;
- mtx_lock_spin(&sched_lock);
+ critical_enter();
td->td_pcb->pcb_fsd = sd;
PCPU_GET(fsgs_gdt)[0] = sd;
td->td_frame->tf_fs = GSEL(GUFS_SEL, SEL_UPL);
- mtx_unlock_spin(&sched_lock);
+ critical_exit();
}
break;
case I386_GET_GSBASE:
@@ -201,11 +201,11 @@ sysarch(td, uap)
sd.sd_xx = 0;
sd.sd_def32 = 1;
sd.sd_gran = 1;
- mtx_lock_spin(&sched_lock);
+ critical_enter();
td->td_pcb->pcb_gsd = sd;
PCPU_GET(fsgs_gdt)[1] = sd;
+ critical_exit();
load_gs(GSEL(GUGS_SEL, SEL_UPL));
- mtx_unlock_spin(&sched_lock);
}
break;
default:
OpenPOWER on IntegriCloud