Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d9dcdb0d
Commit
d9dcdb0d
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::Release implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ac502ad0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
scheduler.c
dlls/msvcrt/scheduler.c
+19
-9
No files found.
dlls/msvcrt/scheduler.c
View file @
d9dcdb0d
...
...
@@ -110,6 +110,7 @@ typedef struct {
typedef
struct
{
Scheduler
scheduler
;
LONG
ref
;
unsigned
int
id
;
unsigned
int
virt_proc_no
;
SchedulerPolicy
policy
;
...
...
@@ -519,6 +520,12 @@ void __thiscall SchedulerPolicy_dtor(SchedulerPolicy *this)
MSVCRT_operator_delete
(
this
->
policy_container
);
}
static
void
ThreadScheduler_dtor
(
ThreadScheduler
*
this
)
{
if
(
this
->
ref
!=
0
)
WARN
(
"ref = %d
\n
"
,
this
->
ref
);
SchedulerPolicy_dtor
(
&
this
->
policy
);
}
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_Id
,
4
)
unsigned
int
__thiscall
ThreadScheduler_Id
(
const
ThreadScheduler
*
this
)
{
...
...
@@ -544,15 +551,22 @@ SchedulerPolicy* __thiscall ThreadScheduler_GetPolicy(
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_Reference
,
4
)
unsigned
int
__thiscall
ThreadScheduler_Reference
(
ThreadScheduler
*
this
)
{
FIXME
(
"(%p) stub
\n
"
,
this
);
return
0
;
TRACE
(
"(%p)
\n
"
,
this
);
return
InterlockedIncrement
(
&
this
->
ref
)
;
}
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_Release
,
4
)
unsigned
int
__thiscall
ThreadScheduler_Release
(
ThreadScheduler
*
this
)
{
FIXME
(
"(%p) stub
\n
"
,
this
);
return
0
;
unsigned
int
ret
=
InterlockedDecrement
(
&
this
->
ref
);
TRACE
(
"(%p)
\n
"
,
this
);
if
(
!
ret
)
{
ThreadScheduler_dtor
(
this
);
MSVCRT_operator_delete
(
this
);
}
return
ret
;
}
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_RegisterShutdownEvent
,
8
)
...
...
@@ -604,11 +618,6 @@ MSVCRT_bool __thiscall ThreadScheduler_IsAvailableLocation(
return
FALSE
;
}
static
void
ThreadScheduler_dtor
(
ThreadScheduler
*
this
)
{
SchedulerPolicy_dtor
(
&
this
->
policy
);
}
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_vector_dtor
,
8
)
Scheduler
*
__thiscall
ThreadScheduler_vector_dtor
(
ThreadScheduler
*
this
,
unsigned
int
flags
)
{
...
...
@@ -637,6 +646,7 @@ static ThreadScheduler* ThreadScheduler_ctor(ThreadScheduler *this,
TRACE
(
"(%p)->()
\n
"
,
this
);
this
->
scheduler
.
vtable
=
&
MSVCRT_ThreadScheduler_vtable
;
this
->
ref
=
1
;
this
->
id
=
InterlockedIncrement
(
&
scheduler_id
);
SchedulerPolicy_copy_ctor
(
&
this
->
policy
,
policy
);
...
...
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