ntdll: Decrement IO pending count in ioqueue_thread_proc().

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2021-07-28 01:06:59 +03:00 committed by Alexandre Julliard
parent 90e1907ded
commit 217ae19d03
1 changed files with 2 additions and 1 deletions

View File

@ -1536,6 +1536,8 @@ static void CALLBACK ioqueue_thread_proc( void *param )
{
RtlEnterCriticalSection( &io->pool->cs );
--io->u.io.pending_count;
if (!array_reserve((void **)&io->u.io.completions, &io->u.io.completion_max,
io->u.io.completion_count + 1, sizeof(*io->u.io.completions)))
{
@ -2138,7 +2140,6 @@ static void tp_object_execute( struct threadpool_object *object, BOOL wait_threa
{
assert( object->u.io.completion_count );
completion = object->u.io.completions[--object->u.io.completion_count];
object->u.io.pending_count--;
}
/* Leave critical section and do the actual callback. */