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
6e75cc98
Commit
6e75cc98
authored
Apr 20, 2021
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Release IO thread pool object from ioqueue_thread_proc().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
354d97a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
threadpool.c
dlls/ntdll/threadpool.c
+18
-18
No files found.
dlls/ntdll/threadpool.c
View file @
6e75cc98
...
...
@@ -1519,10 +1519,21 @@ static void CALLBACK ioqueue_thread_proc( void *param )
ERR
(
"NtRemoveIoCompletion failed, status %#x.
\n
"
,
status
);
RtlEnterCriticalSection
(
&
ioqueue
.
cs
);
if
(
key
)
{
io
=
(
struct
threadpool_object
*
)
key
;
if
(
io
&&
io
->
shutdown
)
{
if
(
iosb
.
u
.
Status
!=
STATUS_THREADPOOL_RELEASED_DURING_OPERATION
)
{
/* Skip remaining completions until the final one. */
continue
;
}
--
ioqueue
.
objcount
;
TRACE
(
"Releasing io %p.
\n
"
,
io
);
tp_object_release
(
io
);
}
else
if
(
io
)
{
RtlEnterCriticalSection
(
&
io
->
pool
->
cs
);
if
(
!
array_reserve
((
void
**
)
&
io
->
u
.
io
.
completions
,
&
io
->
u
.
io
.
completion_max
,
...
...
@@ -1609,18 +1620,6 @@ static NTSTATUS tp_ioqueue_lock( struct threadpool_object *io, HANDLE file )
return
status
;
}
static
void
tp_ioqueue_unlock
(
struct
threadpool_object
*
io
)
{
assert
(
io
->
type
==
TP_OBJECT_TYPE_IO
);
RtlEnterCriticalSection
(
&
ioqueue
.
cs
);
if
(
!--
ioqueue
.
objcount
)
NtSetIoCompletion
(
ioqueue
.
port
,
0
,
0
,
STATUS_SUCCESS
,
0
);
RtlLeaveCriticalSection
(
&
ioqueue
.
cs
);
}
/***********************************************************************
* tp_threadpool_alloc (internal)
*
...
...
@@ -2051,8 +2050,6 @@ static void tp_object_prepare_shutdown( struct threadpool_object *object )
tp_timerqueue_unlock
(
object
);
else
if
(
object
->
type
==
TP_OBJECT_TYPE_WAIT
)
tp_waitqueue_unlock
(
object
);
else
if
(
object
->
type
==
TP_OBJECT_TYPE_IO
)
tp_ioqueue_unlock
(
object
);
}
/***********************************************************************
...
...
@@ -2796,9 +2793,12 @@ void WINAPI TpReleaseIoCompletion( TP_IO *io )
TRACE
(
"%p
\n
"
,
io
);
tp_object_prepare_shutdown
(
this
);
RtlEnterCriticalSection
(
&
ioqueue
.
cs
);
assert
(
ioqueue
.
objcount
);
this
->
shutdown
=
TRUE
;
tp_object_release
(
this
);
NtSetIoCompletion
(
ioqueue
.
port
,
(
ULONG_PTR
)
this
,
0
,
STATUS_THREADPOOL_RELEASED_DURING_OPERATION
,
1
);
RtlLeaveCriticalSection
(
&
ioqueue
.
cs
);
}
/***********************************************************************
...
...
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