Piotr Caban : msvcp60: Remove mutex class.

Alexandre Julliard julliard at winehq.org
Wed Nov 14 13:17:16 CST 2012


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Nov 14 15:38:39 2012 +0100

msvcp60: Remove mutex class.

---

 dlls/msvcp60/ios.c   |    5 -----
 dlls/msvcp60/misc.c  |   37 -------------------------------------
 dlls/msvcp60/msvcp.h |   11 -----------
 3 files changed, 0 insertions(+), 53 deletions(-)

diff --git a/dlls/msvcp60/ios.c b/dlls/msvcp60/ios.c
index 5c2a1f4..eb5cbe0 100644
--- a/dlls/msvcp60/ios.c
+++ b/dlls/msvcp60/ios.c
@@ -1592,7 +1592,6 @@ static basic_streambuf_wchar* basic_streambuf_wchar_ctor_uninitialized(basic_str
 {
     TRACE("(%p %d)\n", this, uninitialized);
     this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
-    mutex_ctor(&this->lock);
     return this;
 }
 
@@ -1614,7 +1613,6 @@ static basic_streambuf_wchar* basic_streambuf_wchar_ctor(basic_streambuf_wchar *
     TRACE("(%p)\n", this);
 
     this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
-    mutex_ctor(&this->lock);
     locale_ctor(&this->loc);
     basic_streambuf_wchar__Init_empty(this);
 
@@ -1641,7 +1639,6 @@ void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
 {
     TRACE("(%p)\n", this);
 
-    mutex_dtor(&this->lock);
     locale_dtor(&this->loc);
 }
 
@@ -1736,7 +1733,6 @@ void __thiscall basic_streambuf_wchar__Init(basic_streambuf_wchar *this, wchar_t
 static void basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
 {
     TRACE("(%p)\n", this);
-    mutex_lock(&this->lock);
 }
 
 /* ?_Pnavail@?$basic_streambuf at _WU?$char_traits at _W@std@@@std@@IBEHXZ */
@@ -1847,7 +1843,6 @@ static streamsize basic_streambuf_wchar__Sgetn_s(basic_streambuf_wchar *this, wc
 static void basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
 {
     TRACE("(%p)\n", this);
-    mutex_unlock(&this->lock);
 }
 
 /* ?eback@?$basic_streambuf at _WU?$char_traits at _W@std@@@std@@IBEPA_WXZ */
diff --git a/dlls/msvcp60/misc.c b/dlls/msvcp60/misc.c
index 9c840b7..98eb9cf 100644
--- a/dlls/msvcp60/misc.c
+++ b/dlls/msvcp60/misc.c
@@ -27,43 +27,6 @@
 #include "winbase.h"
 
 
-/* ??0_Mutex at std@@QAE at XZ */
-/* ??0_Mutex at std@@QEAA at XZ */
-mutex* mutex_ctor(mutex *this)
-{
-    CRITICAL_SECTION *cs = MSVCRT_operator_new(sizeof(*cs));
-    if(!cs)
-        throw_exception(EXCEPTION_BAD_ALLOC, NULL);
-
-    InitializeCriticalSection(cs);
-    cs->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": _Mutex critical section");
-    this->mutex = cs;
-    return this;
-}
-
-/* ??1_Mutex at std@@QAE at XZ */
-/* ??1_Mutex at std@@QEAA at XZ */
-void mutex_dtor(mutex *this)
-{
-    ((CRITICAL_SECTION*)this->mutex)->DebugInfo->Spare[0] = 0;
-    DeleteCriticalSection(this->mutex);
-    MSVCRT_operator_delete(this->mutex);
-}
-
-/* ?_Lock at _Mutex@std@@QAEXXZ */
-/* ?_Lock at _Mutex@std@@QEAAXXZ */
-void mutex_lock(mutex *this)
-{
-    EnterCriticalSection(this->mutex);
-}
-
-/* ?_Unlock at _Mutex@std@@QAEXXZ */
-/* ?_Unlock at _Mutex@std@@QEAAXXZ */
-void mutex_unlock(mutex *this)
-{
-    LeaveCriticalSection(this->mutex);
-}
-
 static CRITICAL_SECTION lockit_cs;
 
 void init_lockit(void) {
diff --git a/dlls/msvcp60/msvcp.h b/dlls/msvcp60/msvcp.h
index 17cb6eb..ea52743 100644
--- a/dlls/msvcp60/msvcp.h
+++ b/dlls/msvcp60/msvcp.h
@@ -198,16 +198,6 @@ void free_lockit(void);
 _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
 void __thiscall _Lockit_dtor(_Lockit*);
 
-/* class mutex */
-typedef struct {
-    void *mutex;
-} mutex;
-
-mutex* mutex_ctor(mutex*);
-void mutex_dtor(mutex*);
-void mutex_lock(mutex*);
-void mutex_unlock(mutex*);
-
 typedef enum {
     FMTFLAG_skipws      = 0x0001,
     FMTFLAG_unitbuf     = 0x0002,
@@ -331,7 +321,6 @@ int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
 /* class basic_streambuf<wchar> */
 typedef struct {
     const vtable_ptr *vtable;
-    mutex lock;
     wchar_t *rbuf;
     wchar_t *wbuf;
     wchar_t **prbuf;




More information about the wine-cvs mailing list