Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ea6f3a4c
Commit
ea6f3a4c
authored
Mar 14, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Mar 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move the call to MODULE_DllThreadAttach from the kernel32
thread creation function to the NTDLL one.
parent
2d15c8fb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
7 deletions
+39
-7
thread.c
dlls/kernel/thread.c
+0
-2
ntdll.spec
dlls/ntdll/ntdll.spec
+0
-5
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-0
thread.c
dlls/ntdll/thread.c
+38
-0
No files found.
dlls/kernel/thread.c
View file @
ea6f3a4c
...
@@ -54,7 +54,6 @@ struct new_thread_info
...
@@ -54,7 +54,6 @@ struct new_thread_info
void
*
arg
;
void
*
arg
;
};
};
extern
NTSTATUS
MODULE_DllThreadAttach
(
LPVOID
lpReserved
);
/* FIXME */
/***********************************************************************
/***********************************************************************
* THREAD_Start
* THREAD_Start
...
@@ -74,7 +73,6 @@ static void CALLBACK THREAD_Start( void *ptr )
...
@@ -74,7 +73,6 @@ static void CALLBACK THREAD_Start( void *ptr )
__TRY
__TRY
{
{
MODULE_DllThreadAttach
(
NULL
);
ExitThread
(
func
(
arg
)
);
ExitThread
(
func
(
arg
)
);
}
}
__EXCEPT
(
UnhandledExceptionFilter
)
__EXCEPT
(
UnhandledExceptionFilter
)
...
...
dlls/ntdll/ntdll.spec
View file @
ea6f3a4c
...
@@ -1390,8 +1390,3 @@
...
@@ -1390,8 +1390,3 @@
@ cdecl wine_nt_to_unix_file_name(ptr ptr long long)
@ cdecl wine_nt_to_unix_file_name(ptr ptr long long)
@ cdecl wine_unix_to_nt_file_name(ptr ptr)
@ cdecl wine_unix_to_nt_file_name(ptr ptr)
@ cdecl __wine_init_windows_dir(wstr wstr)
@ cdecl __wine_init_windows_dir(wstr wstr)
################################################################
# Wine dll separation hacks, these will go away, don't use them
#
@ cdecl MODULE_DllThreadAttach(ptr)
dlls/ntdll/ntdll_misc.h
View file @
ea6f3a4c
...
@@ -60,6 +60,7 @@ extern void DECLSPEC_NORETURN server_exit_thread( int status );
...
@@ -60,6 +60,7 @@ extern void DECLSPEC_NORETURN server_exit_thread( int status );
extern
void
DECLSPEC_NORETURN
server_abort_thread
(
int
status
);
extern
void
DECLSPEC_NORETURN
server_abort_thread
(
int
status
);
/* module handling */
/* module handling */
extern
NTSTATUS
MODULE_DllThreadAttach
(
LPVOID
lpReserved
);
extern
FARPROC
RELAY_GetProcAddress
(
HMODULE
module
,
const
IMAGE_EXPORT_DIRECTORY
*
exports
,
extern
FARPROC
RELAY_GetProcAddress
(
HMODULE
module
,
const
IMAGE_EXPORT_DIRECTORY
*
exports
,
DWORD
exp_size
,
FARPROC
proc
,
DWORD
ordinal
,
const
WCHAR
*
user
);
DWORD
exp_size
,
FARPROC
proc
,
DWORD
ordinal
,
const
WCHAR
*
user
);
extern
FARPROC
SNOOP_GetProcAddress
(
HMODULE
hmod
,
const
IMAGE_EXPORT_DIRECTORY
*
exports
,
DWORD
exp_size
,
extern
FARPROC
SNOOP_GetProcAddress
(
HMODULE
hmod
,
const
IMAGE_EXPORT_DIRECTORY
*
exports
,
DWORD
exp_size
,
...
...
dlls/ntdll/thread.c
View file @
ea6f3a4c
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "wine/pthread.h"
#include "wine/pthread.h"
#include "wine/debug.h"
#include "wine/debug.h"
#include "ntdll_misc.h"
#include "ntdll_misc.h"
#include "wine/exception.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
thread
);
WINE_DEFAULT_DEBUG_CHANNEL
(
thread
);
...
@@ -273,6 +274,26 @@ HANDLE thread_init(void)
...
@@ -273,6 +274,26 @@ HANDLE thread_init(void)
return
exe_file
;
return
exe_file
;
}
}
typedef
ULONG
(
WINAPI
*
PUNHANDLED_EXCEPTION_FILTER
)(
PEXCEPTION_POINTERS
);
static
PUNHANDLED_EXCEPTION_FILTER
get_unhandled_exception_filter
(
void
)
{
static
PUNHANDLED_EXCEPTION_FILTER
unhandled_exception_filter
;
static
const
WCHAR
kernel32W
[]
=
{
'k'
,
'e'
,
'r'
,
'n'
,
'e'
,
'l'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
UNICODE_STRING
module_name
;
ANSI_STRING
func_name
;
HMODULE
kernel32_handle
;
if
(
unhandled_exception_filter
)
return
unhandled_exception_filter
;
RtlInitUnicodeString
(
&
module_name
,
kernel32W
);
RtlInitAnsiString
(
&
func_name
,
"UnhandledExceptionFilter"
);
if
(
LdrGetDllHandle
(
0
,
0
,
&
module_name
,
&
kernel32_handle
)
==
STATUS_SUCCESS
)
LdrGetProcedureAddress
(
kernel32_handle
,
&
func_name
,
0
,
(
void
**
)
&
unhandled_exception_filter
);
return
unhandled_exception_filter
;
}
/***********************************************************************
/***********************************************************************
* start_thread
* start_thread
...
@@ -316,6 +337,23 @@ static void start_thread( struct wine_pthread_thread_info *info )
...
@@ -316,6 +337,23 @@ static void start_thread( struct wine_pthread_thread_info *info )
InsertHeadList
(
&
tls_links
,
&
teb
->
TlsLinks
);
InsertHeadList
(
&
tls_links
,
&
teb
->
TlsLinks
);
RtlReleasePebLock
();
RtlReleasePebLock
();
/* NOTE: Windows does not have an exception handler around the call to
* the thread attach. We do for ease of debugging */
if
(
get_unhandled_exception_filter
())
{
__TRY
{
MODULE_DllThreadAttach
(
NULL
);
}
__EXCEPT
(
get_unhandled_exception_filter
())
{
NtTerminateThread
(
GetCurrentThread
(),
GetExceptionCode
()
);
}
__ENDTRY
}
else
MODULE_DllThreadAttach
(
NULL
);
func
(
arg
);
func
(
arg
);
}
}
...
...
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