Commit 3ef93229 authored by Alexandre Julliard's avatar Alexandre Julliard

Cleanup thread stack allocation. Use a single VirtualAlloc for TEB and

the various stacks.
parent 86ff8c08
...@@ -119,7 +119,7 @@ typedef struct _TEB ...@@ -119,7 +119,7 @@ typedef struct _TEB
/* scheduler/thread.c */ /* scheduler/thread.c */
extern TEB *THREAD_CreateInitialThread( struct _PDB *pdb, int server_fd ); extern TEB *THREAD_CreateInitialThread( struct _PDB *pdb, int server_fd );
extern TEB *THREAD_Create( struct _PDB *pdb, void *pid, void *tid, int fd, DWORD flags, extern TEB *THREAD_Create( struct _PDB *pdb, void *pid, void *tid, int fd,
DWORD stack_size, BOOL alloc_stack16 ); DWORD stack_size, BOOL alloc_stack16 );
extern BOOL THREAD_IsWin16( TEB *thdb ); extern BOOL THREAD_IsWin16( TEB *thdb );
extern TEB *THREAD_IdToTEB( DWORD id ); extern TEB *THREAD_IdToTEB( DWORD id );
......
...@@ -557,8 +557,7 @@ PDB *PROCESS_Create( NE_MODULE *pModule, HFILE hFile, LPCSTR cmd_line, LPCSTR en ...@@ -557,8 +557,7 @@ PDB *PROCESS_Create( NE_MODULE *pModule, HFILE hFile, LPCSTR cmd_line, LPCSTR en
/* Create the main thread */ /* Create the main thread */
if (!(teb = THREAD_Create( pdb, req->pid, req->tid, fd, flags & CREATE_SUSPENDED, if (!(teb = THREAD_Create( pdb, req->pid, req->tid, fd, size, alloc_stack16 ))) goto error;
size, alloc_stack16 ))) goto error;
teb->startup = PROCESS_Start; teb->startup = PROCESS_Start;
fd = -1; /* don't close it */ fd = -1; /* don't close it */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment