ntdll: Get rid of signal_init_syscalls().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
42e42e9085
commit
e5982993ae
|
@ -111,7 +111,6 @@ void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) = NU
|
||||||
void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) = NULL;
|
void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) = NULL;
|
||||||
|
|
||||||
static NTSTATUS (CDECL *p__wine_set_unix_funcs)( int version, const struct unix_funcs *funcs );
|
static NTSTATUS (CDECL *p__wine_set_unix_funcs)( int version, const struct unix_funcs *funcs );
|
||||||
static void *syscall_dispatcher;
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
static void fatal_error( const char *err, ... ) __attribute__((noreturn, format(printf,1,2)));
|
static void fatal_error( const char *err, ... ) __attribute__((noreturn, format(printf,1,2)));
|
||||||
|
@ -843,7 +842,7 @@ static void load_ntdll_functions( HMODULE module )
|
||||||
if ((ptr = (void *)find_named_export( module, ntdll_exports, #name ))) *ptr = val; \
|
if ((ptr = (void *)find_named_export( module, ntdll_exports, #name ))) *ptr = val; \
|
||||||
else ERR( "%s not found\n", #name )
|
else ERR( "%s not found\n", #name )
|
||||||
|
|
||||||
SET_PTR( __wine_syscall_dispatcher, syscall_dispatcher );
|
SET_PTR( __wine_syscall_dispatcher, __wine_syscall_dispatcher );
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
SET_PTR( __wine_ldt_copy, &__wine_ldt_copy );
|
SET_PTR( __wine_ldt_copy, &__wine_ldt_copy );
|
||||||
#endif
|
#endif
|
||||||
|
@ -1870,7 +1869,6 @@ static void start_main_thread(void)
|
||||||
startup_info_size = server_init_process();
|
startup_info_size = server_init_process();
|
||||||
virtual_map_user_shared_data();
|
virtual_map_user_shared_data();
|
||||||
init_cpu_info();
|
init_cpu_info();
|
||||||
syscall_dispatcher = signal_init_syscalls();
|
|
||||||
init_files();
|
init_files();
|
||||||
load_libwine();
|
load_libwine();
|
||||||
init_startup_info();
|
init_startup_info();
|
||||||
|
|
|
@ -849,15 +849,6 @@ void signal_init_process(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* signal_init_syscalls
|
|
||||||
*/
|
|
||||||
void *signal_init_syscalls(void)
|
|
||||||
{
|
|
||||||
return __wine_syscall_dispatcher;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* init_thread_context
|
* init_thread_context
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1033,15 +1033,6 @@ void signal_init_process(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* signal_init_syscalls
|
|
||||||
*/
|
|
||||||
void *signal_init_syscalls(void)
|
|
||||||
{
|
|
||||||
return __wine_syscall_dispatcher;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* init_thread_context
|
* init_thread_context
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2411,15 +2411,6 @@ void signal_init_process(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* signal_init_syscalls
|
|
||||||
*/
|
|
||||||
void *signal_init_syscalls(void)
|
|
||||||
{
|
|
||||||
return NtCurrentTeb()->WOW32Reserved = __wine_syscall_dispatcher;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* init_thread_context
|
* init_thread_context
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2656,6 +2656,12 @@ void signal_init_thread( TEB *teb )
|
||||||
void signal_init_process(void)
|
void signal_init_process(void)
|
||||||
{
|
{
|
||||||
struct sigaction sig_act;
|
struct sigaction sig_act;
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
|
/* sneak in a syscall dispatcher pointer at a fixed address (7ffe1000) */
|
||||||
|
ptr = (char *)user_shared_data + page_size;
|
||||||
|
anon_mmap_fixed( ptr, page_size, PROT_READ | PROT_WRITE, 0 );
|
||||||
|
*(void **)ptr = __wine_syscall_dispatcher;
|
||||||
|
|
||||||
if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE) __wine_syscall_flags |= SYSCALL_HAVE_XSAVE;
|
if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE) __wine_syscall_flags |= SYSCALL_HAVE_XSAVE;
|
||||||
if (xstate_compaction_enabled) __wine_syscall_flags |= SYSCALL_HAVE_XSAVEC;
|
if (xstate_compaction_enabled) __wine_syscall_flags |= SYSCALL_HAVE_XSAVEC;
|
||||||
|
@ -2687,22 +2693,6 @@ void signal_init_process(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
|
||||||
* signal_init_syscalls
|
|
||||||
*/
|
|
||||||
void *signal_init_syscalls(void)
|
|
||||||
{
|
|
||||||
void *ptr;
|
|
||||||
|
|
||||||
/* sneak in a syscall dispatcher pointer at a fixed address (7ffe1000) */
|
|
||||||
ptr = (char *)user_shared_data + page_size;
|
|
||||||
anon_mmap_fixed( ptr, page_size, PROT_READ | PROT_WRITE, 0 );
|
|
||||||
*(void **)ptr = __wine_syscall_dispatcher;
|
|
||||||
|
|
||||||
return __wine_syscall_dispatcher;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* init_thread_context
|
* init_thread_context
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -243,7 +243,6 @@ extern NTSTATUS signal_alloc_thread( TEB *teb ) DECLSPEC_HIDDEN;
|
||||||
extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN;
|
extern void signal_free_thread( TEB *teb ) DECLSPEC_HIDDEN;
|
||||||
extern void signal_init_thread( TEB *teb ) DECLSPEC_HIDDEN;
|
extern void signal_init_thread( TEB *teb ) DECLSPEC_HIDDEN;
|
||||||
extern void signal_init_process(void) DECLSPEC_HIDDEN;
|
extern void signal_init_process(void) DECLSPEC_HIDDEN;
|
||||||
extern void *signal_init_syscalls(void) DECLSPEC_HIDDEN;
|
|
||||||
extern void DECLSPEC_NORETURN signal_start_thread( PRTL_THREAD_START_ROUTINE entry, void *arg,
|
extern void DECLSPEC_NORETURN signal_start_thread( PRTL_THREAD_START_ROUTINE entry, void *arg,
|
||||||
BOOL suspend, void *thunk, TEB *teb ) DECLSPEC_HIDDEN;
|
BOOL suspend, void *thunk, TEB *teb ) DECLSPEC_HIDDEN;
|
||||||
extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int) ) DECLSPEC_HIDDEN;
|
extern void DECLSPEC_NORETURN signal_exit_thread( int status, void (*func)(int) ) DECLSPEC_HIDDEN;
|
||||||
|
|
Loading…
Reference in New Issue