aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2004-04-18 18:38:59 +0000
committerBill Paul <wpaul@FreeBSD.org>2004-04-18 18:38:59 +0000
commite1c0113ffd2c3330343b95ec7298b735ca204ed4 (patch)
tree2693a7c637a59bd50fff6a53b96734211ef4b843 /sys/compat
parentcd4db58afd24435b8210049a64b18b4c7b01415b (diff)
downloadsrc-e1c0113ffd2c3330343b95ec7298b735ca204ed4.tar.gz
src-e1c0113ffd2c3330343b95ec7298b735ca204ed4.zip
In ntoskrnl_unlock_dpc(), use atomic_store instead of atomic_cmpset
to give up the spinlock. Suggested by: bde
Notes
Notes: svn path=/head/; revision=128406
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/ndis/subr_ntoskrnl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c
index a825cab5a695..d833a73abb9f 100644
--- a/sys/compat/ndis/subr_ntoskrnl.c
+++ b/sys/compat/ndis/subr_ntoskrnl.c
@@ -1029,7 +1029,7 @@ ntoskrnl_lock_dpc(/*lock*/ void)
__asm__ __volatile__ ("" : "=c" (lock));
while (atomic_cmpset_acq_int((volatile u_int *)lock, 0, 1) == 0)
- /* do nothing */;
+ /* sit and spin */;
return;
}
@@ -1041,7 +1041,7 @@ ntoskrnl_unlock_dpc(/*lock*/ void)
__asm__ __volatile__ ("" : "=c" (lock));
- atomic_cmpset_rel_int((volatile u_int *)lock, 1, 0);
+ atomic_store_rel_int((volatile u_int *)lock, 0);
return;
}