[CSRSRV]: hbelusca: wait a sec ;-) Fix CsrCreateWait and CSR_WAIT_BLOCK to match...
authorAlex Ionescu <aionescu@gmail.com>
Thu, 12 Sep 2013 21:05:58 +0000 (21:05 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Thu, 12 Sep 2013 21:05:58 +0000 (21:05 +0000)
svn path=/trunk/; revision=60065

reactos/include/reactos/subsys/csr/csrsrv.h
reactos/subsystems/win32/csrsrv/csrsrv.spec
reactos/subsystems/win32/csrsrv/wait.c
reactos/win32ss/user/winsrv/consrv/coninput.c
reactos/win32ss/user/winsrv/consrv/conoutput.c

index 5a0b53f..055a742 100644 (file)
@@ -148,7 +148,6 @@ typedef struct _CSR_WAIT_BLOCK
 {
     ULONG Size;                     // Size of the wait block (variable-sized)
     LIST_ENTRY WaitList;
-    LIST_ENTRY UserWaitList;
     PVOID WaitContext;
     PCSR_THREAD WaitThread;
     CSR_WAIT_FUNCTION WaitFunction;
@@ -285,8 +284,7 @@ CsrCreateWait(IN PLIST_ENTRY WaitList,
               IN CSR_WAIT_FUNCTION WaitFunction,
               IN PCSR_THREAD CsrWaitThread,
               IN OUT PCSR_API_MESSAGE WaitApiMessage,
-              IN PVOID WaitContext,
-              IN PLIST_ENTRY UserWaitList OPTIONAL);
+              IN PVOID WaitContext);
 
 NTSTATUS
 NTAPI
index b84f92e..2f968e6 100644 (file)
@@ -4,7 +4,7 @@
 @ stdcall CsrCreateProcess(ptr ptr ptr ptr long ptr)
 @ stdcall CsrCreateRemoteThread(ptr ptr)
 @ stdcall CsrCreateThread(ptr ptr ptr long)
-@ stdcall CsrCreateWait(ptr ptr ptr ptr ptr ptr)
+@ stdcall CsrCreateWait(ptr ptr ptr ptr ptr)
 @ stdcall CsrDebugProcess(ptr)
 @ stdcall CsrDebugProcessStop(ptr)
 @ stdcall CsrDereferenceProcess(ptr)
index 7351870..40f9d57 100644 (file)
@@ -76,12 +76,11 @@ CsrInitializeWait(IN CSR_WAIT_FUNCTION WaitFunction,
     CsrWaitThread->WaitBlock = WaitBlock;
     WaitBlock->WaitContext = WaitContext;
     WaitBlock->WaitFunction = WaitFunction;
-    WaitBlock->UserWaitList.Flink = NULL;
-    WaitBlock->UserWaitList.Blink = NULL;
-    WaitBlock->WaitList = WaitBlock->UserWaitList;
+    WaitBlock->WaitList.Flink = NULL;
+    WaitBlock->WaitList.Blink = NULL;
 
     /* Copy the message */
-    RtlMoveMemory(&WaitBlock->WaitApiMessage,
+    RtlCopyMemory(&WaitBlock->WaitApiMessage,
                   WaitApiMessage,
                   WaitApiMessage->Header.u1.s1.TotalLength);
 
@@ -158,12 +157,6 @@ CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock,
                 RemoveEntryList(&WaitBlock->WaitList);
             }
 
-            /* Remove it from the User Wait List */
-            if (WaitBlock->UserWaitList.Flink)
-            {
-                RemoveEntryList(&WaitBlock->UserWaitList);
-            }
-
             /* Dereference the thread */
             CsrDereferenceThread(WaitBlock->WaitThread);
 
@@ -207,9 +200,6 @@ CsrNotifyWaitBlock(IN PCSR_WAIT_BLOCK WaitBlock,
  * @param WaitContext
  *        Pointer to a user-defined parameter associated to this wait.
  *
- * @param UserWaitList
- *        Pointer to a list entry of the user-defined waits to associate.
- *
  * @return TRUE in case of success, FALSE otherwise.
  *
  * @remarks None.
@@ -221,8 +211,7 @@ CsrCreateWait(IN PLIST_ENTRY WaitList,
               IN CSR_WAIT_FUNCTION WaitFunction,
               IN PCSR_THREAD CsrWaitThread,
               IN OUT PCSR_API_MESSAGE WaitApiMessage,
-              IN PVOID WaitContext,
-              IN PLIST_ENTRY UserWaitList OPTIONAL)
+              IN PVOID WaitContext)
 {
     PCSR_WAIT_BLOCK WaitBlock;
 
@@ -252,9 +241,6 @@ CsrCreateWait(IN PLIST_ENTRY WaitList,
     /* Insert the wait in the queue */
     InsertTailList(WaitList, &WaitBlock->WaitList);
 
-    /* Insert the User Wait too, if one was given */
-    if (UserWaitList) InsertTailList(UserWaitList, &WaitBlock->UserWaitList);
-
     /* Return */
     CsrReleaseWaitLock();
     return TRUE;
@@ -306,12 +292,6 @@ CsrDereferenceWait(IN PLIST_ENTRY WaitList)
                 RemoveEntryList(&WaitBlock->WaitList);
             }
 
-            /* Remove it from the User Wait List */
-            if (WaitBlock->UserWaitList.Flink)
-            {
-                RemoveEntryList(&WaitBlock->UserWaitList);
-            }
-
             /* Dereference the thread waiting on it */
             CsrDereferenceThread(WaitBlock->WaitThread);
 
index 7143a32..7adb684 100644 (file)
@@ -60,8 +60,7 @@ WaitBeforeReading(IN PGET_INPUT_INFO InputInfo,
                            WaitFunction,
                            InputInfo->CallingThread,
                            ApiMessage,
-                           CapturedInputInfo,
-                           NULL))
+                           CapturedInputInfo))
         {
             ConsoleFreeHeap(CapturedInputInfo);
             return STATUS_NO_MEMORY;
index af3325a..6a0f10c 100644 (file)
@@ -380,7 +380,6 @@ DoWriteConsole(IN PCSR_API_MESSAGE ApiMessage,
                                WriteConsoleThread,
                                ClientThread,
                                ApiMessage,
-                               NULL,
                                NULL))
             {
                 /* Fail */