From: Paul Durrant Date: Fri, 13 Mar 2015 13:51:19 +0000 (+0000) Subject: Get rid of the MonitorEvent from CACHE context X-Git-Tag: 8.1.0-rc1~45 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0951dc6deff265da23bb87894f45d8463da71062;p=pvdrivers%2Fwin%2Fxenbus.git Get rid of the MonitorEvent from CACHE context The event is being signalled but nothing ever takes notice of it so one can only conclude that it is not needed. Signed-off-by: Paul Durrant --- diff --git a/src/xenbus/cache.c b/src/xenbus/cache.c index 9058d56..e2c83a8 100644 --- a/src/xenbus/cache.c +++ b/src/xenbus/cache.c @@ -92,7 +92,6 @@ struct _XENBUS_CACHE_CONTEXT { PXENBUS_DEBUG_CALLBACK DebugCallback; XENBUS_STORE_INTERFACE StoreInterface; PXENBUS_THREAD MonitorThread; - KEVENT MonitorEvent; LIST_ENTRY List; }; @@ -787,8 +786,6 @@ CacheMonitor( loop: KeReleaseSpinLock(&Context->Lock, Irql); - - KeSetEvent(&Context->MonitorEvent, IO_NO_INCREMENT, FALSE); } Trace("====>\n"); @@ -921,8 +918,6 @@ CacheInitialize( InitializeListHead(&(*Context)->List); KeInitializeSpinLock(&(*Context)->Lock); - KeInitializeEvent(&(*Context)->MonitorEvent, NotificationEvent, FALSE); - status = ThreadCreate(CacheMonitor, *Context, &(*Context)->MonitorThread); if (!NT_SUCCESS(status)) goto fail2; @@ -936,8 +931,6 @@ CacheInitialize( fail2: Error("fail2\n"); - RtlZeroMemory(&(*Context)->MonitorEvent, sizeof (KEVENT)); - RtlZeroMemory(&(*Context)->Lock, sizeof (KSPIN_LOCK)); RtlZeroMemory(&(*Context)->List, sizeof (LIST_ENTRY)); @@ -1004,8 +997,6 @@ CacheTeardown( ThreadJoin(Context->MonitorThread); Context->MonitorThread = NULL; - RtlZeroMemory(&Context->MonitorEvent, sizeof (KEVENT)); - RtlZeroMemory(&Context->Lock, sizeof (KSPIN_LOCK)); RtlZeroMemory(&Context->List, sizeof (LIST_ENTRY));