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
5edf4e1c
Commit
5edf4e1c
authored
Jul 26, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed a few unnecessary Callouts.
parent
8afe6628
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
77 deletions
+43
-77
user_main.c
dlls/user/user_main.c
+2
-5
thunk.c
if1632/thunk.c
+2
-34
callback.h
include/callback.h
+0
-5
hook.h
include/hook.h
+1
-2
module.c
loader/module.c
+21
-5
task.c
loader/task.c
+17
-23
process.c
scheduler/process.c
+0
-3
No files found.
dlls/user/user_main.c
View file @
5edf4e1c
...
...
@@ -265,13 +265,10 @@ static void thread_detach(void)
if
(
hQueue
)
{
TIMER_RemoveQueueTimers
(
hQueue
);
HOOK_FreeQueueHooks
(
hQueue
);
HOOK_FreeQueueHooks
();
QUEUE_SetExitingQueue
(
hQueue
);
WIN_DestroyThreadWindows
(
GetDesktopWindow
()
);
QUEUE_DeleteMsgQueue
(
hQueue
);
SetThreadQueue16
(
0
,
0
);
QUEUE_DeleteMsgQueue
();
}
if
(
!
(
NtCurrentTeb
()
->
tibflags
&
TEBF_WIN32
))
...
...
if1632/thunk.c
View file @
5edf4e1c
...
...
@@ -20,29 +20,15 @@ DEFAULT_DEBUG_CHANNEL(thunk);
/* by the build program to generate the file if1632/callto16.S */
/* ### start build ### */
extern
WORD
CALLBACK
THUNK_CallTo16_word_
(
FARPROC16
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_l
(
FARPROC16
,
LONG
);
extern
LONG
CALLBACK
THUNK_CallTo16_long_l
(
FARPROC16
,
LONG
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_lllw
(
FARPROC16
,
LONG
,
LONG
,
LONG
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_lwww
(
FARPROC16
,
LONG
,
WORD
,
WORD
,
WORD
);
extern
LONG
CALLBACK
THUNK_CallTo16_long_wwwl
(
FARPROC16
,
WORD
,
WORD
,
WORD
,
LONG
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_lwwww
(
FARPROC16
,
LONG
,
WORD
,
WORD
,
WORD
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_w
(
FARPROC16
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_wlww
(
FARPROC16
,
WORD
,
LONG
,
WORD
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_ww
(
FARPROC16
,
WORD
,
WORD
);
extern
WORD
CALLBACK
THUNK_CallTo16_word_wwwl
(
FARPROC16
,
WORD
,
WORD
,
WORD
,
LONG
);
/* ### stop build ### */
static
THUNK
*
firstThunk
=
NULL
;
CALLOUT_TABLE
Callout
=
{
/* PostMessageA */
NULL
,
/* UserSignalProc */
NULL
,
/* FinalUserInit16 */
NULL
,
/* InitThreadInput16 */
NULL
,
/* UserYield16) */
NULL
,
/* DestroyIcon32 */
NULL
,
/* WaitForInputIdle */
NULL
/* DestroyIcon32 */
NULL
};
/***********************************************************************
...
...
@@ -151,31 +137,13 @@ static FARPROC THUNK_GetCalloutThunk( NE_MODULE *pModule, LPSTR name, RELAY rela
*/
void
THUNK_InitCallout
(
void
)
{
HMODULE
hModule
;
NE_MODULE
*
pModule
;
hModule
=
GetModuleHandleA
(
"user32.dll"
);
if
(
hModule
)
{
#define GETADDR( name ) \
*(FARPROC *)&Callout.name = GetProcAddress( hModule, #name )
GETADDR
(
PostMessageA
);
GETADDR
(
WaitForInputIdle
);
#undef GETADDR
}
else
WARN
(
"no 32-bit USER
\n
"
);
pModule
=
NE_GetPtr
(
GetModuleHandle16
(
"USER.EXE"
)
);
NE_MODULE
*
pModule
=
NE_GetPtr
(
GetModuleHandle16
(
"USER.EXE"
)
);
if
(
pModule
)
{
#define GETADDR( var, name, thk ) \
*(FARPROC *)&Callout.var = THUNK_GetCalloutThunk( pModule, name, \
(RELAY)THUNK_CallTo16_##thk )
GETADDR
(
FinalUserInit16
,
"FinalUserInit"
,
word_
);
GETADDR
(
InitThreadInput16
,
"InitThreadInput"
,
word_ww
);
GETADDR
(
UserYield16
,
"UserYield"
,
word_
);
GETADDR
(
DestroyIcon32
,
"DestroyIcon32"
,
word_ww
);
GETADDR
(
UserSignalProc
,
"SignalProc32"
,
word_lllw
);
#undef GETADDR
...
...
include/callback.h
View file @
5edf4e1c
...
...
@@ -23,13 +23,8 @@ extern void THUNK_InitCallout(void);
typedef
struct
{
BOOL
WINAPI
(
*
PostMessageA
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
WORD
WINAPI
(
*
UserSignalProc
)(
UINT
,
DWORD
,
DWORD
,
HMODULE16
);
void
WINAPI
(
*
FinalUserInit16
)(
void
);
HQUEUE16
WINAPI
(
*
InitThreadInput16
)(
WORD
,
WORD
);
void
WINAPI
(
*
UserYield16
)(
void
);
WORD
WINAPI
(
*
DestroyIcon32
)(
HGLOBAL16
,
UINT16
);
DWORD
WINAPI
(
*
WaitForInputIdle
)(
HANDLE
,
DWORD
);
}
CALLOUT_TABLE
;
extern
CALLOUT_TABLE
Callout
;
...
...
include/hook.h
View file @
5edf4e1c
...
...
@@ -26,7 +26,6 @@ extern LRESULT HOOK_CallHooksA( INT id, INT code, WPARAM wParam,
extern
LRESULT
HOOK_CallHooksW
(
INT
id
,
INT
code
,
WPARAM
wParam
,
LPARAM
lParam
);
extern
void
HOOK_FreeModuleHooks
(
HMODULE16
hModule
);
extern
void
HOOK_FreeQueueHooks
(
HQUEUE16
hQueue
);
extern
void
HOOK_ResetQueueHooks
(
HQUEUE16
hQueue
);
extern
void
HOOK_FreeQueueHooks
(
void
);
#endif
/* __WINE_HOOK_H */
loader/module.c
View file @
5edf4e1c
...
...
@@ -17,7 +17,6 @@
#include "file.h"
#include "module.h"
#include "debugtools.h"
#include "callback.h"
#include "wine/server.h"
DEFAULT_DEBUG_CHANNEL
(
module
);
...
...
@@ -30,6 +29,25 @@ static WINE_MODREF *exe_modref;
static
int
free_lib_count
;
/* recursion depth of FreeLibrary calls */
static
int
process_detaching
;
/* set on process detach to avoid deadlocks with thread detach */
/***********************************************************************
* wait_input_idle
*
* Wrapper to call WaitForInputIdle USER function
*/
typedef
DWORD
(
WINAPI
*
WaitForInputIdle_ptr
)(
HANDLE
hProcess
,
DWORD
dwTimeOut
);
static
DWORD
wait_input_idle
(
HANDLE
process
,
DWORD
timeout
)
{
HMODULE
mod
=
GetModuleHandleA
(
"user32.dll"
);
if
(
mod
)
{
WaitForInputIdle_ptr
ptr
=
(
WaitForInputIdle_ptr
)
GetProcAddress
(
mod
,
"WaitForInputIdle"
);
if
(
ptr
)
return
ptr
(
process
,
timeout
);
}
return
0
;
}
/*************************************************************************
* MODULE32_LookupHMODULE
* looks for the referenced HMODULE in the current process
...
...
@@ -852,8 +870,7 @@ HINSTANCE WINAPI WinExec( LPCSTR lpCmdLine, UINT nCmdShow )
0
,
NULL
,
NULL
,
&
startup
,
&
info
))
{
/* Give 30 seconds to the app to come up */
if
(
Callout
.
WaitForInputIdle
&&
Callout
.
WaitForInputIdle
(
info
.
hProcess
,
30000
)
==
0xFFFFFFFF
)
if
(
wait_input_idle
(
info
.
hProcess
,
30000
)
==
0xFFFFFFFF
)
WARN
(
"WaitForInputIdle failed: Error %ld
\n
"
,
GetLastError
()
);
hInstance
=
(
HINSTANCE
)
33
;
/* Close off the handles */
...
...
@@ -910,8 +927,7 @@ HINSTANCE WINAPI LoadModule( LPCSTR name, LPVOID paramBlock )
params
->
lpEnvAddress
,
NULL
,
&
startup
,
&
info
))
{
/* Give 30 seconds to the app to come up */
if
(
Callout
.
WaitForInputIdle
&&
Callout
.
WaitForInputIdle
(
info
.
hProcess
,
30000
)
==
0xFFFFFFFF
)
if
(
wait_input_idle
(
info
.
hProcess
,
30000
)
==
0xFFFFFFFF
)
WARN
(
"WaitForInputIdle failed: Error %ld
\n
"
,
GetLastError
()
);
hInstance
=
(
HINSTANCE
)
33
;
/* Close off the handles */
...
...
loader/task.c
View file @
5edf4e1c
...
...
@@ -19,7 +19,6 @@
#include "winsock.h"
#include "wine/winbase16.h"
#include "callback.h"
#include "drive.h"
#include "file.h"
#include "global.h"
...
...
@@ -727,8 +726,20 @@ void WINAPI Yield16(void)
TDB
*
pCurTask
=
TASK_GetCurrent
();
if
(
pCurTask
)
pCurTask
->
hYieldTo
=
0
;
if
(
pCurTask
&&
pCurTask
->
hQueue
&&
Callout
.
UserYield16
)
Callout
.
UserYield16
();
else
OldYield16
();
if
(
pCurTask
&&
pCurTask
->
hQueue
)
{
HMODULE
mod
=
GetModuleHandleA
(
"user32.dll"
);
if
(
mod
)
{
FARPROC
proc
=
GetProcAddress
(
mod
,
"UserYield16"
);
if
(
proc
)
{
proc
();
return
;
}
}
}
OldYield16
();
}
/***********************************************************************
...
...
@@ -1034,27 +1045,10 @@ VOID WINAPI SetFastQueue16( DWORD thread, HANDLE hQueue )
*/
HANDLE
WINAPI
GetFastQueue16
(
void
)
{
TEB
*
teb
=
NtCurrentTeb
();
if
(
!
teb
)
return
0
;
HANDLE
ret
=
(
HANDLE
)
NtCurrentTeb
()
->
queue
;
if
(
!
teb
->
queue
)
{
if
(
!
Callout
.
InitThreadInput16
)
{
THUNK_InitCallout
();
if
(
!
Callout
.
InitThreadInput16
)
{
FIXME
(
"InitThreadInput16 callout not found, trouble ahead
\n
"
);
return
0
;
}
}
Callout
.
InitThreadInput16
(
0
,
(
teb
->
tibflags
&
TEBF_WIN32
)
?
5
:
4
);
if
(
!
teb
->
queue
)
FIXME
(
"(): should initialize thread-local queue, expect failure!
\n
"
);
}
return
(
HANDLE
)
teb
->
queue
;
if
(
!
ret
)
FIXME
(
"(): should initialize thread-local queue, expect failure!
\n
"
);
return
ret
;
}
/***********************************************************************
...
...
scheduler/process.c
View file @
5edf4e1c
...
...
@@ -363,9 +363,6 @@ static void start_process(void)
/* Get pointers to USER routines called by KERNEL */
THUNK_InitCallout
();
/* Call FinalUserInit routine */
if
(
Callout
.
FinalUserInit16
)
Callout
.
FinalUserInit16
();
/* Note: The USIG_PROCESS_CREATE signal is supposed to be sent in the
* context of the parent process. Actually, the USER signal proc
* doesn't really care about that, but it *does* require that the
...
...
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