From: Paul Gofman pgofman@codeweavers.com
--- dlls/ntdll/sync.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c index 1bd62612efe..35319158573 100644 --- a/dlls/ntdll/sync.c +++ b/dlls/ntdll/sync.c @@ -931,8 +931,8 @@ void WINAPI RtlWakeAddressAll( const void *addr ) { struct futex_queue *queue = get_futex_queue( addr ); struct futex_entry *entry, *next; - unsigned int count = 0, i; - DWORD tids[256]; + unsigned int count = 0; + HANDLE tids[256];
TRACE("%p\n", addr);
@@ -951,17 +951,18 @@ void WINAPI RtlWakeAddressAll( const void *addr ) list_remove( &entry->entry ); /* Try to buffer wakes, so that we don't make a system call while * holding a spinlock. */ - if (count < ARRAY_SIZE(tids)) - tids[count++] = entry->tid; - else - NtAlertThreadByThreadId( (HANDLE)(DWORD_PTR)entry->tid ); + if (count == ARRAY_SIZE(tids)) + { + NtAlertMultipleThreadByThreadId( tids, count, NULL, NULL ); + count = 0; + } + tids[count++] = (HANDLE)(ULONG_PTR)entry->tid; } }
spin_unlock( &queue->lock ); - - for (i = 0; i < count; ++i) - NtAlertThreadByThreadId( (HANDLE)(DWORD_PTR)tids[i] ); + if (count) + NtAlertMultipleThreadByThreadId( tids, count, NULL, NULL ); }
/***********************************************************************