63 Event->EventHandle = NULL;
74 _In_opt_ HANDLE EventHandle
87 Event->EventHandle = NULL;
119 eventHandle = Event->EventHandle;
123 NtSetEvent(eventHandle, NULL);
144 _In_opt_ PLARGE_INTEGER Timeout
151 value = Event->Value;
159 if (Timeout && Timeout->QuadPart == 0)
165 eventHandle = Event->EventHandle;
180 NtClose(eventHandle);
181 eventHandle = Event->EventHandle;
187 if (!(Event->Value & PH_EVENT_SET))
189 result = NtWaitForSingleObject(eventHandle,
FALSE, Timeout) == STATUS_WAIT_0;
214 assert(!Event->EventHandle);
222 _In_ ULONG_PTR Target
291 value = Barrier->Value;
299 assert(count != target);
309 (PVOID *)&Barrier->Value,
322 }
while (!(Barrier->Value & PH_BARRIER_WAKING));
359 newValue = Barrier->Value;
370 Protection->Value = 0;
384 value = Protection->Value;
390 (PVOID *)&Protection->Value,
406 value = Protection->Value;
430 (PVOID *)&Protection->Value,
446 BOOLEAN waitBlockInitialized;
451 (PVOID *)&Protection->Value,
459 waitBlockInitialized =
FALSE;
463 value = Protection->Value;
467 if (count != 0 && !waitBlockInitialized)
470 waitBlockInitialized =
TRUE;
474 waitBlock.
Count = count;
477 (PVOID *)&Protection->Value,