Alexandre Julliard : ntdll: Use syscalls for a couple of Wine internal functions.
Alexandre Julliard
julliard at winehq.org
Tue Aug 25 16:16:57 CDT 2020
Module: wine
Branch: master
Commit: a8ddcf7dfe64b727a0c06d0a008a0ca5b227868c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a8ddcf7dfe64b727a0c06d0a008a0ca5b227868c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Aug 25 14:08:35 2020 +0200
ntdll: Use syscalls for a couple of Wine internal functions.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/ntdll.spec | 4 ++--
dlls/ntdll/process.c | 18 ------------------
dlls/ntdll/unix/loader.c | 1 -
dlls/ntdll/unix/process.c | 19 +++++++++++++++++++
dlls/ntdll/unix/unix_private.h | 1 -
dlls/ntdll/unix/virtual.c | 4 ++--
dlls/ntdll/unixlib.h | 4 +---
dlls/ntdll/virtual.c | 9 ---------
8 files changed, 24 insertions(+), 36 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index 5f69cfe785..c4d667a79a 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1586,7 +1586,7 @@
@ cdecl -syscall wine_server_handle_to_fd(long long ptr ptr)
@ cdecl -syscall wine_server_release_fd(long long)
@ cdecl -syscall wine_server_send_fd(long)
-@ cdecl __wine_make_process_system()
+@ cdecl -syscall __wine_make_process_system()
@ cdecl __wine_set_unix_funcs(long ptr)
@ extern __wine_syscall_dispatcher
@ extern -arch=i386 __wine_ldt_copy
@@ -1598,7 +1598,7 @@
@ cdecl -norelay __wine_dbg_strdup(str)
# Virtual memory
-@ cdecl __wine_locked_recvmsg(long ptr long)
+@ cdecl -syscall __wine_locked_recvmsg(long ptr long)
# Version
@ cdecl -syscall wine_get_version()
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
index 77ba5b371e..c0b36be38e 100644
--- a/dlls/ntdll/process.c
+++ b/dlls/ntdll/process.c
@@ -35,7 +35,6 @@
#include "winternl.h"
#include "ntdll_misc.h"
#include "wine/exception.h"
-#include "wine/server.h"
WINE_DEFAULT_DEBUG_CHANNEL(process);
@@ -55,23 +54,6 @@ PEB * WINAPI RtlGetCurrentPeb(void)
return NtCurrentTeb()->Peb;
}
-/***********************************************************************
- * __wine_make_process_system (NTDLL.@)
- *
- * Mark the current process as a system process.
- * Returns the event that is signaled when all non-system processes have exited.
- */
-HANDLE CDECL __wine_make_process_system(void)
-{
- HANDLE ret = 0;
- SERVER_START_REQ( make_process_system )
- {
- if (!wine_server_call( req )) ret = wine_server_ptr_handle( reply->event );
- }
- SERVER_END_REQ;
- return ret;
-}
-
/***********************************************************************
* restart_process
*/
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index 1a449714d0..40a7ce466c 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1347,7 +1347,6 @@ static struct unix_funcs unix_funcs =
get_unix_codepage_data,
get_locales,
virtual_map_section,
- virtual_locked_recvmsg,
virtual_release_address_space,
exec_process,
server_init_process_done,
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
index 9e48982839..6b41080cee 100644
--- a/dlls/ntdll/unix/process.c
+++ b/dlls/ntdll/unix/process.c
@@ -1666,3 +1666,22 @@ NTSTATUS WINAPI NtResumeProcess( HANDLE handle )
SERVER_END_REQ;
return ret;
}
+
+
+/***********************************************************************
+ * __wine_make_process_system (NTDLL.@)
+ *
+ * Mark the current process as a system process.
+ * Returns the event that is signaled when all non-system processes have exited.
+ */
+HANDLE CDECL __wine_make_process_system(void)
+{
+ HANDLE ret = 0;
+
+ SERVER_START_REQ( make_process_system )
+ {
+ if (!wine_server_call( req )) ret = wine_server_ptr_handle( reply->event );
+ }
+ SERVER_END_REQ;
+ return ret;
+}
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index a87657096d..aba102cf93 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -118,7 +118,6 @@ extern void CDECL get_locales( WCHAR *sys, WCHAR *user ) DECLSPEC_HIDDEN;
extern NTSTATUS CDECL virtual_map_section( HANDLE handle, PVOID *addr_ptr, unsigned short zero_bits_64, SIZE_T commit_size,
const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr, ULONG alloc_type,
ULONG protect, pe_image_info_t *image_info ) DECLSPEC_HIDDEN;
-extern ssize_t CDECL virtual_locked_recvmsg( int fd, struct msghdr *hdr, int flags ) DECLSPEC_HIDDEN;
extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN;
extern void CDECL server_init_process_done( void *relay ) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
index e3f2820de5..1173293854 100644
--- a/dlls/ntdll/unix/virtual.c
+++ b/dlls/ntdll/unix/virtual.c
@@ -3072,9 +3072,9 @@ ssize_t virtual_locked_pread( int fd, void *addr, size_t size, off_t offset )
/***********************************************************************
- * virtual_locked_recvmsg
+ * __wine_locked_recvmsg (NTDLL.@)
*/
-ssize_t CDECL virtual_locked_recvmsg( int fd, struct msghdr *hdr, int flags )
+ssize_t CDECL __wine_locked_recvmsg( int fd, struct msghdr *hdr, int flags )
{
sigset_t sigset;
size_t i;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index d3fedc196b..1c6841e980 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -24,11 +24,10 @@
#include "wine/server.h"
#include "wine/debug.h"
-struct msghdr;
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 97
+#define NTDLL_UNIXLIB_VERSION 98
struct unix_funcs
{
@@ -83,7 +82,6 @@ struct unix_funcs
NTSTATUS (CDECL *virtual_map_section)( HANDLE handle, PVOID *addr_ptr, unsigned short zero_bits_64, SIZE_T commit_size,
const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr, ULONG alloc_type,
ULONG protect, pe_image_info_t *image_info );
- ssize_t (CDECL *virtual_locked_recvmsg)( int fd, struct msghdr *hdr, int flags );
void (CDECL *virtual_release_address_space)(void);
/* thread/process functions */
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 64eef6aa84..acaa6f7565 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -120,12 +120,3 @@ void CDECL virtual_clear_thread_stack( void *stack_end )
NtFreeVirtualMemory( GetCurrentProcess(), &stack, &size, MEM_DECOMMIT );
NtAllocateVirtualMemory( GetCurrentProcess(), &stack, 0, &size, MEM_COMMIT, PAGE_READWRITE );
}
-
-
-/***********************************************************************
- * __wine_locked_recvmsg
- */
-ssize_t CDECL __wine_locked_recvmsg( int fd, struct msghdr *hdr, int flags )
-{
- return unix_funcs->virtual_locked_recvmsg( fd, hdr, flags );
-}
More information about the wine-cvs
mailing list