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
8a3ba513
Commit
8a3ba513
authored
Feb 14, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Replace the wine_server_call() syscall by a Unix call.
parent
a14b4c7d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
46 deletions
+65
-46
loader.c
dlls/ntdll/loader.c
+9
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
loader.c
dlls/ntdll/unix/loader.c
+2
-1
server.c
dlls/ntdll/unix/server.c
+50
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+2
-0
unixlib.h
dlls/ntdll/unixlib.h
+1
-0
struct32.h
dlls/wow64/struct32.h
+0
-18
syscall.c
dlls/wow64/syscall.c
+0
-25
syscall.h
dlls/wow64/syscall.h
+0
-1
No files found.
dlls/ntdll/loader.c
View file @
8a3ba513
...
...
@@ -3210,6 +3210,15 @@ NTSTATUS WINAPI __wine_unix_spawnvp( char * const argv[], int wait )
}
/***********************************************************************
* wine_server_call
*/
unsigned
int
CDECL
wine_server_call
(
void
*
req_ptr
)
{
return
WINE_UNIX_CALL
(
unix_wine_server_call
,
req_ptr
);
}
/******************************************************************
* LdrLoadDll (NTDLL.@)
*/
...
...
dlls/ntdll/ntdll.spec
View file @
8a3ba513
...
...
@@ -1688,7 +1688,7 @@
# or 'wine_' (for user-visible functions) to avoid namespace conflicts.
# Server interface
@ cdecl -
syscall -
norelay wine_server_call(ptr)
@ cdecl -norelay wine_server_call(ptr)
@ cdecl -syscall wine_server_fd_to_handle(long long long ptr)
@ cdecl -syscall wine_server_handle_to_fd(long long ptr ptr)
...
...
dlls/ntdll/unix/loader.c
View file @
8a3ba513
...
...
@@ -358,7 +358,6 @@ static void * const syscalls[] =
NtWriteVirtualMemory
,
NtYieldExecution
,
wine_nt_to_unix_file_name
,
wine_server_call
,
wine_server_fd_to_handle
,
wine_server_handle_to_fd
,
wine_unix_to_nt_file_name
,
...
...
@@ -2060,6 +2059,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
load_so_dll
,
unwind_builtin_dll
,
unixcall_wine_dbg_write
,
unixcall_wine_server_call
,
unixcall_wine_spawnvp
,
system_time_precise
,
};
...
...
@@ -2078,6 +2078,7 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
wow64_load_so_dll
,
wow64_unwind_builtin_dll
,
wow64_wine_dbg_write
,
wow64_wine_server_call
,
wow64_wine_spawnvp
,
system_time_precise
,
};
...
...
dlls/ntdll/unix/server.c
View file @
8a3ba513
...
...
@@ -287,6 +287,17 @@ unsigned int CDECL wine_server_call( void *req_ptr )
/***********************************************************************
* unixcall_wine_server_call
*
* Perform a server call.
*/
NTSTATUS
unixcall_wine_server_call
(
void
*
args
)
{
return
wine_server_call
(
args
);
}
/***********************************************************************
* server_enter_uninterrupted_section
*/
void
server_enter_uninterrupted_section
(
pthread_mutex_t
*
mutex
,
sigset_t
*
sigset
)
...
...
@@ -1764,3 +1775,42 @@ NTSTATUS WINAPI NtClose( HANDLE handle )
}
return
ret
;
}
#ifdef _WIN64
struct
__server_request_info32
{
union
{
union
generic_request
req
;
union
generic_reply
reply
;
}
u
;
unsigned
int
data_count
;
ULONG
reply_data
;
struct
{
ULONG
ptr
;
data_size_t
size
;
}
data
[
__SERVER_MAX_DATA
];
};
/**********************************************************************
* wow64_wine_server_call
*/
NTSTATUS
wow64_wine_server_call
(
void
*
args
)
{
struct
__server_request_info32
*
req32
=
args
;
unsigned
int
i
;
NTSTATUS
status
;
struct
__server_request_info
req
;
req
.
u
.
req
=
req32
->
u
.
req
;
req
.
data_count
=
req32
->
data_count
;
for
(
i
=
0
;
i
<
req
.
data_count
;
i
++
)
{
req
.
data
[
i
].
ptr
=
ULongToPtr
(
req32
->
data
[
i
].
ptr
);
req
.
data
[
i
].
size
=
req32
->
data
[
i
].
size
;
}
req
.
reply_data
=
ULongToPtr
(
req32
->
reply_data
);
status
=
wine_server_call
(
&
req
);
req32
->
u
.
reply
=
req
.
u
.
reply
;
return
status
;
}
#endif
/* _WIN64 */
dlls/ntdll/unix/unix_private.h
View file @
8a3ba513
...
...
@@ -284,9 +284,11 @@ extern void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULO
extern
void
set_async_direct_result
(
HANDLE
*
async_handle
,
NTSTATUS
status
,
ULONG_PTR
information
,
BOOL
mark_pending
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
unixcall_wine_dbg_write
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
unixcall_wine_server_call
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
unixcall_wine_spawnvp
(
void
*
args
)
DECLSPEC_HIDDEN
;
#ifdef _WIN64
extern
NTSTATUS
wow64_wine_dbg_write
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wow64_wine_server_call
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wow64_wine_spawnvp
(
void
*
args
)
DECLSPEC_HIDDEN
;
#endif
...
...
dlls/ntdll/unixlib.h
View file @
8a3ba513
...
...
@@ -55,6 +55,7 @@ enum ntdll_unix_funcs
unix_load_so_dll
,
unix_unwind_builtin_dll
,
unix_wine_dbg_write
,
unix_wine_server_call
,
unix_wine_spawnvp
,
unix_system_time_precise
,
};
...
...
dlls/wow64/struct32.h
View file @
8a3ba513
...
...
@@ -667,24 +667,6 @@ typedef struct
ULONG
NumberOfBytes
;
}
MEMORY_RANGE_ENTRY32
;
struct
__server_iovec32
{
ULONG
ptr
;
data_size_t
size
;
};
struct
__server_request_info32
{
union
{
union
generic_request
req
;
union
generic_reply
reply
;
}
u
;
unsigned
int
data_count
;
ULONG
reply_data
;
struct
__server_iovec32
data
[
__SERVER_MAX_DATA
];
};
typedef
struct
{
ULONG
LowestStartingAddress
;
...
...
dlls/wow64/syscall.c
View file @
8a3ba513
...
...
@@ -542,31 +542,6 @@ NTSTATUS WINAPI wow64_NtSetDefaultUILanguage( UINT *args )
/**********************************************************************
* wow64_wine_server_call
*/
NTSTATUS
WINAPI
wow64_wine_server_call
(
UINT
*
args
)
{
struct
__server_request_info32
*
req32
=
get_ptr
(
&
args
);
unsigned
int
i
;
NTSTATUS
status
;
struct
__server_request_info
req
;
req
.
u
.
req
=
req32
->
u
.
req
;
req
.
data_count
=
req32
->
data_count
;
for
(
i
=
0
;
i
<
req
.
data_count
;
i
++
)
{
req
.
data
[
i
].
ptr
=
ULongToPtr
(
req32
->
data
[
i
].
ptr
);
req
.
data
[
i
].
size
=
req32
->
data
[
i
].
size
;
}
req
.
reply_data
=
ULongToPtr
(
req32
->
reply_data
);
status
=
wine_server_call
(
&
req
);
req32
->
u
.
reply
=
req
.
u
.
reply
;
return
status
;
}
/**********************************************************************
* get_syscall_num
*/
static
DWORD
get_syscall_num
(
const
BYTE
*
syscall
)
...
...
dlls/wow64/syscall.h
View file @
8a3ba513
...
...
@@ -258,7 +258,6 @@
SYSCALL_ENTRY( NtWriteVirtualMemory ) \
SYSCALL_ENTRY( NtYieldExecution ) \
SYSCALL_ENTRY( wine_nt_to_unix_file_name ) \
SYSCALL_ENTRY( wine_server_call ) \
SYSCALL_ENTRY( wine_server_fd_to_handle ) \
SYSCALL_ENTRY( wine_server_handle_to_fd ) \
SYSCALL_ENTRY( wine_unix_to_nt_file_name )
...
...
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