ntdll: Set the initial environment and command line in the process parameters on...
[wine.git] / dlls / ntdll / unixlib.h
blob72722deb3365c96e042616afb6fac26f24b9d6f4
1 /*
2 * Ntdll Unix interface
4 * Copyright (C) 2020 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __NTDLL_UNIXLIB_H
22 #define __NTDLL_UNIXLIB_H
24 #include "wine/server.h"
25 #include "wine/debug.h"
27 struct _DISPATCHER_CONTEXT;
29 /* increment this when you change the function table */
30 #define NTDLL_UNIXLIB_VERSION 110
32 struct unix_funcs
34 /* Nt* functions */
35 #ifdef __aarch64__
36 TEB * (WINAPI *NtCurrentTeb)(void);
37 #endif
39 /* other Win32 API functions */
40 NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
41 LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
42 NTSTATUS (WINAPI *RtlWaitOnAddress)( const void *addr, const void *cmp, SIZE_T size,
43 const LARGE_INTEGER *timeout );
44 void (WINAPI *RtlWakeAddressAll)( const void *addr );
45 void (WINAPI *RtlWakeAddressSingle)( const void *addr );
47 /* fast locks */
48 NTSTATUS (CDECL *fast_RtlpWaitForCriticalSection)( RTL_CRITICAL_SECTION *crit, int timeout );
49 NTSTATUS (CDECL *fast_RtlpUnWaitCriticalSection)( RTL_CRITICAL_SECTION *crit );
50 NTSTATUS (CDECL *fast_RtlDeleteCriticalSection)( RTL_CRITICAL_SECTION *crit );
51 NTSTATUS (CDECL *fast_RtlTryAcquireSRWLockExclusive)( RTL_SRWLOCK *lock );
52 NTSTATUS (CDECL *fast_RtlAcquireSRWLockExclusive)( RTL_SRWLOCK *lock );
53 NTSTATUS (CDECL *fast_RtlTryAcquireSRWLockShared)( RTL_SRWLOCK *lock );
54 NTSTATUS (CDECL *fast_RtlAcquireSRWLockShared)( RTL_SRWLOCK *lock );
55 NTSTATUS (CDECL *fast_RtlReleaseSRWLockExclusive)( RTL_SRWLOCK *lock );
56 NTSTATUS (CDECL *fast_RtlReleaseSRWLockShared)( RTL_SRWLOCK *lock );
57 NTSTATUS (CDECL *fast_RtlWakeConditionVariable)( RTL_CONDITION_VARIABLE *variable, int count );
58 NTSTATUS (CDECL *fast_wait_cv)( RTL_CONDITION_VARIABLE *variable, const void *value,
59 const LARGE_INTEGER *timeout );
61 /* math functions */
62 double (CDECL *atan)( double d );
63 double (CDECL *ceil)( double d );
64 double (CDECL *cos)( double d );
65 double (CDECL *fabs)( double d );
66 double (CDECL *floor)( double d );
67 double (CDECL *log)( double d );
68 double (CDECL *pow)( double x, double y );
69 double (CDECL *sin)( double d );
70 double (CDECL *sqrt)( double d );
71 double (CDECL *tan)( double d );
73 /* environment functions */
74 NTSTATUS (CDECL *get_dynamic_environment)( WCHAR *env, SIZE_T *size );
75 USHORT * (CDECL *get_unix_codepage_data)(void);
76 void (CDECL *get_locales)( WCHAR *sys, WCHAR *user );
78 /* virtual memory functions */
79 void (CDECL *virtual_release_address_space)(void);
81 /* file functions */
82 void (CDECL *set_show_dot_files)( BOOL enable );
84 /* loader functions */
85 NTSTATUS (CDECL *load_so_dll)( UNICODE_STRING *nt_name, void **module );
86 NTSTATUS (CDECL *load_builtin_dll)( UNICODE_STRING *name, void **module, void **unix_entry,
87 SECTION_IMAGE_INFORMATION *image_info );
88 NTSTATUS (CDECL *unload_builtin_dll)( void *module );
89 void (CDECL *init_builtin_dll)( void *module );
90 NTSTATUS (CDECL *unwind_builtin_dll)( ULONG type, struct _DISPATCHER_CONTEXT *dispatch,
91 CONTEXT *context );
93 /* debugging functions */
94 unsigned char (CDECL *dbg_get_channel_flags)( struct __wine_debug_channel *channel );
95 const char * (CDECL *dbg_strdup)( const char *str );
96 int (CDECL *dbg_output)( const char *str );
97 int (CDECL *dbg_header)( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
98 const char *function );
101 #endif /* __NTDLL_UNIXLIB_H */