Commit 460755a0 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Avoid some duplicate async definitions.

parent 2aea3368
......@@ -135,9 +135,6 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#define MAX_DOS_DRIVES 26
#define FILE_WRITE_TO_END_OF_FILE ((LONGLONG)-1)
#define FILE_USE_FILE_POINTER_POSITION ((LONGLONG)-2)
/* just in case... */
#undef VFAT_IOCTL_READDIR_BOTH
#undef EXT2_IOC_GETFLAGS
......@@ -4680,24 +4677,6 @@ struct async_fileio *alloc_fileio( DWORD size, async_callback_t callback, HANDLE
return io;
}
static async_data_t server_async( HANDLE handle, struct async_fileio *user, HANDLE event,
PIO_APC_ROUTINE apc, void *apc_context, IO_STATUS_BLOCK *io )
{
async_data_t async;
async.handle = wine_server_obj_handle( handle );
async.user = wine_server_client_ptr( user );
async.iosb = wine_server_client_ptr( io );
async.event = wine_server_obj_handle( event );
async.apc = wine_server_client_ptr( apc );
async.apc_context = wine_server_client_ptr( apc_context );
return async;
}
static NTSTATUS wait_async( HANDLE handle, BOOL alertable )
{
return NtWaitForSingleObject( handle, alertable, NULL );
}
/* callback for irp async I/O completion */
static NTSTATUS irp_completion( void *user, ULONG_PTR *info, NTSTATUS status )
{
......
......@@ -96,26 +96,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(winsock);
#define FILE_USE_FILE_POINTER_POSITION ((LONGLONG)-2)
static async_data_t server_async( HANDLE handle, struct async_fileio *user, HANDLE event,
PIO_APC_ROUTINE apc, void *apc_context, IO_STATUS_BLOCK *io )
{
async_data_t async;
async.handle = wine_server_obj_handle( handle );
async.user = wine_server_client_ptr( user );
async.iosb = wine_server_client_ptr( io );
async.event = wine_server_obj_handle( event );
async.apc = wine_server_client_ptr( apc );
async.apc_context = wine_server_client_ptr( apc_context );
return async;
}
static NTSTATUS wait_async( HANDLE handle, BOOL alertable )
{
return NtWaitForSingleObject( handle, alertable, NULL );
}
union unix_sockaddr
{
struct sockaddr addr;
......
......@@ -85,6 +85,9 @@ static const SIZE_T signal_stack_size = 0x10000 - 0x3800;
static const SIZE_T kernel_stack_size = 0x20000;
static const LONG teb_offset = 0x2000;
#define FILE_WRITE_TO_END_OF_FILE ((LONGLONG)-1)
#define FILE_USE_FILE_POINTER_POSITION ((LONGLONG)-2)
/* callbacks to PE ntdll from the Unix side */
extern void (WINAPI *pDbgUiRemoteBreakin)( void *arg ) DECLSPEC_HIDDEN;
extern NTSTATUS (WINAPI *pKiRaiseUserExceptionDispatcher)(void) DECLSPEC_HIDDEN;
......@@ -333,6 +336,24 @@ static inline void mutex_unlock( pthread_mutex_t *mutex )
if (!process_exiting) pthread_mutex_unlock( mutex );
}
static inline async_data_t server_async( HANDLE handle, struct async_fileio *user, HANDLE event,
PIO_APC_ROUTINE apc, void *apc_context, IO_STATUS_BLOCK *io )
{
async_data_t async;
async.handle = wine_server_obj_handle( handle );
async.user = wine_server_client_ptr( user );
async.iosb = wine_server_client_ptr( io );
async.event = wine_server_obj_handle( event );
async.apc = wine_server_client_ptr( apc );
async.apc_context = wine_server_client_ptr( apc_context );
return async;
}
static inline NTSTATUS wait_async( HANDLE handle, BOOL alertable )
{
return NtWaitForSingleObject( handle, alertable, NULL );
}
#ifdef _WIN64
typedef TEB32 WOW_TEB;
static inline TEB64 *NtCurrentTeb64(void) { return NULL; }
......
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