Commit 217ae19d authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntdll: Decrement IO pending count in ioqueue_thread_proc().

parent 90e1907d
...@@ -1536,6 +1536,8 @@ static void CALLBACK ioqueue_thread_proc( void *param ) ...@@ -1536,6 +1536,8 @@ static void CALLBACK ioqueue_thread_proc( void *param )
{ {
RtlEnterCriticalSection( &io->pool->cs ); RtlEnterCriticalSection( &io->pool->cs );
--io->u.io.pending_count;
if (!array_reserve((void **)&io->u.io.completions, &io->u.io.completion_max, if (!array_reserve((void **)&io->u.io.completions, &io->u.io.completion_max,
io->u.io.completion_count + 1, sizeof(*io->u.io.completions))) 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 ...@@ -2138,7 +2140,6 @@ static void tp_object_execute( struct threadpool_object *object, BOOL wait_threa
{ {
assert( object->u.io.completion_count ); assert( object->u.io.completion_count );
completion = object->u.io.completions[--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. */ /* Leave critical section and do the actual callback. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment