Zebediah Figura : hal: Implement ExTryToAcquireFastMutex().

Alexandre Julliard julliard at winehq.org
Wed Jan 30 17:36:16 CST 2019


Module: wine
Branch: master
Commit: ec5edb4fc0b84cd58845e6ce689047ebbeeb885d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ec5edb4fc0b84cd58845e6ce689047ebbeeb885d

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Jan 29 22:01:47 2019 -0600

hal: Implement ExTryToAcquireFastMutex().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/hal/hal.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/hal/hal.c b/dlls/hal/hal.c
index 3e97796..6ef8765 100644
--- a/dlls/hal/hal.c
+++ b/dlls/hal/hal.c
@@ -81,10 +81,11 @@ void WINAPI DECLSPEC_HIDDEN __regs_ExReleaseFastMutex( FAST_MUTEX *mutex )
 }
 
 DEFINE_FASTCALL1_ENTRYPOINT( ExTryToAcquireFastMutex )
-BOOLEAN WINAPI DECLSPEC_HIDDEN __regs_ExTryToAcquireFastMutex(PFAST_MUTEX FastMutex)
+BOOLEAN WINAPI DECLSPEC_HIDDEN __regs_ExTryToAcquireFastMutex( FAST_MUTEX *mutex )
 {
-    FIXME("(%p) stub\n", FastMutex);
-    return TRUE;
+    TRACE("mutex %p.\n", mutex);
+
+    return (InterlockedCompareExchange( &mutex->Count, 0, 1 ) == 1);
 }
 
 DEFINE_FASTCALL1_ENTRYPOINT( KfAcquireSpinLock )




More information about the wine-cvs mailing list