From 7419eff0c21d912293e74aabbc87958a96e4f4ca Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Fri, 2 Feb 2018 16:36:26 +0100 Subject: [PATCH] msvcr100: Add _ReentrantPPLLock class implementation. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/concrt140/concrt140.spec | 12 +++---- dlls/msvcr100/msvcr100.spec | 12 +++---- dlls/msvcr110/msvcr110.spec | 18 +++++----- dlls/msvcr120/msvcr120.spec | 18 +++++----- dlls/msvcr120_app/msvcr120_app.spec | 18 +++++----- dlls/msvcrt/lock.c | 52 +++++++++++++++++++++++++++++ 6 files changed, 91 insertions(+), 39 deletions(-) diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index f5d27686ed6..b388c2971b0 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -28,8 +28,8 @@ @ cdecl -arch=win64 ??0_ReentrantBlockingLock@details@Concurrency@@QEAA@XZ(ptr) msvcr120.??0_ReentrantBlockingLock@details@Concurrency@@QEAA@XZ @ stub -arch=i386 ??0_ReentrantLock@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??0_ReentrantLock@details@Concurrency@@QEAA@XZ -@ stub -arch=i386 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ +@ thiscall -arch=i386 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ(ptr) msvcr120.??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ +@ cdecl -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ(ptr) msvcr120.??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ @ stub -arch=i386 ??0_Runtime_object@details@Concurrency@@QAE@H@Z @ stub -arch=win64 ??0_Runtime_object@details@Concurrency@@QEAA@H@Z @ stub -arch=i386 ??0_Runtime_object@details@Concurrency@@QAE@XZ @@ -302,8 +302,8 @@ @ cdecl -arch=win64 ?_Acquire@_ReentrantBlockingLock@details@Concurrency@@QEAAXXZ(ptr) msvcr120.?_Acquire@_ReentrantBlockingLock@details@Concurrency@@QEAAXXZ @ stub -arch=i386 ?_Acquire@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Acquire@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=i386 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z -@ stub -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z +@ thiscall -arch=i386 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z(ptr ptr) msvcr120.?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z +@ cdecl -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z(ptr ptr) msvcr120.?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z @ stub -arch=i386 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QEAAXXZ @ stub -arch=i386 ?_AcquireWrite@_ReaderWriterLock@details@Concurrency@@QAEXXZ @@ -410,8 +410,8 @@ @ cdecl -arch=win64 ?_Release@_ReentrantBlockingLock@details@Concurrency@@QEAAXXZ(ptr) msvcr120.?_Release@_ReentrantBlockingLock@details@Concurrency@@QEAAXXZ @ stub -arch=i386 ?_Release@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Release@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=i386 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ -@ stub -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ +@ thiscall -arch=i386 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ(ptr) msvcr120.?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ +@ cdecl -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ(ptr) msvcr120.?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ @ thiscall -arch=i386 ?_Release@_Scheduler@details@Concurrency@@QAEIXZ(ptr) msvcr120.?_Release@_Scheduler@details@Concurrency@@QAEIXZ @ cdecl -arch=win64 ?_Release@_Scheduler@details@Concurrency@@QEAAIXZ(ptr) msvcr120.?_Release@_Scheduler@details@Concurrency@@QEAAIXZ @ stub -arch=i386 ?_ReleaseRead@_ReaderWriterLock@details@Concurrency@@QAEXXZ diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 72b36de4674..e584e7a7282 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -20,8 +20,8 @@ @ cdecl -arch=win64 ??0_ReentrantBlockingLock@details@Concurrency@@QEAA@XZ(ptr) _ReentrantBlockingLock_ctor @ stub -arch=win32 ??0_ReentrantLock@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??0_ReentrantLock@details@Concurrency@@QEAA@XZ -@ stub -arch=win32 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ +@ thiscall -arch=win32 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ(ptr) _ReentrantPPLLock_ctor +@ cdecl -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ(ptr) _ReentrantPPLLock_ctor @ stub -arch=win32 ??0_Scoped_lock@_NonReentrantPPLLock@details@Concurrency@@QAE@AAV123@@Z @ stub -arch=win64 ??0_Scoped_lock@_NonReentrantPPLLock@details@Concurrency@@QEAA@AEAV123@@Z @ stub -arch=win32 ??0_Scoped_lock@_ReentrantPPLLock@details@Concurrency@@QAE@AAV123@@Z @@ -303,8 +303,8 @@ @ cdecl -arch=win64 ?_Acquire@_ReentrantBlockingLock@details@Concurrency@@QEAAXXZ(ptr) _ReentrantBlockingLock__Acquire @ stub -arch=win32 ?_Acquire@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Acquire@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=win32 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z -@ stub -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z +@ thiscall -arch=win32 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z(ptr ptr) _ReentrantPPLLock__Acquire +@ cdecl -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z(ptr ptr) _ReentrantPPLLock__Acquire @ stub -arch=win32 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QEAAXXZ @ stub -arch=win32 ?_AcquireWrite@_ReaderWriterLock@details@Concurrency@@QAEXXZ @@ -349,8 +349,8 @@ @ cdecl -arch=win64 ?_Release@_ReentrantBlockingLock@details@Concurrency@@QEAAXXZ(ptr) _ReentrantBlockingLock__Release @ stub -arch=win32 ?_Release@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Release@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=win32 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ -@ stub -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ +@ thiscall -arch=win32 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ(ptr) _ReentrantPPLLock__Release +@ cdecl -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ(ptr) _ReentrantPPLLock__Release @ stub -arch=win32 ?_ReleaseRead@_ReaderWriterLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_ReleaseRead@_ReaderWriterLock@details@Concurrency@@QEAAXXZ @ stub -arch=win32 ?_ReleaseWrite@_ReaderWriterLock@details@Concurrency@@QAEXXZ diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 363d6447feb..0e3b0f3d7b2 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -47,9 +47,9 @@ @ stub -arch=arm ??0_ReentrantLock@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??0_ReentrantLock@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??0_ReentrantLock@details@Concurrency@@QEAA@XZ -@ stub -arch=arm ??0_ReentrantPPLLock@details@Concurrency@@QAA@XZ -@ stub -arch=i386 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ +@ cdecl -arch=arm ??0_ReentrantPPLLock@details@Concurrency@@QAA@XZ(ptr) _ReentrantPPLLock_ctor +@ thiscall -arch=i386 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ(ptr) _ReentrantPPLLock_ctor +@ cdecl -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ(ptr) _ReentrantPPLLock_ctor @ cdecl -arch=arm ??0_Scheduler@details@Concurrency@@QAA@PAVScheduler@2@@Z(ptr ptr) _Scheduler_ctor_sched @ thiscall -arch=i386 ??0_Scheduler@details@Concurrency@@QAE@PAVScheduler@2@@Z(ptr ptr) _Scheduler_ctor_sched @ cdecl -arch=win64 ??0_Scheduler@details@Concurrency@@QEAA@PEAVScheduler@2@@Z(ptr ptr) _Scheduler_ctor_sched @@ -475,9 +475,9 @@ @ stub -arch=arm ?_Acquire@_ReentrantLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Acquire@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Acquire@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAAXPAX@Z -@ stub -arch=i386 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z -@ stub -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z +@ cdecl -arch=arm ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAAXPAX@Z(ptr ptr) _ReentrantPPLLock__Acquire +@ thiscall -arch=i386 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z(ptr ptr) _ReentrantPPLLock__Acquire +@ cdecl -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z(ptr ptr) _ReentrantPPLLock__Acquire @ stub -arch=arm ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QEAAXXZ @@ -589,9 +589,9 @@ @ stub -arch=arm ?_Release@_ReentrantLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Release@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Release@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_Release@_ReentrantPPLLock@details@Concurrency@@QAAXXZ -@ stub -arch=i386 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ -@ stub -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ +@ cdecl -arch=arm ?_Release@_ReentrantPPLLock@details@Concurrency@@QAAXXZ(ptr) _ReentrantPPLLock__Release +@ thiscall -arch=i386 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ(ptr) _ReentrantPPLLock__Release +@ cdecl -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ(ptr) _ReentrantPPLLock__Release @ cdecl -arch=arm ?_Release@_Scheduler@details@Concurrency@@QAAIXZ(ptr) _Scheduler__Release @ thiscall -arch=i386 ?_Release@_Scheduler@details@Concurrency@@QAEIXZ(ptr) _Scheduler__Release @ cdecl -arch=win64 ?_Release@_Scheduler@details@Concurrency@@QEAAIXZ(ptr) _Scheduler__Release diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 1da6638bc5f..aebb12cf4a4 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -44,9 +44,9 @@ @ stub -arch=arm ??0_ReentrantLock@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??0_ReentrantLock@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??0_ReentrantLock@details@Concurrency@@QEAA@XZ -@ stub -arch=arm ??0_ReentrantPPLLock@details@Concurrency@@QAA@XZ -@ stub -arch=i386 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ +@ cdecl -arch=arm ??0_ReentrantPPLLock@details@Concurrency@@QAA@XZ(ptr) _ReentrantPPLLock_ctor +@ thiscall -arch=i386 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ(ptr) _ReentrantPPLLock_ctor +@ cdecl -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ(ptr) _ReentrantPPLLock_ctor @ cdecl -arch=arm ??0_Scheduler@details@Concurrency@@QAA@PAVScheduler@2@@Z(ptr ptr) _Scheduler_ctor_sched @ thiscall -arch=i386 ??0_Scheduler@details@Concurrency@@QAE@PAVScheduler@2@@Z(ptr ptr) _Scheduler_ctor_sched @ cdecl -arch=win64 ??0_Scheduler@details@Concurrency@@QEAA@PEAVScheduler@2@@Z(ptr ptr) _Scheduler_ctor_sched @@ -474,9 +474,9 @@ @ stub -arch=arm ?_Acquire@_ReentrantLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Acquire@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Acquire@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAAXPAX@Z -@ stub -arch=i386 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z -@ stub -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z +@ cdecl -arch=arm ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAAXPAX@Z(ptr ptr) _ReentrantPPLLock__Acquire +@ thiscall -arch=i386 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z(ptr ptr) _ReentrantPPLLock__Acquire +@ cdecl -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z(ptr ptr) _ReentrantPPLLock__Acquire @ stub -arch=arm ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QEAAXXZ @@ -571,9 +571,9 @@ @ stub -arch=arm ?_Release@_ReentrantLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Release@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Release@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_Release@_ReentrantPPLLock@details@Concurrency@@QAAXXZ -@ stub -arch=i386 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ -@ stub -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ +@ cdecl -arch=arm ?_Release@_ReentrantPPLLock@details@Concurrency@@QAAXXZ(ptr) _ReentrantPPLLock__Release +@ thiscall -arch=i386 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ(ptr) _ReentrantPPLLock__Release +@ cdecl -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ(ptr) _ReentrantPPLLock__Release @ cdecl -arch=arm ?_Release@_Scheduler@details@Concurrency@@QAAIXZ(ptr) _Scheduler__Release @ thiscall -arch=i386 ?_Release@_Scheduler@details@Concurrency@@QAEIXZ(ptr) _Scheduler__Release @ cdecl -arch=win64 ?_Release@_Scheduler@details@Concurrency@@QEAAIXZ(ptr) _Scheduler__Release diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index c8e8ada607d..6ffc3080ddf 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -42,9 +42,9 @@ @ stub -arch=arm ??0_ReentrantLock@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??0_ReentrantLock@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??0_ReentrantLock@details@Concurrency@@QEAA@XZ -@ stub -arch=arm ??0_ReentrantPPLLock@details@Concurrency@@QAA@XZ -@ stub -arch=i386 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ +@ cdecl -arch=arm ??0_ReentrantPPLLock@details@Concurrency@@QAA@XZ(ptr) msvcr120.??0_ReentrantPPLLock@details@Concurrency@@QAA@XZ +@ thiscall -arch=i386 ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ(ptr) msvcr120.??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ +@ cdecl -arch=win64 ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ(ptr) msvcr120.??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ @ cdecl -arch=arm ??0_Scheduler@details@Concurrency@@QAA@PAVScheduler@2@@Z(ptr ptr) msvcr120.??0_Scheduler@details@Concurrency@@QAA@PAVScheduler@2@@Z @ thiscall -arch=i386 ??0_Scheduler@details@Concurrency@@QAE@PAVScheduler@2@@Z(ptr ptr) msvcr120.??0_Scheduler@details@Concurrency@@QAE@PAVScheduler@2@@Z @ cdecl -arch=win64 ??0_Scheduler@details@Concurrency@@QEAA@PEAVScheduler@2@@Z(ptr ptr) msvcr120.??0_Scheduler@details@Concurrency@@QEAA@PEAVScheduler@2@@Z @@ -470,9 +470,9 @@ @ stub -arch=arm ?_Acquire@_ReentrantLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Acquire@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Acquire@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAAXPAX@Z -@ stub -arch=i386 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z -@ stub -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z +@ cdecl -arch=arm ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAAXPAX@Z(ptr ptr) msvcr120.?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAAXPAX@Z +@ thiscall -arch=i386 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z(ptr ptr) msvcr120.?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z +@ cdecl -arch=win64 ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z(ptr ptr) msvcr120.?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z @ stub -arch=arm ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_AcquireRead@_ReaderWriterLock@details@Concurrency@@QEAAXXZ @@ -567,9 +567,9 @@ @ stub -arch=arm ?_Release@_ReentrantLock@details@Concurrency@@QAAXXZ @ stub -arch=i386 ?_Release@_ReentrantLock@details@Concurrency@@QAEXXZ @ stub -arch=win64 ?_Release@_ReentrantLock@details@Concurrency@@QEAAXXZ -@ stub -arch=arm ?_Release@_ReentrantPPLLock@details@Concurrency@@QAAXXZ -@ stub -arch=i386 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ -@ stub -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ +@ cdecl -arch=arm ?_Release@_ReentrantPPLLock@details@Concurrency@@QAAXXZ(ptr) msvcr120.?_Release@_ReentrantPPLLock@details@Concurrency@@QAAXXZ +@ thiscall -arch=i386 ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ(ptr) msvcr120.?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ +@ cdecl -arch=win64 ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ(ptr) msvcr120.?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ @ cdecl -arch=arm ?_Release@_Scheduler@details@Concurrency@@QAAIXZ(ptr) msvcr120.?_Release@_Scheduler@details@Concurrency@@QAAIXZ @ thiscall -arch=i386 ?_Release@_Scheduler@details@Concurrency@@QAEIXZ(ptr) msvcr120.?_Release@_Scheduler@details@Concurrency@@QAEIXZ @ cdecl -arch=win64 ?_Release@_Scheduler@details@Concurrency@@QEAAIXZ(ptr) msvcr120.?_Release@_Scheduler@details@Concurrency@@QEAAIXZ diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index 03b9aeee25e..d159745e855 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -573,6 +573,58 @@ void __thiscall _NonReentrantPPLLock__Release(_NonReentrantPPLLock *this) critical_section_unlock(&this->cs); } +typedef struct +{ + critical_section cs; + LONG count; + LONG owner; +} _ReentrantPPLLock; + +/* ??0_ReentrantPPLLock@details@Concurrency@@QAE@XZ */ +/* ??0_ReentrantPPLLock@details@Concurrency@@QEAA@XZ */ +DEFINE_THISCALL_WRAPPER(_ReentrantPPLLock_ctor, 4) +_ReentrantPPLLock* __thiscall _ReentrantPPLLock_ctor(_ReentrantPPLLock *this) +{ + TRACE("(%p)\n", this); + + critical_section_ctor(&this->cs); + this->count = 0; + this->owner = -1; + return this; +} + +/* ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QAEXPAX@Z */ +/* ?_Acquire@_ReentrantPPLLock@details@Concurrency@@QEAAXPEAX@Z */ +DEFINE_THISCALL_WRAPPER(_ReentrantPPLLock__Acquire, 8) +void __thiscall _ReentrantPPLLock__Acquire(_ReentrantPPLLock *this, cs_queue *q) +{ + TRACE("(%p %p)\n", this, q); + + if(this->owner == GetCurrentThreadId()) { + this->count++; + return; + } + + cs_lock(&this->cs, q); + this->count++; + this->owner = GetCurrentThreadId(); +} + +/* ?_Release@_ReentrantPPLLock@details@Concurrency@@QAEXXZ */ +/* ?_Release@_ReentrantPPLLock@details@Concurrency@@QEAAXXZ */ +DEFINE_THISCALL_WRAPPER(_ReentrantPPLLock__Release, 4) +void __thiscall _ReentrantPPLLock__Release(_ReentrantPPLLock *this) +{ + TRACE("(%p)\n", this); + + this->count--; + if(this->count) + return; + + this->owner = -1; + critical_section_unlock(&this->cs); +} + /* ?_GetConcurrency@details@Concurrency@@YAIXZ */ unsigned int __cdecl _GetConcurrency(void) {