]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Get rid of the MonitorEvent from CACHE context
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 13 Mar 2015 13:51:19 +0000 (13:51 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Fri, 13 Mar 2015 13:51:19 +0000 (13:51 +0000)
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 <paul.durrant@citrix.com>
src/xenbus/cache.c

index 9058d563bc7ab7ac0c3a36b1848ecb544a706371..e2c83a8df629c02a4d2aeff40eab93c54b4d56fa 100644 (file)
@@ -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));