From bcfa98d0197abe20a89b307cefcf22f4e04ac8ff Mon Sep 17 00:00:00 2001 From: jeff Date: Sun, 20 May 2007 22:03:57 +0000 Subject: - Move GDT/LDT locking into a seperate spinlock, removing the global scheduler lock from this responsibility. Contributed by: Attilio Rao Tested by: jeff, kkenn --- sys/compat/ndis/kern_windrv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys/compat') 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(>able, <able); @@ -904,7 +904,7 @@ x86_oldldt(dummy) x86_setldt(>able, 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(>able, <able); @@ -952,7 +952,7 @@ x86_newldt(dummy) x86_setldt(>able, ltable); - mtx_unlock_spin(&sched_lock); + mtx_unlock_spin(&dt_lock); /* Whew. */ -- cgit v1.1