ntdll: Make it possible to use RtlGetNtGlobalFlags before the TEB is initialized.

This commit is contained in:
Alexandre Julliard 2010-01-22 12:32:40 +01:00
parent 2a81ef06f8
commit e7810c8bc6
2 changed files with 11 additions and 10 deletions

View file

@ -73,15 +73,6 @@ PEB * WINAPI RtlGetCurrentPeb(void)
return NtCurrentTeb()->Peb;
}
/******************************************************************************
* RtlGetNtGlobalFlags [NTDLL.@]
*
*/
ULONG WINAPI RtlGetNtGlobalFlags(void)
{
return NtCurrentTeb()->Peb->NtGlobalFlag;
}
/***********************************************************************
* __wine_make_process_system (NTDLL.@)
*

View file

@ -57,6 +57,7 @@ struct startup_info
void *entry_arg;
};
static PEB *peb;
static PEB_LDR_DATA ldr;
static RTL_USER_PROCESS_PARAMETERS params; /* default parameters if no parent */
static WCHAR current_dir[MAX_NT_PATH_LENGTH];
@ -191,7 +192,6 @@ done:
*/
HANDLE thread_init(void)
{
PEB *peb;
TEB *teb;
void *addr;
SIZE_T size, info_size;
@ -522,6 +522,16 @@ error:
}
/******************************************************************************
* RtlGetNtGlobalFlags (NTDLL.@)
*/
ULONG WINAPI RtlGetNtGlobalFlags(void)
{
if (!peb) return 0; /* init not done yet */
return peb->NtGlobalFlag;
}
/***********************************************************************
* NtOpenThread (NTDLL.@)
* ZwOpenThread (NTDLL.@)