Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
92b6ab2d
Commit
92b6ab2d
authored
Nov 17, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Store the service table entry directly into the ntdll variable.
parent
c8ecc359
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
36 deletions
+6
-36
loader.c
dlls/ntdll/unix/loader.c
+0
-31
main.c
dlls/win32u/main.c
+1
-1
syscall.c
dlls/win32u/syscall.c
+4
-3
unixlib.h
include/wine/unixlib.h
+1
-1
No files found.
dlls/ntdll/unix/loader.c
View file @
92b6ab2d
...
...
@@ -920,37 +920,6 @@ static NTSTATUS dlopen_dll( const char *so_name, UNICODE_STRING *nt_name, void *
/***********************************************************************
* ntdll_init_syscalls
*/
NTSTATUS
ntdll_init_syscalls
(
SYSTEM_SERVICE_TABLE
*
table
,
void
**
dispatcher
)
{
struct
syscall_info
{
void
*
dispatcher
;
UINT
version
;
USHORT
id
;
USHORT
limit
;
/* USHORT names[limit]; */
/* BYTE args[limit]; */
}
*
info
=
(
struct
syscall_info
*
)
dispatcher
;
if
(
info
->
version
!=
0xca110001
)
{
ERR
(
"invalid syscall table version %x
\n
"
,
info
->
version
);
NtTerminateProcess
(
GetCurrentProcess
(),
STATUS_INVALID_PARAMETER
);
}
if
(
info
->
limit
!=
table
->
ServiceLimit
)
{
ERR
(
"syscall count mismatch %u / %lu
\n
"
,
info
->
limit
,
table
->
ServiceLimit
);
NtTerminateProcess
(
GetCurrentProcess
(),
STATUS_INVALID_PARAMETER
);
}
info
->
dispatcher
=
__wine_syscall_dispatcher
;
KeServiceDescriptorTable
[
info
->
id
]
=
*
table
;
return
STATUS_SUCCESS
;
}
/***********************************************************************
* load_so_dll
*/
static
NTSTATUS
load_so_dll
(
void
*
args
)
...
...
dlls/win32u/main.c
View file @
92b6ab2d
...
...
@@ -61,7 +61,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, void *reserved )
__wine_syscall_dispatcher
=
*
dispatcher_ptr
;
if
(
!
NtQueryVirtualMemory
(
GetCurrentProcess
(),
inst
,
MemoryWineUnixFuncs
,
&
win32u_handle
,
sizeof
(
win32u_handle
),
NULL
))
__wine_unix_call
(
win32u_handle
,
0
,
&
__wine_syscall_dispatcher
);
__wine_unix_call
(
win32u_handle
,
0
,
NULL
);
break
;
}
return
TRUE
;
...
...
dlls/win32u/syscall.c
View file @
92b6ab2d
...
...
@@ -58,7 +58,7 @@ static BYTE arguments[ARRAY_SIZE(syscalls)] =
#undef SYSCALL_ENTRY
};
static
SYSTEM_SERVICE_TABLE
syscall_table
=
static
const
SYSTEM_SERVICE_TABLE
syscall_table
=
{
(
ULONG_PTR
*
)
syscalls
,
0
,
...
...
@@ -66,7 +66,7 @@ static SYSTEM_SERVICE_TABLE syscall_table =
arguments
};
static
NTSTATUS
init
(
void
*
dispatcher
)
static
NTSTATUS
init
(
void
*
args
)
{
#ifdef _WIN64
if
(
NtCurrentTeb
()
->
WowTebOffset
)
...
...
@@ -78,7 +78,8 @@ static NTSTATUS init( void *dispatcher )
}
#endif
return
ntdll_init_syscalls
(
&
syscall_table
,
dispatcher
);
KeServiceDescriptorTable
[
1
]
=
syscall_table
;
return
STATUS_SUCCESS
;
}
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
...
...
include/wine/unixlib.h
View file @
92b6ab2d
...
...
@@ -31,6 +31,7 @@ typedef NTSTATUS (*unixlib_entry_t)( void *args );
extern
DECLSPEC_EXPORT
const
unixlib_entry_t
__wine_unix_call_funcs
[];
extern
DECLSPEC_EXPORT
const
unixlib_entry_t
__wine_unix_call_wow64_funcs
[];
extern
DECLSPEC_EXPORT
SYSTEM_SERVICE_TABLE
KeServiceDescriptorTable
[
4
];
/* some useful helpers from ntdll */
NTSYSAPI
const
char
*
ntdll_get_build_dir
(
void
);
...
...
@@ -39,7 +40,6 @@ NTSYSAPI DWORD ntdll_umbstowcs( const char *src, DWORD srclen, WCHAR *dst, DWORD
NTSYSAPI
int
ntdll_wcstoumbs
(
const
WCHAR
*
src
,
DWORD
srclen
,
char
*
dst
,
DWORD
dstlen
,
BOOL
strict
);
NTSYSAPI
int
ntdll_wcsicmp
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
);
NTSYSAPI
int
ntdll_wcsnicmp
(
const
WCHAR
*
str1
,
const
WCHAR
*
str2
,
int
n
);
NTSYSAPI
NTSTATUS
ntdll_init_syscalls
(
SYSTEM_SERVICE_TABLE
*
table
,
void
**
dispatcher
);
/* exception handling */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment