[ros-diffs] [ion] 55620: [CSRSRV]: Add a new linked list for console processes, as ListLink is used for all CSR_PROCESSes.

ion at svn.reactos.org ion at svn.reactos.org
Wed Feb 15 22:15:33 UTC 2012


Author: ion
Date: Wed Feb 15 22:15:33 2012
New Revision: 55620

URL: http://svn.reactos.org/svn/reactos?rev=55620&view=rev
Log:
[CSRSRV]: Add a new linked list for console processes, as ListLink is used for all CSR_PROCESSes.

Modified:
    trunk/reactos/subsystems/win32/csrss/include/api.h
    trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c
    trunk/reactos/subsystems/win32/csrss/win32csr/console.c
    trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
    trunk/reactos/subsystems/win32/csrss/win32csr/handle.c

Modified: trunk/reactos/subsystems/win32/csrss/include/api.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/include/api.h?rev=55620&r1=55619&r2=55620&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/include/api.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/include/api.h [iso-8859-1] Wed Feb 15 22:15:33 2012
@@ -55,6 +55,7 @@
     ULONG HandleTableSize;
     struct _CSRSS_HANDLE *HandleTable;
     PCONTROLDISPATCHER CtrlDispatcher;
+    LIST_ENTRY ConsoleLink;
 } CSRSS_CON_PROCESS_DATA, *PCSRSS_CON_PROCESS_DATA;
 
 typedef struct _CSR_PROCESS

Modified: trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c?rev=55620&r1=55619&r2=55620&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/coninput.c [iso-8859-1] Wed Feb 15 22:15:33 2012
@@ -373,7 +373,7 @@
         current_entry = Console->ProcessList.Flink;
         while (current_entry != &Console->ProcessList)
         {
-            current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ListLink);
+            current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ConsoleLink);
             current_entry = current_entry->Flink;
             ConioConsoleCtrlEvent((DWORD)CTRL_C_EVENT, current);
         }

Modified: trunk/reactos/subsystems/win32/csrss/win32csr/console.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win32csr/console.c?rev=55620&r1=55619&r2=55620&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/console.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/console.c [iso-8859-1] Wed Feb 15 22:15:33 2012
@@ -215,7 +215,7 @@
         /* initialize list head */
         InitializeListHead(&Console->ProcessList);
         /* insert process data required for GUI initialization */
-        InsertHeadList(&Console->ProcessList, &ProcessData->ListLink);
+        InsertHeadList(&Console->ProcessList, &ProcessData->ConsoleLink);
         /* Initialize the Console */
         Status = CsrInitConsole(Console, Request->Data.AllocConsoleRequest.ShowCmd);
         if (!NT_SUCCESS(Status))
@@ -307,7 +307,7 @@
     if (!NewConsole)
     {
         /* Insert into the list if it has not been added */
-        InsertHeadList(&ProcessData->Console->ProcessList, &ProcessData->ListLink);
+        InsertHeadList(&ProcessData->Console->ProcessList, &ProcessData->ConsoleLink);
     }
 
     RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
@@ -786,7 +786,7 @@
          current_entry != &Console->ProcessList;
          current_entry = current_entry->Flink)
     {
-        current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ListLink);
+        current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ConsoleLink);
         if (++nItems <= Request->Data.GetProcessListRequest.nMaxIds)
         {
             *Buffer++ = HandleToUlong(current->ClientId.UniqueProcess);
@@ -822,7 +822,7 @@
             current_entry != &Console->ProcessList;
             current_entry = current_entry->Flink)
     {
-        current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ListLink);
+        current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ConsoleLink);
         if (Group == 0 || current->ProcessGroupId == Group)
         {
             ConioConsoleCtrlEvent(Request->Data.GenerateCtrlEvent.Event, current);

Modified: trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c?rev=55620&r1=55619&r2=55620&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/guiconsole.c [iso-8859-1] Wed Feb 15 22:15:33 2012
@@ -400,7 +400,7 @@
         DPRINT("GuiConsoleWriteUserSettings: No Process!!!\n");
         return;
     }
-    ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSR_PROCESS, ListLink);
+    ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSR_PROCESS, ConsoleLink);
     if (!GuiConsoleOpenUserSettings(GuiData, PtrToUlong(ProcessData->ClientId.UniqueProcess), &hKey, KEY_READ | KEY_WRITE, TRUE))
     {
         return;
@@ -704,7 +704,7 @@
     GuiConsoleUseDefaults(Console, GuiData, Console->ActiveBuffer);
     if (Console->ProcessList.Flink != &Console->ProcessList)
     {
-        ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSR_PROCESS, ListLink);
+        ProcessData = CONTAINING_RECORD(Console->ProcessList.Flink, CSR_PROCESS, ConsoleLink);
         if (GuiConsoleOpenUserSettings(GuiData, PtrToUlong(ProcessData->ClientId.UniqueProcess), &hKey, KEY_READ, FALSE))
         {
             GuiConsoleReadUserSettings(hKey, Console, GuiData, Console->ActiveBuffer);
@@ -1272,7 +1272,7 @@
     current_entry = Console->ProcessList.Flink;
     while (current_entry != &Console->ProcessList)
     {
-        current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ListLink);
+        current = CONTAINING_RECORD(current_entry, CSR_PROCESS, ConsoleLink);
         current_entry = current_entry->Flink;
 
         /* FIXME: Windows will wait up to 5 seconds for the thread to exit.

Modified: trunk/reactos/subsystems/win32/csrss/win32csr/handle.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win32csr/handle.c?rev=55620&r1=55619&r2=55620&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/handle.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/handle.c [iso-8859-1] Wed Feb 15 22:15:33 2012
@@ -154,7 +154,7 @@
     {
         ProcessData->Console = NULL;
         EnterCriticalSection(&Console->Lock);
-        RemoveEntryList(&ProcessData->ListLink);
+        RemoveEntryList(&ProcessData->ConsoleLink);
         LeaveCriticalSection(&Console->Lock);
         if (_InterlockedDecrement(&Console->ReferenceCount) == 0)
             ConioDeleteConsole(&Console->Header);




More information about the Ros-diffs mailing list