mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
ntdll: Make it possible to use RtlGetNtGlobalFlags before the TEB is initialized.
This commit is contained in:
parent
2a81ef06f8
commit
e7810c8bc6
@ -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.@)
|
||||
*
|
||||
|
@ -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.@)
|
||||
|
Loading…
Reference in New Issue
Block a user