ntdll: Introduce wine_unix_call.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-05-28 19:03:09 +02:00 committed by Alexandre Julliard
parent 69ef7374b4
commit 1b5ea62e8e
3 changed files with 13 additions and 0 deletions

View File

@ -1612,6 +1612,7 @@
@ cdecl -syscall wine_server_handle_to_fd(long long ptr ptr)
# Unix interface
@ cdecl -syscall __wine_unix_call(int64 long ptr)
@ cdecl __wine_set_unix_funcs(long ptr)
@ cdecl __wine_init_unix_lib(long long ptr ptr)
@ extern __wine_syscall_dispatcher

View File

@ -1123,6 +1123,15 @@ static NTSTATUS CDECL init_unix_lib( void *module, DWORD reason, const void *ptr
}
/***********************************************************************
* __wine_unix_call
*/
NTSTATUS CDECL __wine_unix_call( UINT64 handle, unsigned int code, void *args )
{
return ((unixlib_entry_t*)(UINT_PTR)handle)[code]( args );
}
/***********************************************************************
* load_so_dll
*/

View File

@ -4561,6 +4561,9 @@ static inline PLIST_ENTRY RemoveTailList(PLIST_ENTRY le)
/* 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_unix_call( UINT64 handle, unsigned int code, void *args );
typedef NTSTATUS (*unixlib_entry_t)( void *args );
/* The thread information for 16-bit threads */
/* NtCurrentTeb()->SubSystemTib points to this */