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
a0a62463
Commit
a0a62463
authored
Feb 19, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Introduce signal_init_syscalls.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3d1a98f4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
7 deletions
+49
-7
loader.c
dlls/ntdll/unix/loader.c
+3
-1
signal_arm.c
dlls/ntdll/unix/signal_arm.c
+9
-0
signal_arm64.c
dlls/ntdll/unix/signal_arm64.c
+10
-0
signal_i386.c
dlls/ntdll/unix/signal_i386.c
+9
-0
signal_x86_64.c
dlls/ntdll/unix/signal_x86_64.c
+17
-0
unix_private.h
dlls/ntdll/unix/unix_private.h
+1
-0
virtual.c
dlls/ntdll/unix/virtual.c
+0
-6
No files found.
dlls/ntdll/unix/loader.c
View file @
a0a62463
...
...
@@ -104,6 +104,7 @@ void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) = NU
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
void
*
syscall_dispatcher
;
#ifdef __GNUC__
static
void
fatal_error
(
const
char
*
err
,
...
)
__attribute__
((
noreturn
,
format
(
printf
,
1
,
2
)));
...
...
@@ -883,7 +884,7 @@ static void load_ntdll_functions( HMODULE module )
if ((ptr = (void *)find_named_export( module, ntdll_exports, #name ))) *ptr = val; \
else ERR( "%s not found\n", #name )
SET_PTR
(
__wine_syscall_dispatcher
,
__wine_
syscall_dispatcher
);
SET_PTR
(
__wine_syscall_dispatcher
,
syscall_dispatcher
);
#ifdef __i386__
SET_PTR
(
__wine_ldt_copy
,
&
__wine_ldt_copy
);
#endif
...
...
@@ -1650,6 +1651,7 @@ static void start_main_thread(void)
startup_info_size
=
server_init_process
();
virtual_map_user_shared_data
();
init_cpu_info
();
syscall_dispatcher
=
signal_init_syscalls
();
init_files
();
init_startup_info
();
NtCreateKeyedEvent
(
&
keyed_event
,
GENERIC_READ
|
GENERIC_WRITE
,
NULL
,
0
);
...
...
dlls/ntdll/unix/signal_arm.c
View file @
a0a62463
...
...
@@ -963,6 +963,15 @@ void signal_init_process(void)
}
/**********************************************************************
* signal_init_syscalls
*/
void
*
signal_init_syscalls
(
void
)
{
return
__wine_syscall_dispatcher
;
}
/***********************************************************************
* init_thread_context
*/
...
...
dlls/ntdll/unix/signal_arm64.c
View file @
a0a62463
...
...
@@ -1120,6 +1120,16 @@ void signal_init_process(void)
exit
(
1
);
}
/**********************************************************************
* signal_init_syscalls
*/
void
*
signal_init_syscalls
(
void
)
{
return
__wine_syscall_dispatcher
;
}
/***********************************************************************
* init_thread_context
*/
...
...
dlls/ntdll/unix/signal_i386.c
View file @
a0a62463
...
...
@@ -2467,6 +2467,15 @@ void signal_init_process(void)
}
/**********************************************************************
* signal_init_syscalls
*/
void
*
signal_init_syscalls
(
void
)
{
return
__wine_syscall_dispatcher
;
}
/***********************************************************************
* init_thread_context
*/
...
...
dlls/ntdll/unix/signal_x86_64.c
View file @
a0a62463
...
...
@@ -34,6 +34,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/mman.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
...
...
@@ -2787,6 +2788,22 @@ 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
*/
...
...
dlls/ntdll/unix/unix_private.h
View file @
a0a62463
...
...
@@ -208,6 +208,7 @@ extern NTSTATUS signal_alloc_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_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
,
BOOL
suspend
,
void
*
thunk
,
TEB
*
teb
)
DECLSPEC_HIDDEN
;
extern
void
DECLSPEC_NORETURN
signal_exit_thread
(
int
status
,
void
(
*
func
)(
int
)
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/unix/virtual.c
View file @
a0a62463
...
...
@@ -2597,12 +2597,6 @@ TEB *virtual_alloc_first_teb(void)
exit
(
1
);
}
#ifdef __x86_64__
/* 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
;
#endif
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
teb_block
,
0
,
&
total
,
MEM_RESERVE
|
MEM_TOP_DOWN
,
PAGE_READWRITE
);
teb_block_pos
=
30
;
...
...
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