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
7744443f
Commit
7744443f
authored
Mar 14, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add a wrapper to call the thread entry point for broken apps.
parent
8f097d8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
thread.c
dlls/ntdll/thread.c
+22
-3
No files found.
dlls/ntdll/thread.c
View file @
7744443f
...
...
@@ -349,6 +349,26 @@ static PUNHANDLED_EXCEPTION_FILTER get_unhandled_exception_filter(void)
return
unhandled_exception_filter
;
}
#ifdef __i386__
/* wrapper for apps that don't declare the thread function correctly */
extern
DWORD
call_thread_entry_point
(
PRTL_THREAD_START_ROUTINE
entry
,
void
*
arg
);
__ASM_GLOBAL_FUNC
(
call_thread_entry_point
,
"pushl %ebp
\n\t
"
"movl %esp,%ebp
\n\t
"
"subl $4,%esp
\n\t
"
"pushl 12(%ebp)
\n\t
"
"movl 8(%ebp),%eax
\n\t
"
"call *%eax
\n\t
"
"leave
\n\t
"
"ret"
);
#else
static
inline
DWORD
call_thread_entry_point
(
PRTL_THREAD_START_ROUTINE
entry
,
void
*
arg
)
{
LPTHREAD_START_ROUTINE
func
=
(
LPTHREAD_START_ROUTINE
)
rtl_func
;
return
func
(
arg
);
}
#endif
/***********************************************************************
* call_thread_func
*
...
...
@@ -356,16 +376,15 @@ static PUNHANDLED_EXCEPTION_FILTER get_unhandled_exception_filter(void)
*/
static
void
DECLSPEC_NORETURN
call_thread_func
(
PRTL_THREAD_START_ROUTINE
rtl_func
,
void
*
arg
)
{
LPTHREAD_START_ROUTINE
func
=
(
LPTHREAD_START_ROUTINE
)
rtl_func
;
DWORD
exit_code
;
BOOL
last
;
MODULE_DllThreadAttach
(
NULL
);
if
(
TRACE_ON
(
relay
))
DPRINTF
(
"%04x:Starting thread proc %p (arg=%p)
\n
"
,
GetCurrentThreadId
(),
func
,
arg
);
DPRINTF
(
"%04x:Starting thread proc %p (arg=%p)
\n
"
,
GetCurrentThreadId
(),
rtl_
func
,
arg
);
exit_code
=
func
(
arg
);
exit_code
=
call_thread_entry_point
(
rtl_func
,
arg
);
/* send the exit code to the server */
SERVER_START_REQ
(
terminate_thread
)
...
...
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