Cleanup isn't necessary after calling the driver in NtQueryDirectoryFile.
[reactos.git] / reactos / ntoskrnl / lpc / queue.c
index 1abe36f..971e108 100644 (file)
@@ -1,24 +1,20 @@
-/* $Id: queue.c,v 1.3 2000/12/28 03:38:07 dwelch Exp $
- * 
+/* $Id$
+ *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/lpc/queue.c
  * PURPOSE:         Communication mechanism
- * PROGRAMMER:      David Welch (welch@cwcom.net)
- * UPDATE HISTORY:
- *                  Created 22/05/98
+ *
+ * PROGRAMMERS:     David Welch (welch@cwcom.net)
  */
 
 /* INCLUDES *****************************************************************/
 
-#include <ddk/ntddk.h>
-#include <internal/ob.h>
-#include <internal/port.h>
-#include <internal/dbg.h>
-
+#include <ntoskrnl.h>
 #define NDEBUG
 #include <internal/debug.h>
 
+/* FUNCTIONS *****************************************************************/
 
 VOID STDCALL
 EiEnqueueMessagePort (IN OUT   PEPORT          Port,
@@ -29,13 +25,21 @@ EiEnqueueMessagePort (IN OUT        PEPORT          Port,
   Port->QueueLength++;
 }
 
+VOID STDCALL
+EiEnqueueMessageAtHeadPort (IN OUT     PEPORT          Port,
+                           IN  PQUEUEDMESSAGE  Message)
+{
+  InsertTailList (&Port->QueueListHead,
+                 &Message->QueueListEntry);
+  Port->QueueLength++;
+}
 
 PQUEUEDMESSAGE STDCALL
 EiDequeueMessagePort (IN OUT   PEPORT  Port)
 {
   PQUEUEDMESSAGE       Message;
   PLIST_ENTRY  entry;
-  
+
   if (IsListEmpty(&Port->QueueListHead))
     {
       return(NULL);
@@ -43,7 +47,7 @@ EiDequeueMessagePort (IN OUT  PEPORT  Port)
   entry = RemoveHeadList (&Port->QueueListHead);
   Message = CONTAINING_RECORD (entry, QUEUEDMESSAGE, QueueListEntry);
   Port->QueueLength--;
-   
+
   return (Message);
 }
 
@@ -63,7 +67,7 @@ EiDequeueConnectMessagePort (IN OUT   PEPORT  Port)
 {
   PQUEUEDMESSAGE       Message;
   PLIST_ENTRY  entry;
-  
+
   if (IsListEmpty(&Port->ConnectQueueListHead))
     {
       return(NULL);
@@ -71,7 +75,7 @@ EiDequeueConnectMessagePort (IN OUT   PEPORT  Port)
   entry = RemoveHeadList (&Port->ConnectQueueListHead);
   Message = CONTAINING_RECORD (entry, QUEUEDMESSAGE, QueueListEntry);
   Port->ConnectQueueLength--;
-  
+
   return (Message);
 }