Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5debf060
Commit
5debf060
authored
Mar 28, 2017
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add ThreadScheduler::GetPolicy implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bac1ca70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
22 deletions
+25
-22
scheduler.c
dlls/msvcrt/scheduler.c
+25
-22
No files found.
dlls/msvcrt/scheduler.c
View file @
5debf060
...
...
@@ -52,6 +52,26 @@ DEFINE_VTBL_WRAPPER(20);
#endif
typedef
enum
{
SchedulerKind
,
MaxConcurrency
,
MinConcurrency
,
TargetOversubscriptionFactor
,
LocalContextCacheSize
,
ContextStackSize
,
ContextPriority
,
SchedulingProtocol
,
DynamicProgressFeedback
,
WinRTInitialization
,
last_policy_id
}
PolicyElementKey
;
typedef
struct
{
struct
_policy_container
{
unsigned
int
policies
[
last_policy_id
];
}
*
policy_container
;
}
SchedulerPolicy
;
typedef
struct
{
const
vtable_ptr
*
vtable
;
}
Context
;
...
...
@@ -89,6 +109,7 @@ typedef struct {
typedef
struct
{
Scheduler
scheduler
;
SchedulerPolicy
policy
;
}
ThreadScheduler
;
extern
const
vtable_ptr
MSVCRT_ThreadScheduler_vtable
;
...
...
@@ -329,26 +350,6 @@ void CDECL Concurrency_Free(void* mem)
}
}
typedef
enum
{
SchedulerKind
,
MaxConcurrency
,
MinConcurrency
,
TargetOversubscriptionFactor
,
LocalContextCacheSize
,
ContextStackSize
,
ContextPriority
,
SchedulingProtocol
,
DynamicProgressFeedback
,
WinRTInitialization
,
last_policy_id
}
PolicyElementKey
;
typedef
struct
{
struct
_policy_container
{
unsigned
int
policies
[
last_policy_id
];
}
*
policy_container
;
}
SchedulerPolicy
;
/* ?SetPolicyValue@SchedulerPolicy@Concurrency@@QAEIW4PolicyElementKey@2@I@Z */
/* ?SetPolicyValue@SchedulerPolicy@Concurrency@@QEAAIW4PolicyElementKey@2@I@Z */
DEFINE_THISCALL_WRAPPER
(
SchedulerPolicy_SetPolicyValue
,
12
)
...
...
@@ -533,8 +534,8 @@ DEFINE_THISCALL_WRAPPER(ThreadScheduler_GetPolicy, 8)
SchedulerPolicy
*
__thiscall
ThreadScheduler_GetPolicy
(
const
ThreadScheduler
*
this
,
SchedulerPolicy
*
ret
)
{
FIXME
(
"(%p %p) stub
\n
"
,
this
,
ret
);
return
NULL
;
TRACE
(
"(%p %p)
\n
"
,
this
,
ret
);
return
SchedulerPolicy_copy_ctor
(
ret
,
&
this
->
policy
)
;
}
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_Reference
,
4
)
...
...
@@ -602,6 +603,7 @@ MSVCRT_bool __thiscall ThreadScheduler_IsAvailableLocation(
static
void
ThreadScheduler_dtor
(
ThreadScheduler
*
this
)
{
SchedulerPolicy_dtor
(
&
this
->
policy
);
}
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_vector_dtor
,
8
)
...
...
@@ -630,6 +632,7 @@ static ThreadScheduler* ThreadScheduler_ctor(ThreadScheduler *this,
TRACE
(
"(%p)->()
\n
"
,
this
);
this
->
scheduler
.
vtable
=
&
MSVCRT_ThreadScheduler_vtable
;
SchedulerPolicy_copy_ctor
(
&
this
->
policy
,
policy
);
return
this
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment