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
1654116d
Commit
1654116d
authored
Mar 13, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Use newer threadpool environment structure.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
733b4385
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
queue.c
dlls/mfplat/queue.c
+8
-5
No files found.
dlls/mfplat/queue.c
View file @
1654116d
...
...
@@ -62,7 +62,7 @@ struct work_item
struct
queue
{
TP_POOL
*
pool
;
TP_CALLBACK_ENVIRON
env
;
TP_CALLBACK_ENVIRON
_V3
env
;
CRITICAL_SECTION
cs
;
struct
list
pending_items
;
};
...
...
@@ -163,10 +163,13 @@ static void init_work_queue(MFASYNC_WORKQUEUE_TYPE queue_type, struct queue *que
unsigned
int
max_thread
;
queue
->
pool
=
CreateThreadpool
(
NULL
);
queue
->
env
.
Version
=
1
;
memset
(
&
queue
->
env
,
0
,
sizeof
(
queue
->
env
));
queue
->
env
.
Version
=
3
;
queue
->
env
.
Size
=
sizeof
(
queue
->
env
);
queue
->
env
.
Pool
=
queue
->
pool
;
queue
->
env
.
CleanupGroup
=
CreateThreadpoolCleanupGroup
();
queue
->
env
.
CleanupGroupCancelCallback
=
standard_queue_cleanup_callback
;
queue
->
env
.
CallbackPriority
=
TP_CALLBACK_PRIORITY_NORMAL
;
list_init
(
&
queue
->
pending_items
);
InitializeCriticalSection
(
&
queue
->
cs
);
...
...
@@ -344,7 +347,7 @@ static HRESULT queue_submit_item(struct queue *queue, IMFAsyncResult *result)
if
(
!
(
item
=
alloc_work_item
(
queue
,
result
)))
return
E_OUTOFMEMORY
;
work_object
=
CreateThreadpoolWork
(
standard_queue_worker
,
item
,
&
queue
->
env
);
work_object
=
CreateThreadpoolWork
(
standard_queue_worker
,
item
,
(
TP_CALLBACK_ENVIRON
*
)
&
queue
->
env
);
SubmitThreadpoolWork
(
work_object
);
TRACE
(
"dispatched %p.
\n
"
,
result
);
...
...
@@ -483,7 +486,7 @@ static HRESULT queue_submit_wait(struct queue *queue, HANDLE event, LONG priorit
else
callback
=
waiting_item_callback
;
item
->
u
.
wait_object
=
CreateThreadpoolWait
(
callback
,
item
,
&
queue
->
env
);
item
->
u
.
wait_object
=
CreateThreadpoolWait
(
callback
,
item
,
(
TP_CALLBACK_ENVIRON
*
)
&
queue
->
env
);
SetThreadpoolWait
(
item
->
u
.
wait_object
,
event
,
NULL
);
TRACE
(
"dispatched %p.
\n
"
,
result
);
...
...
@@ -516,7 +519,7 @@ static HRESULT queue_submit_timer(struct queue *queue, IMFAsyncResult *result, I
filetime
.
dwLowDateTime
=
t
.
u
.
LowPart
;
filetime
.
dwHighDateTime
=
t
.
u
.
HighPart
;
item
->
u
.
timer_object
=
CreateThreadpoolTimer
(
callback
,
item
,
&
queue
->
env
);
item
->
u
.
timer_object
=
CreateThreadpoolTimer
(
callback
,
item
,
(
TP_CALLBACK_ENVIRON
*
)
&
queue
->
env
);
SetThreadpoolTimer
(
item
->
u
.
timer_object
,
&
filetime
,
period
,
0
);
TRACE
(
"dispatched %p.
\n
"
,
result
);
...
...
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