From b77542f9a210f46d21fa54191207de28f6b5a4a0 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 30 Mar 2017 22:47:36 +0200 Subject: [PATCH] msvcrt: Add CurrentScheduler::Create implementation. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcrt/cxx.h | 1 + dlls/msvcrt/scheduler.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/cxx.h b/dlls/msvcrt/cxx.h index 700ca8bee29..aefebdc0198 100644 --- a/dlls/msvcrt/cxx.h +++ b/dlls/msvcrt/cxx.h @@ -268,6 +268,7 @@ extern void *vtbl_wrapper_0; extern void *vtbl_wrapper_4; extern void *vtbl_wrapper_8; extern void *vtbl_wrapper_20; +extern void *vtbl_wrapper_28; #else diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index 11cb7c1d0df..4a8eb8e9758 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -50,6 +50,7 @@ DEFINE_VTBL_WRAPPER(0); DEFINE_VTBL_WRAPPER(4); DEFINE_VTBL_WRAPPER(8); DEFINE_VTBL_WRAPPER(20); +DEFINE_VTBL_WRAPPER(28); #endif @@ -114,6 +115,7 @@ typedef struct Scheduler { const vtable_ptr *vtable; } Scheduler; #define call_Scheduler_Release(this) CALL_VTBL_FUNC(this, 20, unsigned int, (Scheduler*), (this)) +#define call_Scheduler_Attach(this) CALL_VTBL_FUNC(this, 28, void, (Scheduler*), (this)) typedef struct { Scheduler scheduler; @@ -757,7 +759,12 @@ void __cdecl Scheduler_SetDefaultSchedulerPolicy(const SchedulerPolicy *policy) /* ?Create@CurrentScheduler@Concurrency@@SAXAEBVSchedulerPolicy@2@@Z */ void __cdecl CurrentScheduler_Create(const SchedulerPolicy *policy) { - FIXME("(%p) stub\n", policy); + Scheduler *scheduler; + + TRACE("(%p)\n", policy); + + scheduler = Scheduler_Create(policy); + call_Scheduler_Attach(scheduler); } /* ?Detach@CurrentScheduler@Concurrency@@SAXXZ */