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
979000e0
Commit
979000e0
authored
Dec 05, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Dec 05, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call 16-bit instead of 32-bit UserSignalProc entry point.
Don't load USER32.DLL unless requested by the program. Bugfix: Pass the correct thread ID to UserSignalProc.
parent
cd841a4a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
37 deletions
+21
-37
thunk.c
if1632/thunk.c
+2
-1
process.h
include/process.h
+1
-1
task.c
loader/task.c
+4
-3
process.c
scheduler/process.c
+12
-30
thread.c
scheduler/thread.c
+2
-2
No files found.
if1632/thunk.c
View file @
979000e0
...
...
@@ -41,6 +41,7 @@ extern LONG CALLBACK THUNK_CallTo16_long_ll (FARPROC16,LONG,LONG);
extern
WORD
CALLBACK
THUNK_CallTo16_word_www
(
FARPROC16
,
WORD
,
WORD
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_wwl
(
FARPROC16
,
WORD
,
WORD
,
LONG
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_wlw
(
FARPROC16
,
WORD
,
LONG
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_lllw
(
FARPROC16
,
LONG
,
LONG
,
LONG
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_llwl
(
FARPROC16
,
LONG
,
LONG
,
WORD
,
LONG
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_lwww
(
FARPROC16
,
LONG
,
WORD
,
WORD
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_wlww
(
FARPROC16
,
WORD
,
LONG
,
WORD
,
WORD
);
...
...
@@ -374,7 +375,6 @@ void THUNK_InitCallout(void)
GETADDR
(
DispatchMessageW
,
"DispatchMessageW"
);
GETADDR
(
DispatchMessageA
,
"DispatchMessageA"
);
GETADDR
(
RedrawWindow
,
"RedrawWindow"
);
GETADDR
(
UserSignalProc
,
"UserSignalProc"
);
#undef GETADDR
}
...
...
@@ -399,6 +399,7 @@ void THUNK_InitCallout(void)
GETADDR
(
InitThreadInput16
,
"InitThreadInput"
,
word_ww
);
GETADDR
(
UserYield16
,
"UserYield"
,
word_
);
GETADDR
(
DestroyIcon32
,
"DestroyIcon32"
,
word_ww
);
GETADDR
(
UserSignalProc
,
"SignalProc32"
,
word_lllw
);
#undef GETADDR
}
...
...
include/process.h
View file @
979000e0
...
...
@@ -156,7 +156,7 @@ extern BOOL PROCESS_Init( void );
extern
BOOL
PROCESS_IsCurrent
(
HANDLE
handle
);
extern
PDB
*
PROCESS_Initial
(
void
);
extern
PDB
*
PROCESS_IdToPDB
(
DWORD
id
);
extern
void
PROCESS_CallUserSignalProc
(
UINT
uCode
,
HMODULE
hModule
);
extern
void
PROCESS_CallUserSignalProc
(
UINT
uCode
,
DWORD
dwThreadId
,
HMODULE
hModule
);
extern
PDB
*
PROCESS_Create
(
struct
_NE_MODULE
*
pModule
,
LPCSTR
cmd_line
,
LPCSTR
env
,
LPSECURITY_ATTRIBUTES
psa
,
LPSECURITY_ATTRIBUTES
tsa
,
...
...
loader/task.c
View file @
979000e0
...
...
@@ -462,9 +462,9 @@ void TASK_KillTask( HTASK16 hTask )
/* Perform USER cleanup */
TASK_CallTaskSignalProc
(
USIG16_TERMINATION
,
hTask
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_EXIT
,
0
);
PROCESS_CallUserSignalProc
(
USIG_THREAD_EXIT
,
0
);
/* FIXME */
PROCESS_CallUserSignalProc
(
USIG_PROCESS_DESTROY
,
0
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_EXIT
,
0
,
0
);
PROCESS_CallUserSignalProc
(
USIG_THREAD_EXIT
,
GetCurrentThreadId
(),
0
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_DESTROY
,
0
,
0
);
if
(
nTaskCount
<=
1
)
{
...
...
@@ -716,6 +716,7 @@ void WINAPI InitTask16( CONTEXT86 *context )
/* Initialize implicitly loaded DLLs */
NE_InitializeDLLs
(
pTask
->
hModule
);
NE_DllProcessAttach
(
pTask
->
hModule
);
/* Registers on return are:
* ax 1 if OK, 0 on error
...
...
scheduler/process.c
View file @
979000e0
...
...
@@ -185,9 +185,10 @@ PDB *PROCESS_IdToPDB( DWORD id )
* USIG_FLAGS_FAULT
* The signal is being sent due to a fault.
*/
static
void
PROCESS_CallUserSignalProcHelper
(
UINT
uCode
,
DWORD
dwThreadOrProcessId
,
HMODULE
hModule
,
DWORD
flags
,
DWORD
startup_flags
)
void
PROCESS_CallUserSignalProc
(
UINT
uCode
,
DWORD
dwThreadId
,
HMODULE
hModule
)
{
DWORD
flags
=
PROCESS_Current
()
->
flags
;
DWORD
startup_flags
=
PROCESS_Current
()
->
env_db
->
startup_info
->
dwFlags
;
DWORD
dwFlags
=
0
;
/* Determine dwFlags */
...
...
@@ -217,26 +218,12 @@ static void PROCESS_CallUserSignalProcHelper( UINT uCode, DWORD dwThreadOrProces
/* Call USER signal proc */
if
(
Callout
.
UserSignalProc
)
Callout
.
UserSignalProc
(
uCode
,
dwThreadOrProcessId
,
dwFlags
,
hModule
);
}
/* Call USER signal proc for the current thread/process */
void
PROCESS_CallUserSignalProc
(
UINT
uCode
,
HMODULE
hModule
)
{
DWORD
dwThreadOrProcessId
;
/* Get thread or process ID */
if
(
uCode
==
USIG_THREAD_INIT
||
uCode
==
USIG_THREAD_EXIT
)
dwThreadOrProcessId
=
GetCurrentThreadId
();
else
dwThreadOrProcessId
=
GetCurrentProcessId
();
PROCESS_CallUserSignalProcHelper
(
uCode
,
dwThreadOrProcessId
,
hModule
,
PROCESS_Current
()
->
flags
,
PROCESS_Current
()
->
env_db
->
startup_info
->
dwFlags
);
if
(
uCode
==
USIG_THREAD_INIT
||
uCode
==
USIG_THREAD_EXIT
)
Callout
.
UserSignalProc
(
uCode
,
dwThreadId
,
dwFlags
,
hModule
);
else
Callout
.
UserSignalProc
(
uCode
,
GetCurrentProcessId
(),
dwFlags
,
hModule
);
}
/***********************************************************************
* PROCESS_CreateEnvDB
*
...
...
@@ -436,14 +423,9 @@ void PROCESS_Start(void)
* in the case of a 16-bit process. Thus, we send the signal here.
*/
/* Load USER32.DLL before calling UserSignalProc (relay debugging!) */
LoadLibraryA
(
"USER32.DLL"
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_CREATE
,
0
);
PROCESS_CallUserSignalProc
(
USIG_THREAD_INIT
,
0
);
/* for initial thread */
PROCESS_CallUserSignalProc
(
USIG_PROCESS_INIT
,
0
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_CREATE
,
0
,
0
);
PROCESS_CallUserSignalProc
(
USIG_THREAD_INIT
,
GetCurrentThreadId
(),
0
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_INIT
,
0
,
0
);
/* Signal the parent process to continue */
server_call
(
REQ_INIT_PROCESS_DONE
);
...
...
@@ -468,7 +450,7 @@ void PROCESS_Start(void)
PE_InitTls
();
}
PROCESS_CallUserSignalProc
(
USIG_PROCESS_LOADED
,
0
);
/* FIXME: correct location? */
PROCESS_CallUserSignalProc
(
USIG_PROCESS_LOADED
,
0
,
0
);
/* FIXME: correct location? */
if
(
(
pdb
->
flags
&
PDB32_CONSOLE_PROC
)
||
(
pdb
->
flags
&
PDB32_DOS_PROC
)
)
AllocConsole
();
...
...
@@ -485,7 +467,7 @@ void PROCESS_Start(void)
TASK_AddTaskEntryBreakpoint
(
pdb
->
task
);
/* Now call the entry point */
PROCESS_CallUserSignalProc
(
USIG_PROCESS_RUNNING
,
0
);
PROCESS_CallUserSignalProc
(
USIG_PROCESS_RUNNING
,
0
,
0
);
switch
(
type
)
{
...
...
scheduler/thread.c
View file @
979000e0
...
...
@@ -150,7 +150,7 @@ void CALLBACK THREAD_FreeTEB( ULONG_PTR arg )
TRACE
(
"(%p) called
\n
"
,
teb
);
SERVICE_Delete
(
teb
->
cleanup
);
PROCESS_CallUserSignalProc
(
USIG_THREAD_EXIT
,
0
);
PROCESS_CallUserSignalProc
(
USIG_THREAD_EXIT
,
(
DWORD
)
teb
->
tid
,
0
);
CloseHandle
(
teb
->
event
);
while
(
*
pptr
&&
(
*
pptr
!=
teb
))
pptr
=
&
(
*
pptr
)
->
next
;
...
...
@@ -277,7 +277,7 @@ error:
static
void
THREAD_Start
(
void
)
{
LPTHREAD_START_ROUTINE
func
=
(
LPTHREAD_START_ROUTINE
)
NtCurrentTeb
()
->
entry_point
;
PROCESS_CallUserSignalProc
(
USIG_THREAD_INIT
,
0
);
PROCESS_CallUserSignalProc
(
USIG_THREAD_INIT
,
(
DWORD
)
NtCurrentTeb
()
->
tid
,
0
);
PE_InitTls
();
MODULE_DllThreadAttach
(
NULL
);
...
...
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