summaryrefslogtreecommitdiffstats
path: root/sys/compat/ndis/ntoskrnl_var.h
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>2005-10-21 05:23:20 +0000
committerwpaul <wpaul@FreeBSD.org>2005-10-21 05:23:20 +0000
commit8be176b07bf4928315544e3973a80e096cbffa37 (patch)
tree486d68b61279a7d7c91fa584de50f319c1038f5e /sys/compat/ndis/ntoskrnl_var.h
parent46be1c690597848938f248149c994c7c1ecaab17 (diff)
downloadFreeBSD-src-8be176b07bf4928315544e3973a80e096cbffa37.zip
FreeBSD-src-8be176b07bf4928315544e3973a80e096cbffa37.tar.gz
Correct the macro definition for KeRaiseIrql(). The official API
is KeRaiseIrql(newirql, &oldirql), not oldirql = KeRaiseIrql(newirql). (The macro ultimately translates to KfRaiseIrql() which does use the latter API, so this has no effect on generated code.) Also, wait for thread termination the right way: kthread_exit() will ultimately do a wakeup(td->td_proc). This is the event we should wait on. Eliminate the previous synchronization machinery for this since it was never guaranteed to work correctly.
Diffstat (limited to 'sys/compat/ndis/ntoskrnl_var.h')
-rw-r--r--sys/compat/ndis/ntoskrnl_var.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/compat/ndis/ntoskrnl_var.h b/sys/compat/ndis/ntoskrnl_var.h
index 5ec1f54..836f56e 100644
--- a/sys/compat/ndis/ntoskrnl_var.h
+++ b/sys/compat/ndis/ntoskrnl_var.h
@@ -1397,7 +1397,7 @@ extern void IoQueueWorkItem(io_workitem *, io_workitem_func,
#ifdef __i386__
#define KeAcquireSpinLock(a, b) *(b) = KfAcquireSpinLock(a)
#define KeReleaseSpinLock(a, b) KfReleaseSpinLock(a, b)
-#define KeRaiseIrql(a) KfRaiseIrql(a)
+#define KeRaiseIrql(a, b) *(b) = KfRaiseIrql(a)
#define KeLowerIrql(a) KfLowerIrql(a)
#define KeAcquireSpinLockAtDpcLevel(a) KefAcquireSpinLockAtDpcLevel(a)
#define KeReleaseSpinLockFromDpcLevel(a) KefReleaseSpinLockFromDpcLevel(a)
@@ -1411,7 +1411,7 @@ extern void IoQueueWorkItem(io_workitem *, io_workitem_func,
* These may need to be redefined later;
* not sure where they live on amd64 yet.
*/
-#define KeRaiseIrql(a) KfRaiseIrql(a)
+#define KeRaiseIrql(a, b) *(b) = KfRaiseIrql(a)
#define KeLowerIrql(a) KfLowerIrql(a)
#endif /* __amd64__ */
OpenPOWER on IntegriCloud