ntdll: Use syscalls for a couple of Wine internal functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
af1a328fa0
commit
a8ddcf7dfe
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue