Module: wine Branch: master Commit: 217ae19d03f67836cfc0add2f9aeeeaeb34cdb77 URL: https://source.winehq.org/git/wine.git/?a=commit;h=217ae19d03f67836cfc0add2f...
Author: Paul Gofman pgofman@codeweavers.com Date: Wed Jul 28 01:06:59 2021 +0300
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
---
dlls/ntdll/threadpool.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 9e99398bdee..b82d06e5e42 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -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. */