From: Owen Smith Date: Tue, 25 Jul 2017 12:14:06 +0000 (+0100) Subject: Rename ThreadEvent and Thread to Monitor[Event|Thread] X-Git-Tag: 9.0.0-rc1~45 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0e0968a0081bb8dc4529682697cc610b84112b06;p=pvdrivers%2Fwin%2Fxencons.git Rename ThreadEvent and Thread to Monitor[Event|Thread] Add clarity to the variables used with the MonitorThread Signed-off-by: Owen Smith --- diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index a8ae21b..a2a3cc1 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -63,8 +63,8 @@ typedef struct _MONITOR_CONTEXT { PTCHAR DevicePath; HDEVNOTIFY DeviceNotification; HANDLE Device; - HANDLE ThreadEvent; - HANDLE Thread; + HANDLE MonitorEvent; + HANDLE MonitorThread; } MONITOR_CONTEXT, *PMONITOR_CONTEXT; MONITOR_CONTEXT MonitorContext; @@ -402,7 +402,7 @@ again: if (!Success) goto fail2; - Handle[0] = Context->ThreadEvent; + Handle[0] = Context->MonitorEvent; Handle[1] = ProcessInfo.hProcess; Object = WaitForMultipleObjects(ARRAYSIZE(Handle), @@ -414,7 +414,7 @@ again: switch (Object) { case WAIT_OBJECT_0: - ResetEvent(Context->ThreadEvent); + ResetEvent(Context->MonitorEvent); TerminateProcess(ProcessInfo.hProcess, 1); CloseHandle(ProcessInfo.hProcess); @@ -533,22 +533,22 @@ MonitorAdd( Context->DevicePath = Path; - Context->ThreadEvent = CreateEvent(NULL, - TRUE, - FALSE, - NULL); + Context->MonitorEvent = CreateEvent(NULL, + TRUE, + FALSE, + NULL); - if (Context->ThreadEvent == NULL) + if (Context->MonitorEvent == NULL) goto fail4; - Context->Thread = CreateThread(NULL, - 0, - MonitorThread, - NULL, - 0, - NULL); + Context->MonitorThread = CreateThread(NULL, + 0, + MonitorThread, + NULL, + 0, + NULL); - if (Context->Thread == INVALID_HANDLE_VALUE) + if (Context->MonitorThread == INVALID_HANDLE_VALUE) goto fail5; Log("<===="); @@ -558,8 +558,8 @@ MonitorAdd( fail5: Log("fail5"); - CloseHandle(Context->ThreadEvent); - Context->ThreadEvent = NULL; + CloseHandle(Context->MonitorEvent); + Context->MonitorEvent = NULL; fail4: Log("fail4"); @@ -604,11 +604,11 @@ MonitorRemove( Log("====>"); - SetEvent(Context->ThreadEvent); - WaitForSingleObject(Context->Thread, INFINITE); + SetEvent(Context->MonitorEvent); + WaitForSingleObject(Context->MonitorThread, INFINITE); - CloseHandle(Context->ThreadEvent); - Context->ThreadEvent = NULL; + CloseHandle(Context->MonitorEvent); + Context->MonitorEvent = NULL; free(Context->DevicePath); Context->DevicePath = NULL;