Author: fireball Date: Sat Oct 13 17:39:42 2007 New Revision: 29551
URL: http://svn.reactos.org/svn/reactos?rev=29551&view=rev Log: - Move Teb's StaticUnicodeString initialisation from ntdll to MmCreateTeb (it's better to initialize it early, and all at once, instead of something here now and something there later).
Modified: trunk/reactos/dll/ntdll/ldr/startup.c trunk/reactos/ntoskrnl/mm/procsup.c
Modified: trunk/reactos/dll/ntdll/ldr/startup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/ldr/startup.c?rev... ============================================================================== --- trunk/reactos/dll/ntdll/ldr/startup.c (original) +++ trunk/reactos/dll/ntdll/ldr/startup.c Sat Oct 13 17:39:42 2007 @@ -377,11 +377,6 @@ /* Load execution options */ LoadImageFileExecutionOptions(Peb);
- /* Initialize the static teb string */ - NtCurrentTeb()->StaticUnicodeString.Length = 0; - NtCurrentTeb()->StaticUnicodeString.MaximumLength = sizeof(NtCurrentTeb()->StaticUnicodeBuffer); - NtCurrentTeb()->StaticUnicodeString.Buffer = NtCurrentTeb()->StaticUnicodeBuffer; - /* build full ntdll path */ wcscpy (FullNtDllPath, SharedUserData->NtSystemRoot); wcscat (FullNtDllPath, L"\system32\ntdll.dll");
Modified: trunk/reactos/ntoskrnl/mm/procsup.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/procsup.c?rev=2... ============================================================================== --- trunk/reactos/ntoskrnl/mm/procsup.c (original) +++ trunk/reactos/ntoskrnl/mm/procsup.c Sat Oct 13 17:39:42 2007 @@ -465,6 +465,11 @@ Teb->DeallocationStack = InitialTeb->AllocatedStackBase; }
+ /* Initialize the static unicode string */ + Teb->StaticUnicodeString.Length = 0; + Teb->StaticUnicodeString.MaximumLength = sizeof(Teb->StaticUnicodeBuffer); + Teb->StaticUnicodeString.Buffer = Teb->StaticUnicodeBuffer; + /* Return TEB Address */ DPRINT("Allocated: %x\n", Teb); if (Attached) KeDetachProcess();