[PATCH 2/5] msvcr110: Add _Cancellation_beacon::_Cancellation_beacon_ctor stub.
Torge Matthies
tmatthies at codeweavers.com
Tue Jul 12 15:49:22 CDT 2022
The pointer is needed for Crazy Machines 3 to not crash.
Signed-off-by: Torge Matthies <tmatthies at codeweavers.com>
---
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 24e7630194c..a1da7d8eb0e 100644
--- a/dlls/msvcr110/msvcr110.spec
+++ b/dlls/msvcr110/msvcr110.spec
@@ -19,7 +19,7 @@
@ stub -arch=win64 ??0_CancellationTokenState at details@Concurrency@@AEAA at XZ
@ stub -arch=arm ??0_Cancellation_beacon at details@Concurrency@@QAA at XZ
@ stub -arch=i386 ??0_Cancellation_beacon at details@Concurrency@@QAE at XZ
-@ stub -arch=win64 ??0_Cancellation_beacon at details@Concurrency@@QEAA at XZ
+@ cdecl -arch=win64 ??0_Cancellation_beacon at details@Concurrency@@QEAA at XZ(ptr) _Cancellation_beacon_ctor
@ cdecl -arch=arm ??0_Condition_variable at details@Concurrency@@QAA at XZ(ptr) _Condition_variable_ctor
@ thiscall -arch=i386 ??0_Condition_variable at details@Concurrency@@QAE at XZ(ptr) _Condition_variable_ctor
@ cdecl -arch=win64 ??0_Condition_variable at details@Concurrency@@QEAA at XZ(ptr) _Condition_variable_ctor
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index b1258dad5de..a95a254bc7e 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -16,7 +16,7 @@
@ cdecl -arch=win64 ??0SchedulerPolicy at Concurrency@@QEAA at XZ(ptr) SchedulerPolicy_ctor
@ stub -arch=arm ??0_Cancellation_beacon at details@Concurrency@@QAA at XZ
@ stub -arch=i386 ??0_Cancellation_beacon at details@Concurrency@@QAE at XZ
-@ stub -arch=win64 ??0_Cancellation_beacon at details@Concurrency@@QEAA at XZ
+@ cdecl -arch=win64 ??0_Cancellation_beacon at details@Concurrency@@QEAA at XZ(ptr) _Cancellation_beacon_ctor
@ cdecl -arch=arm ??0_Condition_variable at details@Concurrency@@QAA at XZ(ptr) _Condition_variable_ctor
@ thiscall -arch=i386 ??0_Condition_variable at details@Concurrency@@QAE at XZ(ptr) _Condition_variable_ctor
@ cdecl -arch=win64 ??0_Condition_variable at details@Concurrency@@QEAA at XZ(ptr) _Condition_variable_ctor
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index 93ce779ea69..c2ce2b11811 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -14,7 +14,7 @@
@ cdecl -arch=win64 ??0SchedulerPolicy at Concurrency@@QEAA at XZ(ptr) msvcr120.??0SchedulerPolicy at Concurrency@@QEAA at XZ
@ stub -arch=arm ??0_Cancellation_beacon at details@Concurrency@@QAA at XZ
@ stub -arch=i386 ??0_Cancellation_beacon at details@Concurrency@@QAE at XZ
-@ stub -arch=win64 ??0_Cancellation_beacon at details@Concurrency@@QEAA at XZ
+@ cdecl -arch=win64 ??0_Cancellation_beacon at details@Concurrency@@QEAA at XZ(ptr) msvcr120.??0_Cancellation_beacon at details@Concurrency@@QEAA at XZ
@ cdecl -arch=arm ??0_Condition_variable at details@Concurrency@@QAA at XZ(ptr) msvcr120.??0_Condition_variable at details@Concurrency@@QAA at XZ
@ thiscall -arch=i386 ??0_Condition_variable at details@Concurrency@@QAE at XZ(ptr) msvcr120.??0_Condition_variable at details@Concurrency@@QAE at XZ
@ cdecl -arch=win64 ??0_Condition_variable at details@Concurrency@@QEAA at XZ(ptr) msvcr120.??0_Condition_variable at details@Concurrency@@QEAA at XZ
diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c
index c982e367749..5fd8b8547dd 100644
--- a/dlls/msvcrt/concurrency.c
+++ b/dlls/msvcrt/concurrency.c
@@ -277,6 +277,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;
@@ -2395,6 +2399,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 at details@Concurrency@@QEAA at 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 at details@Concurrency@@QAE at XZ */
/* ??0_Condition_variable at details@Concurrency@@QEAA at XZ */
DEFINE_THISCALL_WRAPPER(_Condition_variable_ctor, 4)
--
2.37.0
More information about the wine-devel
mailing list