summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2007-05-20 22:03:57 +0000
committerjeff <jeff@FreeBSD.org>2007-05-20 22:03:57 +0000
commitbcfa98d0197abe20a89b307cefcf22f4e04ac8ff (patch)
tree75dae3b34630a5e5362696144a588236fbbf7493 /sys/compat
parentf3855854eee8165cfd604ba873b581a55f017519 (diff)
downloadFreeBSD-src-bcfa98d0197abe20a89b307cefcf22f4e04ac8ff.zip
FreeBSD-src-bcfa98d0197abe20a89b307cefcf22f4e04ac8ff.tar.gz
- Move GDT/LDT locking into a seperate spinlock, removing the global
scheduler lock from this responsibility. Contributed by: Attilio Rao <attilio@FreeBSD.org> Tested by: jeff, kkenn
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/ndis/kern_windrv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/ndis/kern_windrv.c b/sys/compat/ndis/kern_windrv.c
index 79ec7395..00d8e8d 100644
--- a/sys/compat/ndis/kern_windrv.c
+++ b/sys/compat/ndis/kern_windrv.c
@@ -883,10 +883,10 @@ x86_oldldt(dummy)
struct gdt gtable;
uint16_t ltable;
- mtx_lock_spin(&sched_lock);
-
t = curthread;
+ mtx_lock_spin(&dt_lock);
+
/* Grab location of existing GDT. */
x86_getldt(&gtable, &ltable);
@@ -904,7 +904,7 @@ x86_oldldt(dummy)
x86_setldt(&gtable, ltable);
- mtx_unlock_spin(&sched_lock);
+ mtx_unlock_spin(&dt_lock);
return;
}
@@ -918,10 +918,10 @@ x86_newldt(dummy)
struct x86desc *l;
struct thread *t;
- mtx_lock_spin(&sched_lock);
-
t = curthread;
+ mtx_lock_spin(&dt_lock);
+
/* Grab location of existing GDT. */
x86_getldt(&gtable, &ltable);
@@ -952,7 +952,7 @@ x86_newldt(dummy)
x86_setldt(&gtable, ltable);
- mtx_unlock_spin(&sched_lock);
+ mtx_unlock_spin(&dt_lock);
/* Whew. */
OpenPOWER on IntegriCloud