ion(a)svn.reactos.org wrote:
- Change dispatcher lock release to be more like
documented in Windows Internals II and to allow an easier move to Queued Spinlock.
Modified: trunk/reactos/ntoskrnl/include/internal/ke.h
Modified: trunk/reactos/ntoskrnl/ke/wait.c
------------------------------------------------------------------------
*Modified: trunk/reactos/ntoskrnl/include/internal/ke.h*
--- trunk/reactos/ntoskrnl/include/internal/ke.h 2006-01-05 15:29:08 UTC (rev 20578)
+++ trunk/reactos/ntoskrnl/include/internal/ke.h 2006-01-05 15:32:08 UTC (rev 20579)
@@ -51,6 +51,7 @@
#ifndef CONFIG_SMP
#define KeInitializeDispatcher()
#define KeAcquireDispatcherDatabaseLock() KeRaiseIrqlToDpcLevel();
+#define KeReleaseDispatcherDatabaseLock(OldIrql) KiExitDispatcher(OldIrql);
#define KeAcquireDispatcherDatabaseLockAtDpcLevel()
#define KeReleaseDispatcherDatabaseLockFromDpcLevel()
#else
@@ -60,6 +61,9 @@
KeAcquireSpinLockAtDpcLevel (&DispatcherDatabaseLock);
#define KeReleaseDispatcherDatabaseLockFromDpcLevel() \
KeReleaseSpinLockFromDpcLevel(&DispatcherDatabaseLock);
+#define KeReleaseDispatcherDatabaseLock(OldIrql) \
+ KeReleaseSpinLockFromDpcLevel(&DispatcherDatabaseLock); \
+ KiExitDispatcher(OldIrql);
#endif
I don't like inverted logic. It is more readable like this:
#ifdef CONFIG_SMP
...
#else
...
#endif
- Hartmut