Commit 4fd4a8ae authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

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

parent f357f4a5
...@@ -923,6 +923,7 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_s ...@@ -923,6 +923,7 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_s
{ {
TRACE("(%p %d)\n", this, uninitialized); TRACE("(%p %d)\n", this, uninitialized);
this->vtable = &MSVCP_basic_streambuf_char_vtable; this->vtable = &MSVCP_basic_streambuf_char_vtable;
mutex_ctor(&this->lock);
return this; return this;
} }
...@@ -934,6 +935,7 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char ...@@ -934,6 +935,7 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char
TRACE("(%p)\n", this); TRACE("(%p)\n", this);
this->vtable = &MSVCP_basic_streambuf_char_vtable; this->vtable = &MSVCP_basic_streambuf_char_vtable;
mutex_ctor(&this->lock);
this->loc = MSVCRT_operator_new(sizeof(locale)); this->loc = MSVCRT_operator_new(sizeof(locale));
locale_ctor(this->loc); locale_ctor(this->loc);
basic_streambuf_char__Init_empty(this); basic_streambuf_char__Init_empty(this);
...@@ -948,6 +950,7 @@ void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this) ...@@ -948,6 +950,7 @@ void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
{ {
TRACE("(%p)\n", this); TRACE("(%p)\n", this);
mutex_dtor(&this->lock);
locale_dtor(this->loc); locale_dtor(this->loc);
MSVCRT_operator_delete(this->loc); MSVCRT_operator_delete(this->loc);
} }
...@@ -1051,7 +1054,8 @@ void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this) ...@@ -1051,7 +1054,8 @@ void __thiscall basic_streambuf_char__Init_empty(basic_streambuf_char *this)
DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4) DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this) 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@DU?$char_traits@D@std@@@std@@IBEHXZ */ /* ?_Pnavail@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IBEHXZ */
...@@ -1087,7 +1091,8 @@ streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this, ...@@ -1087,7 +1091,8 @@ streamsize __thiscall basic_streambuf_char__Sgetn_s(basic_streambuf_char *this,
DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4) DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this) 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@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */ /* ?_Xsgetn_s@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADIH@Z */
......
...@@ -218,3 +218,8 @@ void __thiscall _Lockit_dtor(_Lockit*); ...@@ -218,3 +218,8 @@ void __thiscall _Lockit_dtor(_Lockit*);
typedef struct { typedef struct {
void *mutex; void *mutex;
} mutex; } mutex;
mutex* __thiscall mutex_ctor(mutex*);
void __thiscall mutex_dtor(mutex*);
void __thiscall mutex_lock(mutex*);
void __thiscall mutex_unlock(mutex*);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment