Commit 56d56ec6 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

ntdll: Remove entries from queue in RtlWakeAddressAll().

parent fffed9b3
......@@ -916,8 +916,8 @@ NTSTATUS WINAPI RtlWaitOnAddress( const void *addr, const void *cmp, SIZE_T size
void WINAPI RtlWakeAddressAll( const void *addr )
{
struct futex_queue *queue = get_futex_queue( addr );
struct futex_entry *entry, *next;
unsigned int count = 0, i;
struct futex_entry *entry;
DWORD tids[256];
TRACE("%p\n", addr);
......@@ -929,10 +929,12 @@ void WINAPI RtlWakeAddressAll( const void *addr )
if (!queue->queue.next)
list_init(&queue->queue);
LIST_FOR_EACH_ENTRY( entry, &queue->queue, struct futex_entry, entry )
LIST_FOR_EACH_ENTRY_SAFE( entry, next, &queue->queue, struct futex_entry, entry )
{
if (entry->addr == addr)
{
entry->addr = NULL;
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))
......
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