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
d22275a1
Commit
d22275a1
authored
Aug 24, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr100: Set scheduler in tasks created with ScheduleTask function.
parent
581a35d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
concurrency.c
dlls/msvcrt/concurrency.c
+17
-0
No files found.
dlls/msvcrt/concurrency.c
View file @
d22275a1
...
@@ -1329,15 +1329,29 @@ typedef struct
...
@@ -1329,15 +1329,29 @@ typedef struct
{
{
void
(
__cdecl
*
proc
)(
void
*
);
void
(
__cdecl
*
proc
)(
void
*
);
void
*
data
;
void
*
data
;
ThreadScheduler
*
scheduler
;
}
schedule_task_arg
;
}
schedule_task_arg
;
void
__cdecl
CurrentScheduler_Detach
(
void
);
static
void
WINAPI
schedule_task_proc
(
PTP_CALLBACK_INSTANCE
instance
,
void
*
context
,
PTP_WORK
work
)
static
void
WINAPI
schedule_task_proc
(
PTP_CALLBACK_INSTANCE
instance
,
void
*
context
,
PTP_WORK
work
)
{
{
schedule_task_arg
arg
;
schedule_task_arg
arg
;
BOOL
detach
=
FALSE
;
arg
=
*
(
schedule_task_arg
*
)
context
;
arg
=
*
(
schedule_task_arg
*
)
context
;
operator_delete
(
context
);
operator_delete
(
context
);
if
(
&
arg
.
scheduler
->
scheduler
!=
try_get_current_scheduler
())
{
ThreadScheduler_Attach
(
arg
.
scheduler
);
detach
=
TRUE
;
}
ThreadScheduler_Release
(
arg
.
scheduler
);
arg
.
proc
(
arg
.
data
);
arg
.
proc
(
arg
.
data
);
if
(
detach
)
CurrentScheduler_Detach
();
}
}
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_ScheduleTask_loc
,
16
)
DEFINE_THISCALL_WRAPPER
(
ThreadScheduler_ScheduleTask_loc
,
16
)
...
@@ -1352,11 +1366,14 @@ void __thiscall ThreadScheduler_ScheduleTask_loc(ThreadScheduler *this,
...
@@ -1352,11 +1366,14 @@ void __thiscall ThreadScheduler_ScheduleTask_loc(ThreadScheduler *this,
arg
=
operator_new
(
sizeof
(
*
arg
));
arg
=
operator_new
(
sizeof
(
*
arg
));
arg
->
proc
=
proc
;
arg
->
proc
=
proc
;
arg
->
data
=
data
;
arg
->
data
=
data
;
arg
->
scheduler
=
this
;
ThreadScheduler_Reference
(
this
);
work
=
CreateThreadpoolWork
(
schedule_task_proc
,
arg
,
NULL
);
work
=
CreateThreadpoolWork
(
schedule_task_proc
,
arg
,
NULL
);
if
(
!
work
)
{
if
(
!
work
)
{
scheduler_resource_allocation_error
e
;
scheduler_resource_allocation_error
e
;
ThreadScheduler_Release
(
this
);
operator_delete
(
arg
);
operator_delete
(
arg
);
scheduler_resource_allocation_error_ctor_name
(
&
e
,
NULL
,
scheduler_resource_allocation_error_ctor_name
(
&
e
,
NULL
,
HRESULT_FROM_WIN32
(
GetLastError
()));
HRESULT_FROM_WIN32
(
GetLastError
()));
...
...
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