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
570c969e
Commit
570c969e
authored
Feb 11, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtworkq: Store item priority and callback flags.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a4143e21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
queue.c
dlls/rtworkq/queue.c
+12
-4
No files found.
dlls/rtworkq/queue.c
View file @
570c969e
...
@@ -115,6 +115,8 @@ struct work_item
...
@@ -115,6 +115,8 @@ struct work_item
IRtwqAsyncResult
*
result
;
IRtwqAsyncResult
*
result
;
struct
queue
*
queue
;
struct
queue
*
queue
;
RTWQWORKITEM_KEY
key
;
RTWQWORKITEM_KEY
key
;
LONG
priority
;
DWORD
flags
;
union
union
{
{
TP_WAIT
*
wait_object
;
TP_WAIT
*
wait_object
;
...
@@ -204,8 +206,10 @@ static const IUnknownVtbl work_item_vtbl =
...
@@ -204,8 +206,10 @@ static const IUnknownVtbl work_item_vtbl =
work_item_Release
,
work_item_Release
,
};
};
static
struct
work_item
*
alloc_work_item
(
struct
queue
*
queue
,
IRtwqAsyncResult
*
result
)
static
struct
work_item
*
alloc_work_item
(
struct
queue
*
queue
,
LONG
priority
,
IRtwqAsyncResult
*
result
)
{
{
RTWQASYNCRESULT
*
async_result
=
(
RTWQASYNCRESULT
*
)
result
;
DWORD
flags
=
0
,
queue_id
=
0
;
struct
work_item
*
item
;
struct
work_item
*
item
;
item
=
heap_alloc_zero
(
sizeof
(
*
item
));
item
=
heap_alloc_zero
(
sizeof
(
*
item
));
...
@@ -216,6 +220,10 @@ static struct work_item * alloc_work_item(struct queue *queue, IRtwqAsyncResult
...
@@ -216,6 +220,10 @@ static struct work_item * alloc_work_item(struct queue *queue, IRtwqAsyncResult
item
->
refcount
=
1
;
item
->
refcount
=
1
;
item
->
queue
=
queue
;
item
->
queue
=
queue
;
list_init
(
&
item
->
entry
);
list_init
(
&
item
->
entry
);
item
->
priority
=
priority
;
if
(
SUCCEEDED
(
IRtwqAsyncCallback_GetParameters
(
async_result
->
pCallback
,
&
flags
,
&
queue_id
)))
item
->
flags
=
flags
;
return
item
;
return
item
;
}
}
...
@@ -377,7 +385,7 @@ static HRESULT queue_submit_item(struct queue *queue, LONG priority, IRtwqAsyncR
...
@@ -377,7 +385,7 @@ static HRESULT queue_submit_item(struct queue *queue, LONG priority, IRtwqAsyncR
struct
work_item
*
item
;
struct
work_item
*
item
;
TP_WORK
*
work_object
;
TP_WORK
*
work_object
;
if
(
!
(
item
=
alloc_work_item
(
queue
,
result
)))
if
(
!
(
item
=
alloc_work_item
(
queue
,
priority
,
result
)))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
if
(
priority
==
0
)
if
(
priority
==
0
)
...
@@ -515,7 +523,7 @@ static HRESULT queue_submit_wait(struct queue *queue, HANDLE event, LONG priorit
...
@@ -515,7 +523,7 @@ static HRESULT queue_submit_wait(struct queue *queue, HANDLE event, LONG priorit
PTP_WAIT_CALLBACK
callback
;
PTP_WAIT_CALLBACK
callback
;
struct
work_item
*
item
;
struct
work_item
*
item
;
if
(
!
(
item
=
alloc_work_item
(
queue
,
result
)))
if
(
!
(
item
=
alloc_work_item
(
queue
,
priority
,
result
)))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
if
(
key
)
if
(
key
)
...
@@ -543,7 +551,7 @@ static HRESULT queue_submit_timer(struct queue *queue, IRtwqAsyncResult *result,
...
@@ -543,7 +551,7 @@ static HRESULT queue_submit_timer(struct queue *queue, IRtwqAsyncResult *result,
FILETIME
filetime
;
FILETIME
filetime
;
LARGE_INTEGER
t
;
LARGE_INTEGER
t
;
if
(
!
(
item
=
alloc_work_item
(
queue
,
result
)))
if
(
!
(
item
=
alloc_work_item
(
queue
,
0
,
result
)))
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
if
(
key
)
if
(
key
)
...
...
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