Piotr Caban : msvcr100: Add _NonReentrantPPLLock class implementation.

Alexandre Julliard julliard at winehq.org
Sun Mar 3 13:21:28 CST 2019


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Fri Feb  2 16:36:22 2018 +0100

msvcr100: Add _NonReentrantPPLLock class implementation.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 8d105ac7c27428fe9f599711c7061e369f515d5e)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/msvcrt/lock.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c
index 61cbc46..c3927a3 100644
--- a/dlls/msvcrt/lock.c
+++ b/dlls/msvcrt/lock.c
@@ -548,7 +548,9 @@ typedef struct
 DEFINE_THISCALL_WRAPPER(_NonReentrantPPLLock_ctor, 4)
 _NonReentrantPPLLock* __thiscall _NonReentrantPPLLock_ctor(_NonReentrantPPLLock *this)
 {
-    FIXME("(%p) stub\n", this);
+    TRACE("(%p)\n", this);
+
+    critical_section_ctor(&this->cs);
     return this;
 }
 
@@ -557,7 +559,8 @@ _NonReentrantPPLLock* __thiscall _NonReentrantPPLLock_ctor(_NonReentrantPPLLock
 DEFINE_THISCALL_WRAPPER(_NonReentrantPPLLock__Acquire, 8)
 void __thiscall _NonReentrantPPLLock__Acquire(_NonReentrantPPLLock *this, cs_queue *q)
 {
-    FIXME("(%p %p) stub\n", this, q);
+    TRACE("(%p %p)\n", this, q);
+    cs_lock(&this->cs, q);
 }
 
 /* ?_Release at _NonReentrantPPLLock@details at Concurrency@@QAEXXZ */
@@ -565,7 +568,8 @@ void __thiscall _NonReentrantPPLLock__Acquire(_NonReentrantPPLLock *this, cs_que
 DEFINE_THISCALL_WRAPPER(_NonReentrantPPLLock__Release, 4)
 void __thiscall _NonReentrantPPLLock__Release(_NonReentrantPPLLock *this)
 {
-    FIXME("(%p) stub\n", this);
+    TRACE("(%p)\n", this);
+    critical_section_unlock(&this->cs);
 }
 
 /* ?_GetConcurrency at details@Concurrency@@YAIXZ */




More information about the wine-cvs mailing list