2 * Unix interface for Win32 syscalls
4 * Copyright (C) 2021 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
28 #define WIN32_NO_STATUS
31 #include "ntgdi_private.h"
32 #include "ntuser_private.h"
34 #include "wine/unixlib.h"
35 #include "win32syscalls.h"
37 ULONG_PTR zero_bits
= 0;
39 static void * const syscalls
[] =
41 #define SYSCALL_ENTRY(id,name,args) name,
50 static BYTE arguments
[ARRAY_SIZE(syscalls
)] =
52 #define SYSCALL_ENTRY(id,name,args) args,
61 static SYSTEM_SERVICE_TABLE syscall_table
=
63 (ULONG_PTR
*)syscalls
,
69 static NTSTATUS
init( void *dispatcher
)
72 if (NtCurrentTeb()->WowTebOffset
)
74 SYSTEM_BASIC_INFORMATION info
;
76 NtQuerySystemInformation(SystemEmulationBasicInformation
, &info
, sizeof(info
), NULL
);
77 zero_bits
= (ULONG_PTR
)info
.HighestUserAddress
| 0x7fffffff;
81 return ntdll_init_syscalls( &syscall_table
, dispatcher
);
84 const unixlib_entry_t __wine_unix_call_funcs
[] =