msvcrt: Add ThreadScheduler::Id implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5debf060b8
commit
118271c5f2
|
@ -34,6 +34,7 @@
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||||
|
|
||||||
static int context_id = -1;
|
static int context_id = -1;
|
||||||
|
static int scheduler_id = -1;
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
|
|
||||||
|
@ -109,6 +110,7 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Scheduler scheduler;
|
Scheduler scheduler;
|
||||||
|
unsigned int id;
|
||||||
SchedulerPolicy policy;
|
SchedulerPolicy policy;
|
||||||
} ThreadScheduler;
|
} ThreadScheduler;
|
||||||
extern const vtable_ptr MSVCRT_ThreadScheduler_vtable;
|
extern const vtable_ptr MSVCRT_ThreadScheduler_vtable;
|
||||||
|
@ -519,8 +521,8 @@ void __thiscall SchedulerPolicy_dtor(SchedulerPolicy *this)
|
||||||
DEFINE_THISCALL_WRAPPER(ThreadScheduler_Id, 4)
|
DEFINE_THISCALL_WRAPPER(ThreadScheduler_Id, 4)
|
||||||
unsigned int __thiscall ThreadScheduler_Id(const ThreadScheduler *this)
|
unsigned int __thiscall ThreadScheduler_Id(const ThreadScheduler *this)
|
||||||
{
|
{
|
||||||
FIXME("(%p) stub\n", this);
|
TRACE("(%p)\n", this);
|
||||||
return 0;
|
return this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_THISCALL_WRAPPER(ThreadScheduler_GetNumberOfVirtualProcessors, 4)
|
DEFINE_THISCALL_WRAPPER(ThreadScheduler_GetNumberOfVirtualProcessors, 4)
|
||||||
|
@ -632,6 +634,7 @@ static ThreadScheduler* ThreadScheduler_ctor(ThreadScheduler *this,
|
||||||
TRACE("(%p)->()\n", this);
|
TRACE("(%p)->()\n", this);
|
||||||
|
|
||||||
this->scheduler.vtable = &MSVCRT_ThreadScheduler_vtable;
|
this->scheduler.vtable = &MSVCRT_ThreadScheduler_vtable;
|
||||||
|
this->id = InterlockedIncrement(&scheduler_id);
|
||||||
SchedulerPolicy_copy_ctor(&this->policy, policy);
|
SchedulerPolicy_copy_ctor(&this->policy, policy);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue