Commit 2a65d21d authored by Daniel Lehman's avatar Daniel Lehman Committed by Alexandre Julliard

msvcp120: Add _Mtx_current_owns.

parent 31bc775c
......@@ -3818,7 +3818,7 @@
@ stub _Lock_shared_ptr_spin_lock
@ cdecl _Mbrtowc(ptr ptr long ptr ptr)
@ stub _Mtx_clear_owner
@ stub _Mtx_current_owns
@ cdecl _Mtx_current_owns(ptr)
@ cdecl _Mtx_destroy(ptr)
@ cdecl _Mtx_getconcrtcs(ptr)
@ cdecl _Mtx_init(ptr long)
......
......@@ -3763,7 +3763,7 @@
@ stub _Lock_shared_ptr_spin_lock
@ cdecl _Mbrtowc(ptr ptr long ptr ptr)
@ stub _Mtx_clear_owner
@ stub _Mtx_current_owns
@ cdecl _Mtx_current_owns(ptr)
@ cdecl _Mtx_destroy(ptr)
@ cdecl _Mtx_getconcrtcs(ptr)
@ cdecl _Mtx_init(ptr long)
......
......@@ -3763,7 +3763,7 @@
@ stub _Lock_shared_ptr_spin_lock
@ cdecl _Mbrtowc(ptr ptr long ptr ptr) msvcp120._Mbrtowc
@ stub _Mtx_clear_owner
@ stub _Mtx_current_owns
@ cdecl _Mtx_current_owns(ptr) msvcp120._Mtx_current_owns
@ cdecl _Mtx_destroy(ptr) msvcp120._Mtx_destroy
@ cdecl _Mtx_getconcrtcs(ptr) msvcp120._Mtx_getconcrtcs
@ cdecl _Mtx_init(ptr long) msvcp120._Mtx_init
......
......@@ -487,6 +487,11 @@ void __cdecl _Mtx_destroy(_Mtx_t *mtx)
MSVCRT_operator_delete(*mtx);
}
int __cdecl _Mtx_current_owns(_Mtx_t *mtx)
{
return (*mtx)->thread_id == GetCurrentThreadId();
}
int __cdecl _Mtx_lock(_Mtx_t *mtx)
{
if((*mtx)->thread_id != GetCurrentThreadId()) {
......
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