Matteo Bruni (@Mystral) commented about dlls/d3dx10_43/d3dx10_43_main.c:
- if (!work_item)
return E_OUTOFMEMORY;
- work_item->loader = loader;
- work_item->processor = processor;
- work_item->result = result;
- work_item->object = object;
- if (object)
*object = NULL;
- AcquireSRWLockExclusive(&thread_pump->io_lock);
- thread_pump->io_count++;
- list_add_tail(&thread_pump->io_queue, &work_item->entry);
- ReleaseSRWLockExclusive(&thread_pump->io_lock);
- RtlWakeAddressAll((void *)&thread_pump->io_count);
Would it make sense to call RtlWakeAddressSingle() here (and in the other places where we add a work item to a queue) instead?