ntdll: Create the initial stack on the Unix side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
29d9659095
commit
c00c62bbfd
|
@ -4020,7 +4020,6 @@ static void map_wow64cpu(void)
|
|||
*/
|
||||
static NTSTATUS process_init(void)
|
||||
{
|
||||
INITIAL_TEB stack;
|
||||
TEB *teb = NtCurrentTeb();
|
||||
PEB *peb = teb->Peb;
|
||||
|
||||
|
@ -4069,11 +4068,6 @@ static NTSTATUS process_init(void)
|
|||
map_wow64cpu();
|
||||
}
|
||||
#endif
|
||||
|
||||
RtlCreateUserStack( 0, 0, 0, 0x10000, 0x10000, &stack );
|
||||
teb->Tib.StackBase = stack.StackBase;
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -1797,6 +1797,7 @@ static struct unix_funcs unix_funcs =
|
|||
static void start_main_thread(void)
|
||||
{
|
||||
NTSTATUS status;
|
||||
INITIAL_TEB stack;
|
||||
TEB *teb = virtual_alloc_first_teb();
|
||||
|
||||
signal_init_threading();
|
||||
|
@ -1809,6 +1810,10 @@ static void start_main_thread(void)
|
|||
syscall_dispatcher = signal_init_syscalls();
|
||||
init_files();
|
||||
init_startup_info();
|
||||
virtual_alloc_thread_stack( &stack, 0, 0, NULL );
|
||||
teb->Tib.StackBase = stack.StackBase;
|
||||
teb->Tib.StackLimit = stack.StackLimit;
|
||||
teb->DeallocationStack = stack.DeallocationStack;
|
||||
NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
|
||||
load_ntdll();
|
||||
load_libwine();
|
||||
|
|
Loading…
Reference in New Issue