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
9277fcfd
Commit
9277fcfd
authored
Mar 10, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix possible race-condition in iocp poller code.
parent
3a72922e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
threadpool.c
dlls/ntdll/threadpool.c
+4
-2
No files found.
dlls/ntdll/threadpool.c
View file @
9277fcfd
...
...
@@ -235,12 +235,14 @@ NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE Function, PVOID Context,
*/
static
DWORD
CALLBACK
iocp_poller
(
LPVOID
Arg
)
{
HANDLE
cport
=
Arg
;
while
(
TRUE
)
{
PRTL_OVERLAPPED_COMPLETION_ROUTINE
callback
;
LPVOID
overlapped
;
IO_STATUS_BLOCK
iosb
;
NTSTATUS
res
=
NtRemoveIoCompletion
(
c
ompl_
port
,
(
PULONG_PTR
)
&
callback
,
(
PULONG_PTR
)
&
overlapped
,
&
iosb
,
NULL
);
NTSTATUS
res
=
NtRemoveIoCompletion
(
cport
,
(
PULONG_PTR
)
&
callback
,
(
PULONG_PTR
)
&
overlapped
,
&
iosb
,
NULL
);
if
(
res
)
{
ERR
(
"NtRemoveIoCompletion failed: 0x%x
\n
"
,
res
);
...
...
@@ -297,7 +299,7 @@ NTSTATUS WINAPI RtlSetIoCompletionCallback(HANDLE FileHandle, PRTL_OVERLAPPED_CO
if
(
!
res
)
{
/* FIXME native can start additional threads in case of e.g. hung callback function. */
res
=
RtlQueueWorkItem
(
iocp_poller
,
NULL
,
WT_EXECUTEDEFAULT
);
res
=
RtlQueueWorkItem
(
iocp_poller
,
cport
,
WT_EXECUTEDEFAULT
);
if
(
!
res
)
compl_port
=
cport
;
else
...
...
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