64 ProviderThread->ThreadHandle = NULL;
65 ProviderThread->TimerHandle = NULL;
66 ProviderThread->Interval = Interval;
71 ProviderThread->BoostCount = 0;
75 if (!PhDbgProviderList)
98 if ((index = PhFindItemList(PhDbgProviderList, ProviderThread)) != -1)
109 NTSTATUS status = STATUS_SUCCESS;
110 PLIST_ENTRY listEntry;
114 LIST_ENTRY tempListHead;
143 if (status == STATUS_ALERTED)
157 if (listEntry == &providerThread->
ListHead)
165 if (status != STATUS_ALERTED)
186 if (status == STATUS_ALERTED)
193 providerFunction = registration->
Function;
194 object = registration->
Object;
199 registration->
RunId++;
202 providerFunction(
object);
211 while ((listEntry =
RemoveHeadList(&tempListHead)) != &tempListHead)
229 status = NtWaitForSingleObject(
236 return STATUS_SUCCESS;
280 NtAlertThread(ProviderThread->ThreadHandle);
281 NtWaitForSingleObject(ProviderThread->ThreadHandle,
FALSE, NULL);
284 NtClose(ProviderThread->ThreadHandle);
285 NtClose(ProviderThread->TimerHandle);
286 ProviderThread->ThreadHandle = NULL;
287 ProviderThread->TimerHandle = NULL;
303 ProviderThread->Interval = Interval;
305 if (ProviderThread->TimerHandle)
307 LARGE_INTEGER interval;
310 NtSetTimer(ProviderThread->TimerHandle, &interval, NULL, NULL,
FALSE, Interval, NULL);
331 _In_opt_ PVOID Object,
335 Registration->ProviderThread = ProviderThread;
336 Registration->Function = Function;
337 Registration->Object = Object;
338 Registration->RunId = 0;
339 Registration->Enabled =
FALSE;
340 Registration->Unregistering =
FALSE;
341 Registration->Boosting =
FALSE;
347 InsertTailList(&ProviderThread->ListHead, &Registration->ListEntry);
366 providerThread = Registration->ProviderThread;
368 Registration->Unregistering =
TRUE;
383 if (Registration->Boosting)
388 if (Registration->Object)
412 _Out_opt_ PULONG FutureRunId
418 if (Registration->Unregistering)
421 providerThread = Registration->ProviderThread;
439 Registration->Boosting =
TRUE;
442 futureRunId = Registration->RunId + 1;
450 *FutureRunId = futureRunId;
465 return Registration->RunId;
478 return Registration->Enabled;
494 Registration->Enabled = Enabled;