Commit 57281794 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Add a custom type for the Unix functions table handle.

parent d91d05b8
...@@ -1141,7 +1141,7 @@ static NTSTATUS CDECL init_unix_lib( void *module, DWORD reason, const void *ptr ...@@ -1141,7 +1141,7 @@ static NTSTATUS CDECL init_unix_lib( void *module, DWORD reason, const void *ptr
/*********************************************************************** /***********************************************************************
* __wine_unix_call * __wine_unix_call
*/ */
NTSTATUS CDECL __wine_unix_call( UINT64 handle, unsigned int code, void *args ) NTSTATUS CDECL __wine_unix_call( unixlib_handle_t handle, unsigned int code, void *args )
{ {
return ((unixlib_entry_t*)(UINT_PTR)handle)[code]( args ); return ((unixlib_entry_t*)(UINT_PTR)handle)[code]( args );
} }
......
...@@ -4345,14 +4345,14 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr, ...@@ -4345,14 +4345,14 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
case MemoryWineUnixFuncs: case MemoryWineUnixFuncs:
case MemoryWineUnixWow64Funcs: case MemoryWineUnixWow64Funcs:
if (len != sizeof(UINT64)) return STATUS_INFO_LENGTH_MISMATCH; if (len != sizeof(unixlib_handle_t)) return STATUS_INFO_LENGTH_MISMATCH;
if (process == GetCurrentProcess()) if (process == GetCurrentProcess())
{ {
void *module = (void *)addr; void *module = (void *)addr;
void *funcs = NULL; void *funcs = NULL;
status = get_builtin_unix_funcs( module, info_class == MemoryWineUnixWow64Funcs, &funcs ); status = get_builtin_unix_funcs( module, info_class == MemoryWineUnixWow64Funcs, &funcs );
if (!status) *(UINT64 *)buffer = (UINT_PTR)funcs; if (!status) *(unixlib_handle_t *)buffer = (UINT_PTR)funcs;
return status; return status;
} }
return STATUS_INVALID_HANDLE; return STATUS_INVALID_HANDLE;
......
...@@ -4612,11 +4612,12 @@ static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le) ...@@ -4612,11 +4612,12 @@ static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
#ifdef __WINESRC__ #ifdef __WINESRC__
typedef NTSTATUS (*unixlib_entry_t)( void *args );
typedef UINT64 unixlib_handle_t;
/* Wine internal functions */ /* Wine internal functions */
extern NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out ); extern NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out );
extern NTSTATUS CDECL __wine_unix_call( UINT64 handle, unsigned int code, void *args ); extern NTSTATUS CDECL __wine_unix_call( unixlib_handle_t handle, unsigned int code, void *args );
typedef NTSTATUS (*unixlib_entry_t)( void *args );
/* The thread information for 16-bit threads */ /* The thread information for 16-bit threads */
/* NtCurrentTeb()->SubSystemTib points to this */ /* NtCurrentTeb()->SubSystemTib points to this */
......
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