Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47375 Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- v4 -> v5: Changed the spec file entries for i386/arm in addition to win64.
dlls/concrt140/concrt140.spec | 6 +++--- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 6 +++--- dlls/msvcr120/msvcr120.spec | 6 +++--- dlls/msvcr120_app/msvcr120_app.spec | 6 +++--- dlls/msvcrt/concurrency.c | 27 +++++++++++++++++++++++++++ 6 files changed, 41 insertions(+), 14 deletions(-)
diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index 50db9348327..6bb95661dd1 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -594,9 +594,9 @@ @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z -@ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z -@ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z +@ thiscall -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule +@ thiscall -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule +@ thiscall -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule @ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@PEAVlocation@3@@Z diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 19b4cbe96d7..2a03df03e33 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -363,8 +363,8 @@ @ stub -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z @ stub -arch=win32 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z -@ stub -arch=win32 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z +@ thiscall -arch=win32 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule +@ thiscall -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule @ stub -arch=win32 ?_Schedule@_TaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_Schedule@_TaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z @ thiscall -arch=win32 ?_SetSpinCount@?$_SpinWait@$00@details@Concurrency@@QAEXI@Z(ptr long) SpinWait__SetSpinCount diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 23840f85eda..2888bd97e00 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -614,9 +614,9 @@ @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z -@ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z -@ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z +@ thiscall -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule +@ thiscall -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule +@ thiscall -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule @ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@PEAVlocation@3@@Z diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 64ddeed42f4..8ddc09bcaf8 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -596,9 +596,9 @@ @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z -@ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z -@ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z +@ thiscall -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule +@ thiscall -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule +@ thiscall -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule @ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@PEAVlocation@3@@Z diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 05f408d6884..4eb7cb6a298 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -592,9 +592,9 @@ @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z -@ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z -@ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z +@ thiscall -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z(ptr ptr) msvcr120.?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z +@ thiscall -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z(ptr ptr) msvcr120.?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z +@ thiscall -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z(ptr ptr) msvcr120.?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z @ stub -arch=arm ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ stub -arch=i386 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@PAVlocation@3@@Z @ stub -arch=win64 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@PEAVlocation@3@@Z diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 2ca6421b0e7..db6e34ad457 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -174,6 +174,20 @@ typedef struct cs_queue #endif } cs_queue;
+#if _MSVCR_VER >= 100 + +typedef struct +{ + char dummy; +} UnrealizedChore; + +typedef struct +{ + char dummy; +} StructuredTaskCollection; + +#endif /* _MSVCR_VER >= 100 */ + typedef struct { ULONG_PTR unk_thread_id; @@ -1741,6 +1755,19 @@ bool __thiscall SpinWait__SpinOnce(SpinWait *this) } }
+#if _MSVCR_VER >= 100 + +/* ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z */ +/* ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z */ +/* ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z */ +DEFINE_THISCALL_WRAPPER(StructuredTaskCollection__Schedule, 8) +void __thiscall StructuredTaskCollection__Schedule(StructuredTaskCollection *this, UnrealizedChore *chore) +{ + FIXME("(%p %p): stub!\n", this, chore); +} + +#endif /* _MSVCR_VER >= 100 */ + /* ??0critical_section@Concurrency@@QAE@XZ */ /* ??0critical_section@Concurrency@@QEAA@XZ */ DEFINE_THISCALL_WRAPPER(critical_section_ctor, 4)
Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- v4 -> v5: New patch, split from "msvcr100: Implement _StructuredTaskCollection::_RunAndWait and _Schedule.".
dlls/concrt140/concrt140.spec | 6 +++--- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 6 +++--- dlls/msvcr120/msvcr120.spec | 6 +++--- dlls/msvcr120_app/msvcr120_app.spec | 6 +++--- dlls/msvcrt/concurrency.c | 10 ++++++++++ 6 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index 6bb95661dd1..3d1c3b399d2 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -588,9 +588,9 @@ @ cdecl -arch=arm ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAAXXZ(ptr) SpinWait__Reset @ thiscall -arch=i386 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAEXXZ(ptr) SpinWait__Reset @ cdecl -arch=win64 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IEAAXXZ(ptr) SpinWait__Reset -@ stub -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z +@ thiscall -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait +@ thiscall -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait +@ thiscall -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 2a03df03e33..88d0d7555a9 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -359,8 +359,8 @@ @ cdecl -arch=win64 ?_Reset@?$_SpinWait@$00@details@Concurrency@@IEAAXXZ(ptr) SpinWait__Reset @ thiscall -arch=win32 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAEXXZ(ptr) SpinWait__Reset @ cdecl -arch=win64 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IEAAXXZ(ptr) SpinWait__Reset -@ stub -arch=win32 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z +@ thiscall -arch=win32 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait +@ thiscall -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait @ stub -arch=win32 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z @ thiscall -arch=win32 ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__Schedule diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 2888bd97e00..130d5912a78 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -608,9 +608,9 @@ @ cdecl -arch=arm ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAAXXZ(ptr) SpinWait__Reset @ thiscall -arch=i386 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAEXXZ(ptr) SpinWait__Reset @ cdecl -arch=win64 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IEAAXXZ(ptr) SpinWait__Reset -@ stub -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z +@ thiscall -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait +@ thiscall -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait +@ thiscall -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 8ddc09bcaf8..d32a0d6c47e 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -590,9 +590,9 @@ @ cdecl -arch=arm ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAAXXZ(ptr) SpinWait__Reset @ thiscall -arch=i386 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAEXXZ(ptr) SpinWait__Reset @ cdecl -arch=win64 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IEAAXXZ(ptr) SpinWait__Reset -@ stub -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z +@ thiscall -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait +@ thiscall -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait +@ thiscall -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 4eb7cb6a298..52777eff90b 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -586,9 +586,9 @@ @ cdecl -arch=arm ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAAXXZ(ptr) msvcr120.?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAAXXZ @ thiscall -arch=i386 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAEXXZ(ptr) msvcr120.?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IAEXXZ @ cdecl -arch=win64 ?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IEAAXXZ(ptr) msvcr120.?_Reset@?$_SpinWait@$0A@@details@Concurrency@@IEAAXXZ -@ stub -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z -@ stub -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z +@ thiscall -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) msvcr120.?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z +@ thiscall -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) msvcr120.?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z +@ thiscall -arch=win64 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z(ptr ptr) msvcr120.?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z @ stub -arch=arm ?_RunAndWait@_TaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=i386 ?_RunAndWait@_TaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z @ stub -arch=win64 ?_RunAndWait@_TaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index db6e34ad457..7eb89d59b18 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -1757,6 +1757,16 @@ bool __thiscall SpinWait__SpinOnce(SpinWait *this)
#if _MSVCR_VER >= 100
+/* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z */ +/* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z */ +/* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z */ +DEFINE_THISCALL_WRAPPER(StructuredTaskCollection__RunAndWait, 8) +/*enum Concurrency::details::_TaskCollectionStatus*/int __thiscall StructuredTaskCollection__RunAndWait(StructuredTaskCollection *this, UnrealizedChore *chore) +{ + FIXME("(%p %p): stub!\n", this, chore); + return 1; +} + /* ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z */ /* ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z */ /* ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z */
Hi Torge,
On 4/20/22 16:33, Torge Matthies wrote: ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z
+@ thiscall -arch=arm ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait +@ thiscall -arch=i386 ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z(ptr ptr) StructuredTaskCollection__RunAndWait
This is stdcall function.
Thanks, Piotr
Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- v4 -> v5: Split patch into stub + implementation (in "msvcr100: Implement _StructuredTaskCollection::_RunAndWait and _Schedule.")
dlls/concrt140/concrt140.spec | 6 +++--- dlls/msvcr120/msvcr120.spec | 4 ++-- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcrt/concurrency.c | 13 +++++++++++++ 4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index 3d1c3b399d2..ba0f85f0788 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -267,9 +267,9 @@ @ stub -arch=arm ??1_SpinLock@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_SpinLock@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??1_SpinLock@details@Concurrency@@QEAA@XZ -@ stub -arch=arm ??1_StructuredTaskCollection@details@Concurrency@@QAA@XZ -@ stub -arch=i386 ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??1_StructuredTaskCollection@details@Concurrency@@QEAA@XZ +@ thiscall -arch=arm ??1_StructuredTaskCollection@details@Concurrency@@QAA@XZ(ptr) StructuredTaskCollection_dtor +@ thiscall -arch=i386 ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ(ptr) StructuredTaskCollection_dtor +@ thiscall -arch=win64 ??1_StructuredTaskCollection@details@Concurrency@@QEAA@XZ(ptr) StructuredTaskCollection_dtor @ stub -arch=arm ??1_TaskCollection@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_TaskCollection@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??1_TaskCollection@details@Concurrency@@QEAA@XZ diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index d32a0d6c47e..1b6e2cd8270 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -290,8 +290,8 @@ @ stub -arch=arm ??1_SpinLock@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_SpinLock@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??1_SpinLock@details@Concurrency@@QEAA@XZ -@ stub -arch=i386 ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??1_StructuredTaskCollection@details@Concurrency@@QEAA@XZ +@ thiscall -arch=i386 ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ(ptr) StructuredTaskCollection_dtor +@ thiscall -arch=win64 ??1_StructuredTaskCollection@details@Concurrency@@QEAA@XZ(ptr) StructuredTaskCollection_dtor @ stub -arch=arm ??1_TaskCollection@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_TaskCollection@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??1_TaskCollection@details@Concurrency@@QEAA@XZ diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 52777eff90b..1e04dc50ad8 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -288,7 +288,7 @@ @ stub -arch=arm ??1_SpinLock@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_SpinLock@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??1_SpinLock@details@Concurrency@@QEAA@XZ -@ stub -arch=i386 ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ +@ thiscall -arch=i386 ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ(ptr) msvcr120.??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ @ stub -arch=arm ??1_TaskCollection@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_TaskCollection@details@Concurrency@@QAE@XZ @ stub -arch=win64 ??1_TaskCollection@details@Concurrency@@QEAA@XZ diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 7eb89d59b18..f0cedbf08a6 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -1755,6 +1755,19 @@ bool __thiscall SpinWait__SpinOnce(SpinWait *this) } }
+#if _MSVCR_VER >= 120 + +/* ??1_StructuredTaskCollection@details@Concurrency@@QAA@XZ */ +/* ??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ */ +/* ??1_StructuredTaskCollection@details@Concurrency@@QEAA@XZ */ +DEFINE_THISCALL_WRAPPER(StructuredTaskCollection_dtor, 4) +void __thiscall StructuredTaskCollection_dtor(StructuredTaskCollection *this) +{ + FIXME("(%p): stub!\n", this); +} + +#endif /* _MSVCR_VER >= 120 */ + #if _MSVCR_VER >= 100
/* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z */
Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- v4 -> v5: New patch
dlls/concrt140/concrt140.spec | 6 +++--- dlls/msvcr110/msvcr110.spec | 6 +++--- dlls/msvcr120/msvcr120.spec | 6 +++--- dlls/msvcr120_app/msvcr120_app.spec | 6 +++--- dlls/msvcrt/concurrency.c | 13 +++++++++++++ 5 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index ba0f85f0788..46b7bf3d81f 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -63,9 +63,9 @@ @ stub -arch=arm ??0_SpinLock@details@Concurrency@@QAA@ACJ@Z @ stub -arch=i386 ??0_SpinLock@details@Concurrency@@QAE@ACJ@Z @ stub -arch=win64 ??0_SpinLock@details@Concurrency@@QEAA@AECJ@Z -@ stub -arch=arm ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z -@ stub -arch=i386 ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z -@ stub -arch=win64 ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z +@ thiscall -arch=arm ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor +@ thiscall -arch=i386 ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor +@ thiscall -arch=win64 ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor @ stub -arch=arm ??0_TaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z @ stub -arch=i386 ??0_TaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z @ stub -arch=win64 ??0_TaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 130d5912a78..950c7d76015 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -62,9 +62,9 @@ @ stub -arch=arm ??0_SpinLock@details@Concurrency@@QAA@ACJ@Z @ stub -arch=i386 ??0_SpinLock@details@Concurrency@@QAE@ACJ@Z @ stub -arch=win64 ??0_SpinLock@details@Concurrency@@QEAA@AECJ@Z -@ stub -arch=arm ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z -@ stub -arch=i386 ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z -@ stub -arch=win64 ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z +@ thiscall -arch=arm ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor +@ thiscall -arch=i386 ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor +@ thiscall -arch=win64 ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor @ stub -arch=arm ??0_TaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z @ stub -arch=i386 ??0_TaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z @ stub -arch=win64 ??0_TaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 1b6e2cd8270..bdb594d3296 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -59,9 +59,9 @@ @ stub -arch=arm ??0_SpinLock@details@Concurrency@@QAA@ACJ@Z @ stub -arch=i386 ??0_SpinLock@details@Concurrency@@QAE@ACJ@Z @ stub -arch=win64 ??0_SpinLock@details@Concurrency@@QEAA@AECJ@Z -@ stub -arch=arm ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z -@ stub -arch=i386 ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z -@ stub -arch=win64 ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z +@ thiscall -arch=arm ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor +@ thiscall -arch=i386 ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor +@ thiscall -arch=win64 ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z(ptr ptr) StructuredTaskCollection_ctor @ stub -arch=arm ??0_TaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z @ stub -arch=i386 ??0_TaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z @ stub -arch=win64 ??0_TaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 1e04dc50ad8..e4d9146e514 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -57,9 +57,9 @@ @ stub -arch=arm ??0_SpinLock@details@Concurrency@@QAA@ACJ@Z @ stub -arch=i386 ??0_SpinLock@details@Concurrency@@QAE@ACJ@Z @ stub -arch=win64 ??0_SpinLock@details@Concurrency@@QEAA@AECJ@Z -@ stub -arch=arm ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z -@ stub -arch=i386 ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z -@ stub -arch=win64 ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z +@ thiscall -arch=arm ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z(ptr ptr) msvcr120.??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z +@ thiscall -arch=i386 ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z(ptr ptr) msvcr120.??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z +@ thiscall -arch=win64 ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z(ptr ptr) msvcr120.??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z @ stub -arch=arm ??0_TaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z @ stub -arch=i386 ??0_TaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z @ stub -arch=win64 ??0_TaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index f0cedbf08a6..7712b93f1a3 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -1755,6 +1755,19 @@ bool __thiscall SpinWait__SpinOnce(SpinWait *this) } }
+#if _MSVCR_VER >= 110 + +/* ??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z */ +/* ??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z */ +/* ??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z */ +DEFINE_THISCALL_WRAPPER(StructuredTaskCollection_ctor, 8) +void __thiscall StructuredTaskCollection_ctor(StructuredTaskCollection *this, void *unk) +{ + FIXME("(%p): stub!\n", this); +} + +#endif /* _MSVCR_VER >= 100 */ + #if _MSVCR_VER >= 120
/* ??1_StructuredTaskCollection@details@Concurrency@@QAA@XZ */
Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- v4 -> v5: New patch
dlls/msvcr120/tests/msvcr120.c | 123 +++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+)
diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index a3161266db4..d1367e274f3 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -95,6 +95,31 @@ typedef struct cs_queue int unknown; } cs_queue;
+typedef struct UnrealizedChore +{ + void *unk1; + void (__cdecl *callback)(struct UnrealizedChore *_this, void *unk); + void *unk2; + void *unk3; + void *unk4; + void *unk5; + void *unk6; + void *unk7; + void *unk8; + void *unk9; +} UnrealizedChore; + +typedef struct +{ + void *unk1; + unsigned int unk2; + void *unk3; + void *volatile unk_chores; + unsigned int count; + unsigned int unk5; + void *unk6; +} StructuredTaskCollection; + typedef struct { ULONG_PTR unk_thread_id; @@ -204,6 +229,11 @@ static wint_t (__cdecl *p_towctrans)(wint_t, wctrans_t); #undef errno #define errno (*p_errno())
+static StructuredTaskCollection* (__stdcall *p__StructuredTaskCollection_ctor)(StructuredTaskCollection*, void*); +static void (__thiscall *p__StructuredTaskCollection_dtor)(StructuredTaskCollection*); +static void (__thiscall *p__StructuredTaskCollection__Schedule)(StructuredTaskCollection*, UnrealizedChore*); +static int (__thiscall *p__StructuredTaskCollection__RunAndWait)(StructuredTaskCollection*, UnrealizedChore*); + static critical_section* (__thiscall *p_critical_section_ctor)(critical_section*); static void (__thiscall *p_critical_section_dtor)(critical_section*); static void (__thiscall *p_critical_section_lock)(critical_section*); @@ -279,6 +309,14 @@ static BOOL init(void) SET(p_towctrans, "towctrans"); SET(p__Context__CurrentContext, "?_CurrentContext@_Context@details@Concurrency@@SA?AV123@XZ"); if(sizeof(void*) == 8) { /* 64-bit initialization */ + SET(p__StructuredTaskCollection_ctor, + "??0_StructuredTaskCollection@details@Concurrency@@QEAA@PEAV_CancellationTokenState@12@@Z"); + SET(p__StructuredTaskCollection_dtor, + "??1_StructuredTaskCollection@details@Concurrency@@QEAA@XZ"); + SET(p__StructuredTaskCollection__Schedule, + "?_Schedule@_StructuredTaskCollection@details@Concurrency@@QEAAXPEAV_UnrealizedChore@23@@Z"); + SET(p__StructuredTaskCollection__RunAndWait, + "?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z"); SET(p_critical_section_ctor, "??0critical_section@Concurrency@@QEAA@XZ"); SET(p_critical_section_dtor, @@ -313,6 +351,12 @@ static BOOL init(void) "?CurrentContext@Context@Concurrency@@SAPEAV12@XZ"); } else { #ifdef __arm__ + SET(p__StructuredTaskCollection_ctor, + "??0_StructuredTaskCollection@details@Concurrency@@QAA@PAV_CancellationTokenState@12@@Z"); + SET(p__StructuredTaskCollection__Schedule, + "?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z"); + SET(p__StructuredTaskCollection__RunAndWait, + "?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z"); SET(p_critical_section_ctor, "??0critical_section@Concurrency@@QAA@XZ"); SET(p_critical_section_dtor, @@ -344,6 +388,14 @@ static BOOL init(void) SET(p__Condition_variable_notify_all, "?notify_all@_Condition_variable@details@Concurrency@@QAAXXZ"); #else + SET(p__StructuredTaskCollection_ctor, + "??0_StructuredTaskCollection@details@Concurrency@@QAE@PAV_CancellationTokenState@12@@Z"); + SET(p__StructuredTaskCollection_dtor, + "??1_StructuredTaskCollection@details@Concurrency@@QAE@XZ"); + SET(p__StructuredTaskCollection__Schedule, + "?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAEXPAV_UnrealizedChore@23@@Z"); + SET(p__StructuredTaskCollection__RunAndWait, + "?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z"); SET(p_critical_section_ctor, "??0critical_section@Concurrency@@QAE@XZ"); SET(p_critical_section_dtor, @@ -738,6 +790,76 @@ static unsigned __stdcall test_critical_section_scoped_lock(void *arg) return 0; }
+static void setup_chore(UnrealizedChore *chore, void (__cdecl *callback)(struct UnrealizedChore *_this, void *unk)) +{ + chore->unk1 = (void*)0xdeadbeef; + chore->callback = callback; + chore->unk2 = NULL; + chore->unk3 = (void*)0xdead0000; + chore->unk4 = (void*)0xdead1000; + chore->unk5 = (void*)0xdead2000; + chore->unk6 = (void*)0xdead3000; + chore->unk7 = (void*)0xdead4000; + chore->unk8 = (void*)0xdead5000; + chore->unk9 = (void*)0xdead6000; +} + +static HANDLE chore_evt1; +static HANDLE chore_evt2; +static BOOL chore1_executed; +static BOOL chore2_executed; + +void __cdecl chore1_cb(struct UnrealizedChore *_this, void *unk) +{ + BOOL b; + DWORD ret; + b = SetEvent(chore_evt1); + ok(b, "SetEvent failed"); + ret = WaitForSingleObject(chore_evt2, 5000); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %ld\n", ret); + chore1_executed = TRUE; +} + +void __cdecl chore2_cb(struct UnrealizedChore *_this, void *unk) +{ + BOOL b; + DWORD ret; + b = SetEvent(chore_evt2); + ok(b, "SetEvent failed"); + ret = WaitForSingleObject(chore_evt1, 5000); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject returned %ld\n", ret); + chore2_executed = TRUE; +} + +static void test_StructuredTaskCollection(void) +{ + StructuredTaskCollection task_coll; + UnrealizedChore chore1, chore2; + int status; + + chore_evt1 = CreateEventW(NULL, FALSE, FALSE, NULL); + ok(chore_evt1 != NULL, "CreateEvent failed\n"); + chore_evt2 = CreateEventW(NULL, FALSE, FALSE, NULL); + ok(chore_evt2 != NULL, "CreateEvent failed\n"); + + call_func2(p__StructuredTaskCollection_ctor, &task_coll, NULL); + + /* test that all chores are run in parallel */ + setup_chore(&chore1, chore1_cb); + setup_chore(&chore2, chore2_cb); + call_func2(p__StructuredTaskCollection__Schedule, &task_coll, &chore1); + call_func2(p__StructuredTaskCollection__Schedule, &task_coll, &chore2); + status = call_func2(p__StructuredTaskCollection__RunAndWait, &task_coll, NULL); + ok(status == 1, "_StructuredTaskCollection::_RunAndWait failed: %d\n", status); + todo_wine ok(chore1_executed, "_StructuredTaskCollection::_RunAndWait did not execute chore1\n"); + todo_wine ok(chore2_executed, "_StructuredTaskCollection::_RunAndWait did not execute chore2\n"); + + call_func1(p__StructuredTaskCollection_dtor, &task_coll); + + CloseHandle(chore_evt1); + CloseHandle(chore_evt2); +} + static void test_critical_section(void) { HANDLE thread; @@ -1282,6 +1404,7 @@ START_TEST(msvcr120) test_gettnames(p__Gettnames); test__strtof(); test_remainder(); + test_StructuredTaskCollection(); test_critical_section(); test_feenv(); test__wcreate_locale();
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112958
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
msvcr120: 02cc:msvcr120: unhandled exception c0000005 at 721A8182
=== w7u_adm (32 bit report) ===
msvcr120: 0874:msvcr120: unhandled exception c0000005 at 6F118182
=== w7u_el (32 bit report) ===
msvcr120: 0848:msvcr120: unhandled exception c0000005 at 728B8182
=== w1064v1809 (32 bit report) ===
msvcr120: 1efc:msvcr120: unhandled exception c0000005 at 73787ECA
=== w1064 (32 bit report) ===
msvcr120: 1c34:msvcr120: unhandled exception c0000005 at 74AE7ECA
=== w1064_tsign (32 bit report) ===
msvcr120: 0884:msvcr120: unhandled exception c0000005 at 751F7ECA
=== w10pro64 (32 bit report) ===
msvcr120: 0928:msvcr120: unhandled exception c0000005 at 750E8182
Hi Torge,
Please try to expand the tests.
On 4/20/22 16:33, Torge Matthies wrote:
+typedef struct UnrealizedChore +{
- void *unk1;
- void (__cdecl *callback)(struct UnrealizedChore *_this, void *unk);
- void *unk2;
- void *unk3;
- void *unk4;
- void *unk5;
- void *unk6;
- void *unk7;
- void *unk8;
- void *unk9;
+} UnrealizedChore;
It should look as follows: const void *vtable; void (__cdecl *chore_proc)(_UnrealizedChore*); _StructuredTaskCollection *task_collection; void (__cdecl *chore_wrapper)(_UnrealizedChore*); void unk[6];
where vtable contains only destructor, task_collection is set in _Schedule call, unk[6] is to preserve the size you have found.
The chore_wrapper is interesting. It deserves some tests. It's set when _Schedule is called. When called it invokes chore_proc. I guess it guards against exceptions. It works only if task_collection is non null.
+static StructuredTaskCollection* (__stdcall *p__StructuredTaskCollection_ctor)(StructuredTaskCollection*, void*);
This is a thiscall function.
+static void (__thiscall *p__StructuredTaskCollection_dtor)(StructuredTaskCollection*); +static void (__thiscall *p__StructuredTaskCollection__Schedule)(StructuredTaskCollection*, UnrealizedChore*); +static int (__thiscall *p__StructuredTaskCollection__RunAndWait)(StructuredTaskCollection*, UnrealizedChore*);
This is a stdcall function.
+static void setup_chore(UnrealizedChore *chore, void (__cdecl *callback)(struct UnrealizedChore *_this, void *unk))
Please rename the function to _UnrealizedChore_ctor. As far as I can see callback takes only 1 argument (_UnrealizedChore*).
+static void test_StructuredTaskCollection(void) +{
- StructuredTaskCollection task_coll;
- UnrealizedChore chore1, chore2;
- int status;
- chore_evt1 = CreateEventW(NULL, FALSE, FALSE, NULL);
- ok(chore_evt1 != NULL, "CreateEvent failed\n");
- chore_evt2 = CreateEventW(NULL, FALSE, FALSE, NULL);
- ok(chore_evt2 != NULL, "CreateEvent failed\n");
- call_func2(p__StructuredTaskCollection_ctor, &task_coll, NULL);
- /* test that all chores are run in parallel */
- setup_chore(&chore1, chore1_cb);
- setup_chore(&chore2, chore2_cb);
- call_func2(p__StructuredTaskCollection__Schedule, &task_coll, &chore1);
Please test chore structure fields after the call. The tests also missed that the chore is already executed when _Schedule is called.
- call_func2(p__StructuredTaskCollection__Schedule, &task_coll, &chore2);
- status = call_func2(p__StructuredTaskCollection__RunAndWait, &task_coll, NULL);status = p__StructuredTaskCollection__RunAndWait(&task_coll, NULL);
Thanks, Piotr
Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- v4 -> v5: Merged in the implementation of StructuredTaskCollection_ctor and StructuredTaskCollection_dtor. Added the removal of test todos.
dlls/msvcr120/tests/msvcr120.c | 4 +- dlls/msvcrt/concurrency.c | 161 +++++++++++++++++++++++++++++++-- 2 files changed, 154 insertions(+), 11 deletions(-)
diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index d1367e274f3..7ea87b0123f 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -851,8 +851,8 @@ static void test_StructuredTaskCollection(void) call_func2(p__StructuredTaskCollection__Schedule, &task_coll, &chore2); status = call_func2(p__StructuredTaskCollection__RunAndWait, &task_coll, NULL); ok(status == 1, "_StructuredTaskCollection::_RunAndWait failed: %d\n", status); - todo_wine ok(chore1_executed, "_StructuredTaskCollection::_RunAndWait did not execute chore1\n"); - todo_wine ok(chore2_executed, "_StructuredTaskCollection::_RunAndWait did not execute chore2\n"); + ok(chore1_executed, "_StructuredTaskCollection::_RunAndWait did not execute chore1\n"); + ok(chore2_executed, "_StructuredTaskCollection::_RunAndWait did not execute chore2\n");
call_func1(p__StructuredTaskCollection_dtor, &task_coll);
diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 7712b93f1a3..7ede7d8b6a7 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -22,8 +22,10 @@ #include <stdbool.h>
#include "windef.h" +#include "winbase.h" #include "winternl.h" #include "wine/debug.h" +#include "wine/exception.h" #include "msvcrt.h" #include "cxx.h"
@@ -176,14 +178,39 @@ typedef struct cs_queue
#if _MSVCR_VER >= 100
-typedef struct -{ - char dummy; +/* This class seems to be 80 bytes big on x86-64, judging by the addresses passed in to + StructuredTaskCollection__RunAndWait */ +typedef struct UnrealizedChore +{ + void *unk1; + void (__cdecl *callback)(struct UnrealizedChore *this, void *unk); + void *unk2; + void *unk3; + void *unk4; + void *unk5; + void *unk6; + void *unk7; + void *unk8; + void *unk9; } UnrealizedChore;
+typedef struct StructuredTaskCollectionChoresEntry +{ + struct StructuredTaskCollectionChoresEntry *next; + UnrealizedChore *chore; + TP_WORK *work; + volatile LONG *waiting_on_ptr; +} StructuredTaskCollectionChoresEntry; + typedef struct { - char dummy; + void *unk1; + unsigned int unk2; + void *unk3; + StructuredTaskCollectionChoresEntry *volatile unk_chores; + unsigned int count; + unsigned int unk5; + void *unk6; } StructuredTaskCollection;
#endif /* _MSVCR_VER >= 100 */ @@ -1763,7 +1790,9 @@ bool __thiscall SpinWait__SpinOnce(SpinWait *this) DEFINE_THISCALL_WRAPPER(StructuredTaskCollection_ctor, 8) void __thiscall StructuredTaskCollection_ctor(StructuredTaskCollection *this, void *unk) { - FIXME("(%p): stub!\n", this); + FIXME("(%p): semi-stub!\n", this); + + memset(this, 0, sizeof(*this)); }
#endif /* _MSVCR_VER >= 100 */ @@ -1776,21 +1805,123 @@ void __thiscall StructuredTaskCollection_ctor(StructuredTaskCollection *this, vo DEFINE_THISCALL_WRAPPER(StructuredTaskCollection_dtor, 4) void __thiscall StructuredTaskCollection_dtor(StructuredTaskCollection *this) { - FIXME("(%p): stub!\n", this); + StructuredTaskCollectionChoresEntry *entry, *next; + + TRACE("(%p)\n", this); + + for (entry = this->unk_chores; entry; entry = next) + { + next = entry->next; + operator_delete(entry); + } }
#endif /* _MSVCR_VER >= 120 */
#if _MSVCR_VER >= 100
+static void CALLBACK StructuredTaskCollection_threadpool_cb_finally(BOOL normal, void *data) +{ + StructuredTaskCollectionChoresEntry *entry = data; + + TRACE("(%u %p)\n", normal, data); + + if (entry->waiting_on_ptr && InterlockedDecrement(entry->waiting_on_ptr) == 0) + RtlWakeAddressSingle((void*)entry->waiting_on_ptr); +} + +static inline void StructuredTaskCollection_run_chore(UnrealizedChore *chore, void* unk) +{ + if (chore->callback) + chore->callback(chore, unk); +} + +static void WINAPI StructuredTaskCollection_threadpool_cb(TP_CALLBACK_INSTANCE *inst, void *data, TP_WORK *work) +{ + StructuredTaskCollectionChoresEntry *entry = data; + + TRACE("(%p %p)\n", inst, data); + + __TRY + { + StructuredTaskCollection_run_chore(entry->chore, NULL); + } + __FINALLY_CTX(StructuredTaskCollection_threadpool_cb_finally, data) +} + /* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z */ /* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z */ /* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z */ DEFINE_THISCALL_WRAPPER(StructuredTaskCollection__RunAndWait, 8) /*enum Concurrency::details::_TaskCollectionStatus*/int __thiscall StructuredTaskCollection__RunAndWait(StructuredTaskCollection *this, UnrealizedChore *chore) { - FIXME("(%p %p): stub!\n", this, chore); - return 1; + StructuredTaskCollectionChoresEntry *chores, *entry, *next; + LONG total_count = 0, created_count = 0; + TP_POOL *tpool = NULL; + TP_CALLBACK_ENVIRON cbenv; + volatile LONG waiting_on = 0; + int ret = 1; + LONG val; + + TRACE("(%p %p)\n", this, chore); + + chores = InterlockedExchangePointer((void *volatile *)&this->unk_chores, NULL); + this->count = 0; + + if (!chores) + return ret; + + for (entry = chores; entry; entry = entry->next) + total_count++; + + tpool = CreateThreadpool(NULL); + if (!tpool || !SetThreadpoolThreadMinimum(tpool, total_count)) + goto done; + SetThreadpoolThreadMaximum(tpool, total_count); + + memset(&cbenv, 0, sizeof(cbenv)); + cbenv.Version = 1; + cbenv.Pool = tpool; + + for (entry = chores; entry; entry = entry->next) + { + entry->waiting_on_ptr = &waiting_on; + entry->work = CreateThreadpoolWork(StructuredTaskCollection_threadpool_cb, entry, &cbenv); + if (!entry->work) + { + ret = 0; + goto done; + } + created_count++; + } + + InterlockedExchange(&waiting_on, created_count); + for (entry = chores; entry; entry = entry->next) + SubmitThreadpoolWork(entry->work); + + if (chore) + StructuredTaskCollection_run_chore(chore, NULL); + + TRACE("waiting on %lu workers\n", created_count); + + while ((val = InterlockedCompareExchange(&waiting_on, 0, 0))) + RtlWaitOnAddress((void*)&waiting_on, (void*)&val, sizeof(waiting_on), NULL); + +done: + for (entry = chores; entry; entry = next) + { + if (created_count > 0) + { + CloseThreadpoolWork(entry->work); + created_count--; + } + next = entry->next; + operator_delete(entry); + } + + if (tpool) CloseThreadpool(tpool); + + return ret; }
/* ?_Schedule@_StructuredTaskCollection@details@Concurrency@@QAAXPAV_UnrealizedChore@23@@Z */ @@ -1799,7 +1930,19 @@ DEFINE_THISCALL_WRAPPER(StructuredTaskCollection__RunAndWait, 8) DEFINE_THISCALL_WRAPPER(StructuredTaskCollection__Schedule, 8) void __thiscall StructuredTaskCollection__Schedule(StructuredTaskCollection *this, UnrealizedChore *chore) { - FIXME("(%p %p): stub!\n", this, chore); + StructuredTaskCollectionChoresEntry *entry, *next; + + TRACE("(%p %p)\n", this, chore); + + entry = operator_new(sizeof(StructuredTaskCollectionChoresEntry)); + entry->chore = chore; + do + { + next = this->unk_chores; + entry->next = next; + } + while (InterlockedCompareExchangePointer((void *volatile *)&this->unk_chores, entry, next) != next); + this->count++; }
#endif /* _MSVCR_VER >= 100 */
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=112959
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
msvcr120: 039c:msvcr120: unhandled exception c0000005 at 725F8182
=== w7u_adm (32 bit report) ===
msvcr120: 0870:msvcr120: unhandled exception c0000005 at 6EDD8182
=== w7u_el (32 bit report) ===
msvcr120: 086c:msvcr120: unhandled exception c0000005 at 729B8182
=== w1064v1809 (32 bit report) ===
msvcr120: 1f5c:msvcr120: unhandled exception c0000005 at 737C7ECA
=== w1064 (32 bit report) ===
msvcr120: 1358:msvcr120: unhandled exception c0000005 at 74AE7ECA
=== w1064_tsign (32 bit report) ===
msvcr120: 1b98:msvcr120: unhandled exception c0000005 at 751F7ECA
=== w10pro64 (32 bit report) ===
msvcr120: 0248:msvcr120: unhandled exception c0000005 at 6F6D8182
The pointer is needed for Crazy Machines 3 to not crash.
Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- v4 -> v5: Merged into this patchset
dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcrt/concurrency.c | 19 +++++++++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 950c7d76015..9879526aa55 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -19,7 +19,7 @@ @ stub -arch=win64 ??0_CancellationTokenState@details@Concurrency@@AEAA@XZ @ stub -arch=arm ??0_Cancellation_beacon@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??0_Cancellation_beacon@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??0_Cancellation_beacon@details@Concurrency@@QEAA@XZ +@ cdecl -arch=win64 ??0_Cancellation_beacon@details@Concurrency@@QEAA@XZ(ptr) _Cancellation_beacon_ctor @ cdecl -arch=arm ??0_Condition_variable@details@Concurrency@@QAA@XZ(ptr) _Condition_variable_ctor @ thiscall -arch=i386 ??0_Condition_variable@details@Concurrency@@QAE@XZ(ptr) _Condition_variable_ctor @ cdecl -arch=win64 ??0_Condition_variable@details@Concurrency@@QEAA@XZ(ptr) _Condition_variable_ctor diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index bdb594d3296..cbc6a161765 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -16,7 +16,7 @@ @ cdecl -arch=win64 ??0SchedulerPolicy@Concurrency@@QEAA@XZ(ptr) SchedulerPolicy_ctor @ stub -arch=arm ??0_Cancellation_beacon@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??0_Cancellation_beacon@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??0_Cancellation_beacon@details@Concurrency@@QEAA@XZ +@ cdecl -arch=win64 ??0_Cancellation_beacon@details@Concurrency@@QEAA@XZ(ptr) _Cancellation_beacon_ctor @ cdecl -arch=arm ??0_Condition_variable@details@Concurrency@@QAA@XZ(ptr) _Condition_variable_ctor @ thiscall -arch=i386 ??0_Condition_variable@details@Concurrency@@QAE@XZ(ptr) _Condition_variable_ctor @ cdecl -arch=win64 ??0_Condition_variable@details@Concurrency@@QEAA@XZ(ptr) _Condition_variable_ctor diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index e4d9146e514..dcd77a3cf07 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -14,7 +14,7 @@ @ cdecl -arch=win64 ??0SchedulerPolicy@Concurrency@@QEAA@XZ(ptr) msvcr120.??0SchedulerPolicy@Concurrency@@QEAA@XZ @ stub -arch=arm ??0_Cancellation_beacon@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??0_Cancellation_beacon@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??0_Cancellation_beacon@details@Concurrency@@QEAA@XZ +@ cdecl -arch=win64 ??0_Cancellation_beacon@details@Concurrency@@QEAA@XZ(ptr) msvcr120.??0_Cancellation_beacon@details@Concurrency@@QEAA@XZ @ cdecl -arch=arm ??0_Condition_variable@details@Concurrency@@QAA@XZ(ptr) msvcr120.??0_Condition_variable@details@Concurrency@@QAA@XZ @ thiscall -arch=i386 ??0_Condition_variable@details@Concurrency@@QAE@XZ(ptr) msvcr120.??0_Condition_variable@details@Concurrency@@QAE@XZ @ cdecl -arch=win64 ??0_Condition_variable@details@Concurrency@@QEAA@XZ(ptr) msvcr120.??0_Condition_variable@details@Concurrency@@QEAA@XZ diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 7ede7d8b6a7..d497acd0e95 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -308,6 +308,10 @@ typedef struct cv_queue { LONG expired; } cv_queue;
+typedef struct { + void *unknown; +} _Cancellation_beacon; + typedef struct { /* cv_queue structure is not binary compatible */ cv_queue *queue; @@ -2507,6 +2511,21 @@ int __cdecl event_wait_for_multiple(event **events, size_t count, bool wait_all,
#if _MSVCR_VER >= 110
+struct { + void *unk; +} _Cancellation_beacon_unknown = { + 0x0 +}; + +/* ??0_Cancellation_beacon@details@Concurrency@@QEAA@XZ */ +DEFINE_THISCALL_WRAPPER(_Cancellation_beacon_ctor, 4) +_Cancellation_beacon* __thiscall _Cancellation_beacon_ctor(_Cancellation_beacon *this) +{ + FIXME("(%p): stub!\n", this); + this->unknown = &_Cancellation_beacon_unknown; + return this; +} + /* ??0_Condition_variable@details@Concurrency@@QAE@XZ */ /* ??0_Condition_variable@details@Concurrency@@QEAA@XZ */ DEFINE_THISCALL_WRAPPER(_Condition_variable_ctor, 4)
Signed-off-by: Torge Matthies tmatthies@codeweavers.com --- v4 -> v5: Merged into this patchset
dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcrt/concurrency.c | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 9879526aa55..77e0b103b71 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -277,7 +277,7 @@ @ stub -arch=win64 ??1_CancellationTokenState@details@Concurrency@@UEAA@XZ @ stub -arch=arm ??1_Cancellation_beacon@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_Cancellation_beacon@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??1_Cancellation_beacon@details@Concurrency@@QEAA@XZ +@ cdecl -arch=win64 ??1_Cancellation_beacon@details@Concurrency@@QEAA@XZ(ptr) _Cancellation_beacon_dtor @ cdecl -arch=arm ??1_Condition_variable@details@Concurrency@@QAA@XZ(ptr) _Condition_variable_dtor @ thiscall -arch=i386 ??1_Condition_variable@details@Concurrency@@QAE@XZ(ptr) _Condition_variable_dtor @ cdecl -arch=win64 ??1_Condition_variable@details@Concurrency@@QEAA@XZ(ptr) _Condition_variable_dtor diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index cbc6a161765..bca8b8562fc 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -271,7 +271,7 @@ @ cdecl -arch=win64 ??1SchedulerPolicy@Concurrency@@QEAA@XZ(ptr) SchedulerPolicy_dtor @ stub -arch=arm ??1_Cancellation_beacon@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_Cancellation_beacon@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??1_Cancellation_beacon@details@Concurrency@@QEAA@XZ +@ cdecl -arch=win64 ??1_Cancellation_beacon@details@Concurrency@@QEAA@XZ(ptr) _Cancellation_beacon_dtor @ cdecl -arch=arm ??1_Condition_variable@details@Concurrency@@QAA@XZ(ptr) _Condition_variable_dtor @ thiscall -arch=i386 ??1_Condition_variable@details@Concurrency@@QAE@XZ(ptr) _Condition_variable_dtor @ cdecl -arch=win64 ??1_Condition_variable@details@Concurrency@@QEAA@XZ(ptr) _Condition_variable_dtor diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index dcd77a3cf07..5d77bea91f8 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -269,7 +269,7 @@ @ cdecl -arch=win64 ??1SchedulerPolicy@Concurrency@@QEAA@XZ(ptr) msvcr120.??1SchedulerPolicy@Concurrency@@QEAA@XZ @ stub -arch=arm ??1_Cancellation_beacon@details@Concurrency@@QAA@XZ @ stub -arch=i386 ??1_Cancellation_beacon@details@Concurrency@@QAE@XZ -@ stub -arch=win64 ??1_Cancellation_beacon@details@Concurrency@@QEAA@XZ +@ cdecl -arch=win64 ??1_Cancellation_beacon@details@Concurrency@@QEAA@XZ(ptr) msvcr120.??1_Cancellation_beacon@details@Concurrency@@QEAA@XZ @ cdecl -arch=arm ??1_Condition_variable@details@Concurrency@@QAA@XZ(ptr) msvcr120.??1_Condition_variable@details@Concurrency@@QAA@XZ @ thiscall -arch=i386 ??1_Condition_variable@details@Concurrency@@QAE@XZ(ptr) msvcr120.??1_Condition_variable@details@Concurrency@@QAE@XZ @ cdecl -arch=win64 ??1_Condition_variable@details@Concurrency@@QEAA@XZ(ptr) msvcr120.??1_Condition_variable@details@Concurrency@@QEAA@XZ diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index d497acd0e95..eecf737d70e 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -2526,6 +2526,13 @@ _Cancellation_beacon* __thiscall _Cancellation_beacon_ctor(_Cancellation_beacon return this; }
+/* ??1_Cancellation_beacon@details@Concurrency@@QEAA@XZ */ +DEFINE_THISCALL_WRAPPER(_Cancellation_beacon_dtor, 4) +void __thiscall _Cancellation_beacon_dtor(_Cancellation_beacon *this) +{ + FIXME("(%p): stub!\n", this); +} + /* ??0_Condition_variable@details@Concurrency@@QAE@XZ */ /* ??0_Condition_variable@details@Concurrency@@QEAA@XZ */ DEFINE_THISCALL_WRAPPER(_Condition_variable_ctor, 4)