[PATCH v4 11/11] ntoskrnl.exe: Implement Ex(Acquire/Release)FastMutex.
Derek Lesho
dereklesho52 at gmail.com
Thu Apr 11 14:45:58 CDT 2019
Signed-off-by: Derek Lesho <dereklesho52 at Gmail.com>
---
dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 ++
dlls/ntoskrnl.exe/sync.c | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
index 8c347999ba..d6edf6143a 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec
@@ -1,4 +1,5 @@
@ stdcall -fastcall ExAcquireFastMutexUnsafe(ptr)
+@ stdcall -arch=x86_64 ExAcquireFastMutex(ptr)
@ stub ExAcquireRundownProtection
@ stub ExAcquireRundownProtectionEx
@ stub ExInitializeRundownProtection
@@ -9,6 +10,7 @@
@ stdcall -fastcall -arch=i386 ExInterlockedPushEntrySList (ptr ptr ptr) NTOSKRNL_ExInterlockedPushEntrySList
@ stub ExReInitializeRundownProtection
@ stdcall -fastcall ExReleaseFastMutexUnsafe(ptr)
+@ stdcall -arch=x86_64 ExReleaseFastMutex(ptr)
@ stdcall -fastcall ExReleaseResourceLite(ptr)
@ stub ExReleaseRundownProtection
@ stub ExReleaseRundownProtectionEx
diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c
index e97c6993f9..11fc945041 100644
--- a/dlls/ntoskrnl.exe/sync.c
+++ b/dlls/ntoskrnl.exe/sync.c
@@ -1167,3 +1167,24 @@ ULONG WINAPI ExIsResourceAcquiredSharedLite( ERESOURCE *resource )
return ret;
}
+
+
+/*********************************************************************
+ * ExAcquireFastMutex (NTOSKRNL.@)
+ */
+void WINAPI ExAcquireFastMutex(PFAST_MUTEX mutex)
+{
+ /* TODO: The safe variant raises thread to APC_LEVEL
+ and stores the previous IRQL in mutex->OldIrql */
+ ExAcquireFastMutexUnsafe( mutex );
+}
+
+
+ /*********************************************************************
+ * ExReleaseFastMutex (NTOSKRNL.@)
+ */
+void WINAPI ExReleaseFastMutex(PFAST_MUTEX mutex)
+{
+ ExReleaseFastMutexUnsafe( mutex );
+ /* TODO: the safe variant restores the IRQL to mutex->OldIrql */
+}
--
2.20.1
More information about the wine-devel
mailing list