Piotr Caban : msvcp90: Added basic_streambuf<char>::{Lock, Unlock} implementation.

Alexandre Julliard julliard at winehq.org
Wed Aug 24 14:05:26 CDT 2011


Module: wine
Branch: master
Commit: 4fd4a8aeb35d5ce73aa21f4699557ab899049fb4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4fd4a8aeb35d5ce73aa21f4699557ab899049fb4

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Aug 24 14:39:12 2011 +0200

msvcp90: Added basic_streambuf<char>::{Lock, Unlock} implementation.

---

 dlls/msvcp90/ios.c     |    9 +++++++--
 dlls/msvcp90/msvcp90.h |    5 +++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index eef506a..84dfb17 100644
--- a/dlls/msvcp90/ios.c
+++ b/dlls/msvcp90/ios.c
@@ -923,6 +923,7 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_s
 {
     TRACE("(%p %d)\n", this, uninitialized);
     this->vtable = &MSVCP_basic_streambuf_char_vtable;
+    mutex_ctor(&this->lock);
     return this;
 }
 
@@ -934,6 +935,7 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char
     TRACE("(%p)\n", this);
 
     this->vtable = &MSVCP_basic_streambuf_char_vtable;
+    mutex_ctor(&this->lock);
     this->loc = MSVCRT_operator_new(sizeof(locale));
     locale_ctor(this->loc);
     basic_streambuf_char__Init_empty(this);
@@ -948,6 +950,7 @@ void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
 {
     TRACE("(%p)\n", this);
 
+    mutex_dtor(&this->lock);
     locale_dtor(this->loc);
     MSVCRT_operator_delete(this->loc);
 }
@@ -1051,7 +1054,8 @@ void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
 void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this)
 {
-    FIXME("(%p) stub\n", this);
+    TRACE("(%p)\n", this);
+    mutex_lock(&this->lock);
 }
 
 /* ?_Pnavail@?$basic_streambuf at DU?$char_traits at D@std@@@std@@IBEHXZ */
@@ -1087,7 +1091,8 @@ streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this,
 DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
 void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this)
 {
-    FIXME("(%p) stub\n", this);
+    TRACE("(%p)\n", this);
+    mutex_unlock(&this->lock);
 }
 
 /* ?_Xsgetn_s@?$basic_streambuf at DU?$char_traits at D@std@@@std@@MAEHPADIH at Z */
diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h
index d80c361..7c331b5 100644
--- a/dlls/msvcp90/msvcp90.h
+++ b/dlls/msvcp90/msvcp90.h
@@ -218,3 +218,8 @@ void __thiscall _Lockit_dtor(_Lockit*);
 typedef struct {
         void *mutex;
 } mutex;
+
+mutex* __thiscall mutex_ctor(mutex*);
+void __thiscall mutex_dtor(mutex*);
+void __thiscall mutex_lock(mutex*);
+void __thiscall mutex_unlock(mutex*);




More information about the wine-cvs mailing list