2020-05-14 15:17:06 +02:00
|
|
|
/*
|
|
|
|
* Ntdll Unix interface
|
|
|
|
*
|
|
|
|
* Copyright (C) 2020 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NTDLL_UNIXLIB_H
|
|
|
|
#define __NTDLL_UNIXLIB_H
|
|
|
|
|
2020-05-17 11:07:02 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
2020-06-25 10:32:47 +02:00
|
|
|
struct _DISPATCHER_CONTEXT;
|
2020-06-01 12:52:05 +02:00
|
|
|
|
2020-05-14 15:17:06 +02:00
|
|
|
/* increment this when you change the function table */
|
2021-06-16 15:33:07 +02:00
|
|
|
#define NTDLL_UNIXLIB_VERSION 123
|
2020-05-14 15:17:06 +02:00
|
|
|
|
|
|
|
struct unix_funcs
|
|
|
|
{
|
2020-05-30 14:21:09 +02:00
|
|
|
/* Nt* functions */
|
2021-01-21 10:37:54 +01:00
|
|
|
#ifdef __aarch64__
|
2020-06-01 12:52:05 +02:00
|
|
|
TEB * (WINAPI *NtCurrentTeb)(void);
|
2021-01-21 10:37:54 +01:00
|
|
|
#endif
|
2020-05-30 14:21:09 +02:00
|
|
|
|
2020-06-05 16:54:17 +02:00
|
|
|
/* other Win32 API functions */
|
|
|
|
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
|
2020-06-25 18:07:38 +02:00
|
|
|
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
|
2020-06-09 12:39:49 +02:00
|
|
|
NTSTATUS (WINAPI *RtlWaitOnAddress)( const void *addr, const void *cmp, SIZE_T size,
|
|
|
|
const LARGE_INTEGER *timeout );
|
|
|
|
void (WINAPI *RtlWakeAddressAll)( const void *addr );
|
|
|
|
void (WINAPI *RtlWakeAddressSingle)( const void *addr );
|
2020-06-05 16:54:17 +02:00
|
|
|
|
2020-06-09 12:35:01 +02:00
|
|
|
/* fast locks */
|
2020-06-09 13:05:58 +02:00
|
|
|
NTSTATUS (CDECL *fast_RtlpWaitForCriticalSection)( RTL_CRITICAL_SECTION *crit, int timeout );
|
|
|
|
NTSTATUS (CDECL *fast_RtlpUnWaitCriticalSection)( RTL_CRITICAL_SECTION *crit );
|
|
|
|
NTSTATUS (CDECL *fast_RtlDeleteCriticalSection)( RTL_CRITICAL_SECTION *crit );
|
2020-06-09 12:35:01 +02:00
|
|
|
NTSTATUS (CDECL *fast_RtlTryAcquireSRWLockExclusive)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlAcquireSRWLockExclusive)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlTryAcquireSRWLockShared)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlAcquireSRWLockShared)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlReleaseSRWLockExclusive)( RTL_SRWLOCK *lock );
|
|
|
|
NTSTATUS (CDECL *fast_RtlReleaseSRWLockShared)( RTL_SRWLOCK *lock );
|
2020-06-09 12:38:37 +02:00
|
|
|
NTSTATUS (CDECL *fast_RtlWakeConditionVariable)( RTL_CONDITION_VARIABLE *variable, int count );
|
2020-08-20 22:38:42 +02:00
|
|
|
NTSTATUS (CDECL *fast_wait_cv)( RTL_CONDITION_VARIABLE *variable, const void *value,
|
|
|
|
const LARGE_INTEGER *timeout );
|
2020-06-09 12:35:01 +02:00
|
|
|
|
2020-06-26 09:12:11 +02:00
|
|
|
/* math functions */
|
|
|
|
double (CDECL *atan)( double d );
|
|
|
|
double (CDECL *ceil)( double d );
|
|
|
|
double (CDECL *cos)( double d );
|
|
|
|
double (CDECL *fabs)( double d );
|
|
|
|
double (CDECL *floor)( double d );
|
|
|
|
double (CDECL *log)( double d );
|
|
|
|
double (CDECL *pow)( double x, double y );
|
|
|
|
double (CDECL *sin)( double d );
|
|
|
|
double (CDECL *sqrt)( double d );
|
|
|
|
double (CDECL *tan)( double d );
|
|
|
|
|
2020-05-17 11:04:47 +02:00
|
|
|
/* virtual memory functions */
|
2020-06-02 17:08:59 +02:00
|
|
|
void (CDECL *virtual_release_address_space)(void);
|
2020-05-17 11:07:02 +02:00
|
|
|
|
2020-06-23 19:39:12 +02:00
|
|
|
/* loader functions */
|
|
|
|
NTSTATUS (CDECL *load_so_dll)( UNICODE_STRING *nt_name, void **module );
|
|
|
|
void (CDECL *init_builtin_dll)( void *module );
|
2021-03-16 11:10:15 +01:00
|
|
|
NTSTATUS (CDECL *init_unix_lib)( void *module, DWORD reason, const void *ptr_in, void *ptr_out );
|
2020-06-25 10:32:47 +02:00
|
|
|
NTSTATUS (CDECL *unwind_builtin_dll)( ULONG type, struct _DISPATCHER_CONTEXT *dispatch,
|
|
|
|
CONTEXT *context );
|
2020-05-14 15:17:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __NTDLL_UNIXLIB_H */
|