[WIN32K:NTUSER]
authorThomas Faber <thomas.faber@reactos.org>
Thu, 15 Oct 2015 09:44:20 +0000 (09:44 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Thu, 15 Oct 2015 09:44:20 +0000 (09:44 +0000)
- Don't perform thread initialization twice in csrss's UserInitialize thread
CORE-10339 #resolve

svn path=/trunk/; revision=69536

reactos/win32ss/user/ntuser/main.c
reactos/win32ss/user/ntuser/ntuser.c

index 9dd8cfe..05fc831 100644 (file)
@@ -379,11 +379,7 @@ AllocW32Thread(IN  PETHREAD Thread,
 
     /* Check that we were not called with an already existing Win32 thread info */
     ptiCurrent = PsGetThreadWin32Thread(Thread);
-    if (ptiCurrent)
-    {
-        ERR_CH(UserThread, "PsGetThreadWin32Thread returned non-NULL thread info!!\n");
-        // return STATUS_SUCCESS;
-    }
+    NT_ASSERT(ptiCurrent == NULL);
 
     /* Allocate a new Win32 thread info */
     ptiCurrent = ExAllocatePoolWithTag(NonPagedPool,
index 3982e78..87a285a 100644 (file)
@@ -113,7 +113,9 @@ UserInitialize(VOID)
     HBITMAP hPattern55AABitmap = NULL;
     NTSTATUS Status;
 
-// Create Event for Diconnect Desktop.
+    NT_ASSERT(PsGetCurrentThreadWin32Thread() != NULL);
+
+// Create Event for Disconnect Desktop.
 
     Status = UserCreateWinstaDirectory();
     if (!NT_SUCCESS(Status)) return Status;
@@ -128,14 +130,7 @@ UserInitialize(VOID)
 //     Update Shared Device Caps.
 //     Initialize User Screen.
 // }
-// Create ThreadInfo for this Thread!
-// {
 
-    /* Initialize the current thread */
-    Status = InitThreadCallback(PsGetCurrentThread());
-    if (!NT_SUCCESS(Status)) return Status;
-
-// }
 // Set Global SERVERINFO Error flags.
 // Load Resources.