mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
server: Use an explicit struct instead of a typedef for user APCs.
This commit is contained in:
parent
4c0103e58c
commit
305ec347dc
6 changed files with 14 additions and 14 deletions
|
@ -354,7 +354,7 @@ static int wait_select_reply( void *cookie )
|
|||
/***********************************************************************
|
||||
* invoke_user_apc
|
||||
*/
|
||||
static NTSTATUS invoke_user_apc( CONTEXT *context, const user_apc_t *apc, NTSTATUS status )
|
||||
static NTSTATUS invoke_user_apc( CONTEXT *context, const struct user_apc *apc, NTSTATUS status )
|
||||
{
|
||||
return call_user_apc_dispatcher( context, apc->args[0], apc->args[1], apc->args[2],
|
||||
wine_server_get_ptr( apc->func ), status );
|
||||
|
@ -688,7 +688,7 @@ static void invoke_system_apc( const union apc_call *call, union apc_result *res
|
|||
* server_select
|
||||
*/
|
||||
unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT flags,
|
||||
timeout_t abs_timeout, context_t *context, user_apc_t *user_apc )
|
||||
timeout_t abs_timeout, context_t *context, struct user_apc *user_apc )
|
||||
{
|
||||
unsigned int ret;
|
||||
int cookie;
|
||||
|
@ -768,7 +768,7 @@ unsigned int server_wait( const select_op_t *select_op, data_size_t size, UINT f
|
|||
{
|
||||
timeout_t abs_timeout = timeout ? timeout->QuadPart : TIMEOUT_INFINITE;
|
||||
unsigned int ret;
|
||||
user_apc_t apc;
|
||||
struct user_apc apc;
|
||||
|
||||
if (abs_timeout < 0)
|
||||
{
|
||||
|
@ -794,7 +794,7 @@ unsigned int server_wait( const select_op_t *select_op, data_size_t size, UINT f
|
|||
*/
|
||||
NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alertable )
|
||||
{
|
||||
user_apc_t apc;
|
||||
struct user_apc apc;
|
||||
NTSTATUS status;
|
||||
|
||||
if (alertable)
|
||||
|
@ -811,7 +811,7 @@ NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alertable )
|
|||
*/
|
||||
NTSTATUS WINAPI NtTestAlert(void)
|
||||
{
|
||||
user_apc_t apc;
|
||||
struct user_apc apc;
|
||||
NTSTATUS status;
|
||||
|
||||
status = server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, 0, NULL, &apc );
|
||||
|
|
|
@ -209,7 +209,7 @@ extern unsigned int server_call_unlocked( void *req_ptr );
|
|||
extern void server_enter_uninterrupted_section( pthread_mutex_t *mutex, sigset_t *sigset );
|
||||
extern void server_leave_uninterrupted_section( pthread_mutex_t *mutex, sigset_t *sigset );
|
||||
extern unsigned int server_select( const select_op_t *select_op, data_size_t size, UINT flags,
|
||||
timeout_t abs_timeout, context_t *context, user_apc_t *user_apc );
|
||||
timeout_t abs_timeout, context_t *context, struct user_apc *user_apc );
|
||||
extern unsigned int server_wait( const select_op_t *select_op, data_size_t size, UINT flags,
|
||||
const LARGE_INTEGER *timeout );
|
||||
extern unsigned int server_queue_process_apc( HANDLE process, const union apc_call *call,
|
||||
|
|
|
@ -488,18 +488,18 @@ enum apc_type
|
|||
APC_DUP_HANDLE
|
||||
};
|
||||
|
||||
typedef struct
|
||||
struct user_apc
|
||||
{
|
||||
enum apc_type type;
|
||||
int __pad;
|
||||
client_ptr_t func;
|
||||
apc_param_t args[3];
|
||||
} user_apc_t;
|
||||
};
|
||||
|
||||
union apc_call
|
||||
{
|
||||
enum apc_type type;
|
||||
user_apc_t user;
|
||||
struct user_apc user;
|
||||
struct
|
||||
{
|
||||
enum apc_type type;
|
||||
|
|
|
@ -504,18 +504,18 @@ enum apc_type
|
|||
APC_DUP_HANDLE
|
||||
};
|
||||
|
||||
typedef struct
|
||||
struct user_apc
|
||||
{
|
||||
enum apc_type type; /* APC_USER */
|
||||
int __pad;
|
||||
client_ptr_t func; /* void (__stdcall *func)(ULONG_PTR,ULONG_PTR,ULONG_PTR); */
|
||||
apc_param_t args[3]; /* arguments for user function */
|
||||
} user_apc_t;
|
||||
};
|
||||
|
||||
union apc_call
|
||||
{
|
||||
enum apc_type type;
|
||||
user_apc_t user;
|
||||
struct user_apc user;
|
||||
struct
|
||||
{
|
||||
enum apc_type type; /* APC_ASYNC_IO */
|
||||
|
|
|
@ -635,6 +635,7 @@ C_ASSERT( sizeof(struct object_type_info) == 44 );
|
|||
C_ASSERT( sizeof(struct process_info) == 40 );
|
||||
C_ASSERT( sizeof(struct rawinput_device) == 12 );
|
||||
C_ASSERT( sizeof(struct thread_info) == 40 );
|
||||
C_ASSERT( sizeof(struct user_apc) == 40 );
|
||||
C_ASSERT( sizeof(tcp_connection) == 60 );
|
||||
C_ASSERT( sizeof(thread_id_t) == 4 );
|
||||
C_ASSERT( sizeof(timeout_t) == 8 );
|
||||
|
@ -645,7 +646,6 @@ C_ASSERT( sizeof(unsigned __int64) == 8 );
|
|||
C_ASSERT( sizeof(unsigned char) == 1 );
|
||||
C_ASSERT( sizeof(unsigned int) == 4 );
|
||||
C_ASSERT( sizeof(unsigned short) == 2 );
|
||||
C_ASSERT( sizeof(user_apc_t) == 40 );
|
||||
C_ASSERT( sizeof(user_handle_t) == 4 );
|
||||
C_ASSERT( offsetof(struct new_process_request, token) == 12 );
|
||||
C_ASSERT( offsetof(struct new_process_request, debug) == 16 );
|
||||
|
|
|
@ -55,7 +55,6 @@ my %formats =
|
|||
"startup_info_t" => [ 96, 4 ],
|
||||
"tcp_connection" => [ 60, 4 ],
|
||||
"udp_endpoint" => [ 32, 4 ],
|
||||
"user_apc_t" => [ 40, 8 ],
|
||||
"union apc_call" => [ 64, 8 ],
|
||||
"union apc_result" => [ 40, 8 ],
|
||||
"struct filesystem_event" => [ 12, 4 ],
|
||||
|
@ -67,6 +66,7 @@ my %formats =
|
|||
"struct process_info" => [ 40, 8 ],
|
||||
"struct rawinput_device" => [ 12, 4 ],
|
||||
"struct thread_info" => [ 40, 8 ],
|
||||
"struct user_apc" => [ 40, 8 ],
|
||||
);
|
||||
|
||||
my $file_header =
|
||||
|
|
Loading…
Reference in a new issue