From 2a65d21d1a873cf14c0ad03dd2b53ebd760fe5a0 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Mon, 28 Mar 2016 13:12:02 -0700 Subject: [PATCH] msvcp120: Add _Mtx_current_owns. Signed-off-by: Daniel Lehman Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcp110/msvcp110.spec | 2 +- dlls/msvcp120/msvcp120.spec | 2 +- dlls/msvcp120_app/msvcp120_app.spec | 2 +- dlls/msvcp90/misc.c | 5 +++++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index 87b23924704..ee2d62f8cc2 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -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) diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index 8fdd4e7f671..ddb28c40be7 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -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) diff --git a/dlls/msvcp120_app/msvcp120_app.spec b/dlls/msvcp120_app/msvcp120_app.spec index 12a92fd969b..40270669d33 100644 --- a/dlls/msvcp120_app/msvcp120_app.spec +++ b/dlls/msvcp120_app/msvcp120_app.spec @@ -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 diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index a4713d2e5b5..a41d35775e8 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -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()) {