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
f1ff598e
Commit
f1ff598e
authored
Jun 29, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Update the __wine_ldt_copy pointer directly from the Unix library.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2334f4e6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
16 deletions
+17
-16
signal_i386.c
dlls/ntdll/signal_i386.c
+2
-0
thread.c
dlls/ntdll/thread.c
+1
-3
loader.c
dlls/ntdll/unix/loader.c
+7
-0
server.c
dlls/ntdll/unix/server.c
+0
-3
thread.c
dlls/ntdll/unix/thread.c
+1
-5
unix_private.h
dlls/ntdll/unix/unix_private.h
+4
-2
unixlib.h
dlls/ntdll/unixlib.h
+2
-3
No files found.
dlls/ntdll/signal_i386.c
View file @
f1ff598e
...
...
@@ -95,6 +95,8 @@ static inline struct x86_thread_data *x86_thread_data(void)
return
(
struct
x86_thread_data
*
)
NtCurrentTeb
()
->
SystemReserved2
;
}
struct
ldt_copy
*
__wine_ldt_copy
=
NULL
;
/* Exception record for handling exceptions happening inside exception handlers */
typedef
struct
{
...
...
dlls/ntdll/thread.c
View file @
f1ff598e
...
...
@@ -46,8 +46,6 @@ static RTL_BITMAP tls_bitmap;
static
RTL_BITMAP
tls_expansion_bitmap
;
static
RTL_BITMAP
fls_bitmap
;
struct
ldt_copy
*
__wine_ldt_copy
=
NULL
;
static
RTL_CRITICAL_SECTION
peb_lock
;
static
RTL_CRITICAL_SECTION_DEBUG
critsect_debug
=
{
...
...
@@ -104,7 +102,7 @@ int __cdecl __wine_dbg_output( const char *str )
TEB
*
thread_init
(
SIZE_T
*
info_size
)
{
ULONG_PTR
val
;
TEB
*
teb
=
unix_funcs
->
init_threading
(
&
__wine_ldt_copy
,
info_size
);
TEB
*
teb
=
unix_funcs
->
init_threading
(
info_size
);
peb
=
teb
->
Peb
;
peb
->
FastPebLock
=
&
peb_lock
;
...
...
dlls/ntdll/unix/loader.c
View file @
f1ff598e
...
...
@@ -838,6 +838,13 @@ static void fixup_ntdll_imports( const IMAGE_NT_HEADERS *nt )
GET_FUNC
(
LdrInitializeThunk
);
GET_FUNC
(
RtlUserThreadStart
);
GET_FUNC
(
__wine_set_unix_funcs
);
#ifdef __i386__
{
struct
ldt_copy
**
p__wine_ldt_copy
;
GET_FUNC
(
__wine_ldt_copy
);
*
p__wine_ldt_copy
=
&
__wine_ldt_copy
;
}
#endif
#undef GET_FUNC
}
...
...
dlls/ntdll/unix/server.c
View file @
f1ff598e
...
...
@@ -1461,9 +1461,6 @@ void server_init_process(void)
*/
void
CDECL
server_init_process_done
(
void
*
relay
)
{
#ifdef __i386__
extern
struct
ldt_copy
__wine_ldt_copy
;
#endif
PEB
*
peb
=
NtCurrentTeb
()
->
Peb
;
IMAGE_NT_HEADERS
*
nt
=
RtlImageNtHeader
(
peb
->
ImageBaseAddress
);
void
*
entry
=
(
char
*
)
peb
->
ImageBaseAddress
+
nt
->
OptionalHeader
.
AddressOfEntryPoint
;
...
...
dlls/ntdll/unix/thread.c
View file @
f1ff598e
...
...
@@ -86,15 +86,11 @@ static void pthread_exit_wrapper( int status )
/***********************************************************************
* init_threading
*/
TEB
*
CDECL
init_threading
(
struct
ldt_copy
**
ldt_copy
,
SIZE_T
*
size
)
TEB
*
CDECL
init_threading
(
SIZE_T
*
size
)
{
TEB
*
teb
;
BOOL
suspend
;
SIZE_T
info_size
;
#ifdef __i386__
extern
struct
ldt_copy
__wine_ldt_copy
;
*
ldt_copy
=
&
__wine_ldt_copy
;
#endif
teb
=
virtual_alloc_first_teb
();
...
...
dlls/ntdll/unix/unix_private.h
View file @
f1ff598e
...
...
@@ -73,7 +73,6 @@ extern void (WINAPI *pDbgUiRemoteBreakin)( void *arg ) DECLSPEC_HIDDEN;
extern
NTSTATUS
(
WINAPI
*
pKiUserExceptionDispatcher
)(
EXCEPTION_RECORD
*
,
CONTEXT
*
)
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
pLdrInitializeThunk
)(
CONTEXT
*
,
void
**
,
ULONG_PTR
,
ULONG_PTR
)
DECLSPEC_HIDDEN
;
extern
void
(
WINAPI
*
pRtlUserThreadStart
)(
PRTL_THREAD_START_ROUTINE
entry
,
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
CDECL
fast_RtlpWaitForCriticalSection
(
RTL_CRITICAL_SECTION
*
crit
,
int
timeout
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
CDECL
fast_RtlpUnWaitCriticalSection
(
RTL_CRITICAL_SECTION
*
crit
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
CDECL
fast_RtlDeleteCriticalSection
(
RTL_CRITICAL_SECTION
*
crit
)
DECLSPEC_HIDDEN
;
...
...
@@ -117,7 +116,7 @@ extern NTSTATUS CDECL server_handle_to_fd( HANDLE handle, unsigned int access, i
unsigned
int
*
options
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
server_release_fd
(
HANDLE
handle
,
int
unix_fd
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
server_init_process_done
(
void
*
relay
)
DECLSPEC_HIDDEN
;
extern
TEB
*
CDECL
init_threading
(
struct
ldt_copy
**
ldt_copy
,
SIZE_T
*
size
)
DECLSPEC_HIDDEN
;
extern
TEB
*
CDECL
init_threading
(
SIZE_T
*
size
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
DECLSPEC_NORETURN
exit_thread
(
int
status
)
DECLSPEC_HIDDEN
;
extern
void
CDECL
DECLSPEC_NORETURN
exit_process
(
int
status
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
CDECL
exec_process
(
UNICODE_STRING
*
path
,
UNICODE_STRING
*
cmdline
,
NTSTATUS
status
)
DECLSPEC_HIDDEN
;
...
...
@@ -149,6 +148,9 @@ extern sigset_t server_block_set DECLSPEC_HIDDEN;
extern
SIZE_T
signal_stack_size
DECLSPEC_HIDDEN
;
extern
SIZE_T
signal_stack_mask
DECLSPEC_HIDDEN
;
extern
struct
_KUSER_SHARED_DATA
*
user_shared_data
DECLSPEC_HIDDEN
;
#ifdef __i386__
extern
struct
ldt_copy
__wine_ldt_copy
DECLSPEC_HIDDEN
;
#endif
extern
void
init_environment
(
int
argc
,
char
*
argv
[],
char
*
envp
[]
)
DECLSPEC_HIDDEN
;
extern
DWORD
ntdll_umbstowcs
(
const
char
*
src
,
DWORD
srclen
,
WCHAR
*
dst
,
DWORD
dstlen
)
DECLSPEC_HIDDEN
;
...
...
dlls/ntdll/unixlib.h
View file @
f1ff598e
...
...
@@ -24,12 +24,11 @@
#include "wine/server.h"
#include "wine/debug.h"
struct
ldt_copy
;
struct
msghdr
;
struct
_DISPATCHER_CONTEXT
;
/* increment this when you change the function table */
#define NTDLL_UNIXLIB_VERSION 6
6
#define NTDLL_UNIXLIB_VERSION 6
7
struct
unix_funcs
{
...
...
@@ -319,7 +318,7 @@ struct unix_funcs
void
(
CDECL
*
virtual_set_large_address_space
)(
void
);
/* thread/process functions */
TEB
*
(
CDECL
*
init_threading
)(
struct
ldt_copy
**
ldt_copy
,
SIZE_T
*
size
);
TEB
*
(
CDECL
*
init_threading
)(
SIZE_T
*
size
);
void
(
CDECL
*
exit_thread
)(
int
status
);
void
(
CDECL
*
exit_process
)(
int
status
);
NTSTATUS
(
CDECL
*
exec_process
)(
UNICODE_STRING
*
path
,
UNICODE_STRING
*
cmdline
,
NTSTATUS
status
);
...
...
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