server: Send the zero_bits parameter for remote NtCreateThreadEx() calls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e9bc48e90a
commit
6a296592aa
|
@ -550,6 +550,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
|
||||||
CLIENT_ID id;
|
CLIENT_ID id;
|
||||||
HANDLE handle;
|
HANDLE handle;
|
||||||
TEB *teb;
|
TEB *teb;
|
||||||
|
ULONG_PTR zero_bits = call->create_thread.zero_bits;
|
||||||
SIZE_T reserve = call->create_thread.reserve;
|
SIZE_T reserve = call->create_thread.reserve;
|
||||||
SIZE_T commit = call->create_thread.commit;
|
SIZE_T commit = call->create_thread.commit;
|
||||||
void *func = wine_server_get_ptr( call->create_thread.func );
|
void *func = wine_server_get_ptr( call->create_thread.func );
|
||||||
|
@ -570,7 +571,7 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
|
||||||
attr->Attributes[1].ReturnLength = NULL;
|
attr->Attributes[1].ReturnLength = NULL;
|
||||||
result->create_thread.status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, NULL,
|
result->create_thread.status = NtCreateThreadEx( &handle, THREAD_ALL_ACCESS, NULL,
|
||||||
NtCurrentProcess(), func, arg,
|
NtCurrentProcess(), func, arg,
|
||||||
call->create_thread.flags, 0,
|
call->create_thread.flags, zero_bits,
|
||||||
commit, reserve, attr );
|
commit, reserve, attr );
|
||||||
result->create_thread.handle = wine_server_obj_handle( handle );
|
result->create_thread.handle = wine_server_obj_handle( handle );
|
||||||
result->create_thread.pid = HandleToULong(id.UniqueProcess);
|
result->create_thread.pid = HandleToULong(id.UniqueProcess);
|
||||||
|
|
|
@ -161,7 +161,7 @@ NTSTATUS WINAPI NtCreateThread( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRI
|
||||||
*/
|
*/
|
||||||
NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
|
NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr,
|
||||||
HANDLE process, PRTL_THREAD_START_ROUTINE start, void *param,
|
HANDLE process, PRTL_THREAD_START_ROUTINE start, void *param,
|
||||||
ULONG flags, SIZE_T zero_bits, SIZE_T stack_commit,
|
ULONG flags, ULONG_PTR zero_bits, SIZE_T stack_commit,
|
||||||
SIZE_T stack_reserve, PS_ATTRIBUTE_LIST *attr_list )
|
SIZE_T stack_reserve, PS_ATTRIBUTE_LIST *attr_list )
|
||||||
{
|
{
|
||||||
sigset_t sigset;
|
sigset_t sigset;
|
||||||
|
@ -185,12 +185,13 @@ NTSTATUS WINAPI NtCreateThreadEx( HANDLE *handle, ACCESS_MASK access, OBJECT_ATT
|
||||||
|
|
||||||
memset( &call, 0, sizeof(call) );
|
memset( &call, 0, sizeof(call) );
|
||||||
|
|
||||||
call.create_thread.type = APC_CREATE_THREAD;
|
call.create_thread.type = APC_CREATE_THREAD;
|
||||||
call.create_thread.flags = flags;
|
call.create_thread.flags = flags;
|
||||||
call.create_thread.func = wine_server_client_ptr( start );
|
call.create_thread.func = wine_server_client_ptr( start );
|
||||||
call.create_thread.arg = wine_server_client_ptr( param );
|
call.create_thread.arg = wine_server_client_ptr( param );
|
||||||
call.create_thread.reserve = stack_reserve;
|
call.create_thread.zero_bits = zero_bits;
|
||||||
call.create_thread.commit = stack_commit;
|
call.create_thread.reserve = stack_reserve;
|
||||||
|
call.create_thread.commit = stack_commit;
|
||||||
status = server_queue_process_apc( process, &call, &result );
|
status = server_queue_process_apc( process, &call, &result );
|
||||||
if (status != STATUS_SUCCESS) return status;
|
if (status != STATUS_SUCCESS) return status;
|
||||||
|
|
||||||
|
|
|
@ -564,6 +564,7 @@ typedef union
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
client_ptr_t func;
|
client_ptr_t func;
|
||||||
client_ptr_t arg;
|
client_ptr_t arg;
|
||||||
|
mem_size_t zero_bits;
|
||||||
mem_size_t reserve;
|
mem_size_t reserve;
|
||||||
mem_size_t commit;
|
mem_size_t commit;
|
||||||
} create_thread;
|
} create_thread;
|
||||||
|
@ -6232,7 +6233,7 @@ union generic_reply
|
||||||
|
|
||||||
/* ### protocol_version begin ### */
|
/* ### protocol_version begin ### */
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 697
|
#define SERVER_PROTOCOL_VERSION 698
|
||||||
|
|
||||||
/* ### protocol_version end ### */
|
/* ### protocol_version end ### */
|
||||||
|
|
||||||
|
|
|
@ -3678,7 +3678,7 @@ NTSYSAPI NTSTATUS WINAPI NtCreateSection(HANDLE*,ACCESS_MASK,const OBJECT_ATTRI
|
||||||
NTSYSAPI NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
|
NTSYSAPI NTSTATUS WINAPI NtCreateSemaphore(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,LONG,LONG);
|
||||||
NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
|
NTSYSAPI NTSTATUS WINAPI NtCreateSymbolicLinkObject(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PUNICODE_STRING);
|
||||||
NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
|
NTSYSAPI NTSTATUS WINAPI NtCreateThread(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,HANDLE,PCLIENT_ID,PCONTEXT,PINITIAL_TEB,BOOLEAN);
|
||||||
NTSYSAPI NTSTATUS WINAPI NtCreateThreadEx(HANDLE*,ACCESS_MASK,OBJECT_ATTRIBUTES*,HANDLE,PRTL_THREAD_START_ROUTINE,void*,ULONG,SIZE_T,SIZE_T,SIZE_T,PS_ATTRIBUTE_LIST*);
|
NTSYSAPI NTSTATUS WINAPI NtCreateThreadEx(HANDLE*,ACCESS_MASK,OBJECT_ATTRIBUTES*,HANDLE,PRTL_THREAD_START_ROUTINE,void*,ULONG,ULONG_PTR,SIZE_T,SIZE_T,PS_ATTRIBUTE_LIST*);
|
||||||
NTSYSAPI NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
|
NTSYSAPI NTSTATUS WINAPI NtCreateTimer(HANDLE*, ACCESS_MASK, const OBJECT_ATTRIBUTES*, TIMER_TYPE);
|
||||||
NTSYSAPI NTSTATUS WINAPI NtCreateToken(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,TOKEN_TYPE,PLUID,PLARGE_INTEGER,PTOKEN_USER,PTOKEN_GROUPS,PTOKEN_PRIVILEGES,PTOKEN_OWNER,PTOKEN_PRIMARY_GROUP,PTOKEN_DEFAULT_DACL,PTOKEN_SOURCE);
|
NTSYSAPI NTSTATUS WINAPI NtCreateToken(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,TOKEN_TYPE,PLUID,PLARGE_INTEGER,PTOKEN_USER,PTOKEN_GROUPS,PTOKEN_PRIVILEGES,PTOKEN_OWNER,PTOKEN_PRIMARY_GROUP,PTOKEN_DEFAULT_DACL,PTOKEN_SOURCE);
|
||||||
NTSYSAPI NTSTATUS WINAPI NtCreateUserProcess(HANDLE*,HANDLE*,ACCESS_MASK,ACCESS_MASK,OBJECT_ATTRIBUTES*,OBJECT_ATTRIBUTES*,ULONG,ULONG,RTL_USER_PROCESS_PARAMETERS*,PS_CREATE_INFO*,PS_ATTRIBUTE_LIST*);
|
NTSYSAPI NTSTATUS WINAPI NtCreateUserProcess(HANDLE*,HANDLE*,ACCESS_MASK,ACCESS_MASK,OBJECT_ATTRIBUTES*,OBJECT_ATTRIBUTES*,ULONG,ULONG,RTL_USER_PROCESS_PARAMETERS*,PS_CREATE_INFO*,PS_ATTRIBUTE_LIST*);
|
||||||
|
|
|
@ -580,6 +580,7 @@ typedef union
|
||||||
unsigned int flags; /* creation flags */
|
unsigned int flags; /* creation flags */
|
||||||
client_ptr_t func; /* void (__stdcall *func)(void*); start function */
|
client_ptr_t func; /* void (__stdcall *func)(void*); start function */
|
||||||
client_ptr_t arg; /* argument for start function */
|
client_ptr_t arg; /* argument for start function */
|
||||||
|
mem_size_t zero_bits; /* number of zero high bits for thread stack */
|
||||||
mem_size_t reserve; /* reserve size for thread stack */
|
mem_size_t reserve; /* reserve size for thread stack */
|
||||||
mem_size_t commit; /* commit size for thread stack */
|
mem_size_t commit; /* commit size for thread stack */
|
||||||
} create_thread;
|
} create_thread;
|
||||||
|
|
|
@ -216,6 +216,7 @@ static void dump_apc_call( const char *prefix, const apc_call_t *call )
|
||||||
case APC_CREATE_THREAD:
|
case APC_CREATE_THREAD:
|
||||||
dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
|
dump_uint64( "APC_CREATE_THREAD,func=", &call->create_thread.func );
|
||||||
dump_uint64( ",arg=", &call->create_thread.arg );
|
dump_uint64( ",arg=", &call->create_thread.arg );
|
||||||
|
dump_uint64( ",zero_bits=", &call->create_thread.zero_bits );
|
||||||
dump_uint64( ",reserve=", &call->create_thread.reserve );
|
dump_uint64( ",reserve=", &call->create_thread.reserve );
|
||||||
dump_uint64( ",commit=", &call->create_thread.commit );
|
dump_uint64( ",commit=", &call->create_thread.commit );
|
||||||
fprintf( stderr, ",flags=%x", call->create_thread.flags );
|
fprintf( stderr, ",flags=%x", call->create_thread.flags );
|
||||||
|
|
Loading…
Reference in New Issue