Commit 19ffe590 authored by Alexandre Julliard's avatar Alexandre Julliard

Call the 32-bit USER signal proc directly instead of using a callout.

parent 90d8354b
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "wine/exception.h" #include "wine/exception.h"
#include "wine/library.h" #include "wine/library.h"
#include "drive.h" #include "drive.h"
...@@ -23,7 +24,6 @@ ...@@ -23,7 +24,6 @@
#include "wincon.h" #include "wincon.h"
#include "wine/server.h" #include "wine/server.h"
#include "options.h" #include "options.h"
#include "callback.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(process); DEFAULT_DEBUG_CHANNEL(process);
...@@ -109,8 +109,12 @@ extern STARTUPINFOA current_startupinfo; ...@@ -109,8 +109,12 @@ extern STARTUPINFOA current_startupinfo;
/* scheduler/pthread.c */ /* scheduler/pthread.c */
extern void PTHREAD_init_done(void); extern void PTHREAD_init_done(void);
/* scheduler/sysdeps.c */
extern void SYSDEPS_SwitchToThreadStack( void (*func)(void) ) WINE_NORETURN;
extern BOOL MAIN_MainInit(void); extern BOOL MAIN_MainInit(void);
typedef WORD WINAPI (*pUserSignalProc)( UINT, DWORD, DWORD, HMODULE16 );
/*********************************************************************** /***********************************************************************
* PROCESS_CallUserSignalProc * PROCESS_CallUserSignalProc
...@@ -186,37 +190,37 @@ extern BOOL MAIN_MainInit(void); ...@@ -186,37 +190,37 @@ extern BOOL MAIN_MainInit(void);
*/ */
void PROCESS_CallUserSignalProc( UINT uCode, HMODULE16 hModule ) void PROCESS_CallUserSignalProc( UINT uCode, HMODULE16 hModule )
{ {
DWORD flags = current_process.flags;
DWORD startup_flags = current_startupinfo.dwFlags;
DWORD dwFlags = 0; DWORD dwFlags = 0;
HMODULE user;
pUserSignalProc proc;
if (!Callout.UserSignalProc) return; if (!(user = GetModuleHandleA( "user32.dll" ))) return;
if (!(proc = (pUserSignalProc)GetProcAddress( user, "UserSignalProc" ))) return;
/* Determine dwFlags */ /* Determine dwFlags */
if ( !(flags & PDB32_WIN16_PROC) ) dwFlags |= USIG_FLAGS_WIN32; if ( !(current_process.flags & PDB32_WIN16_PROC) ) dwFlags |= USIG_FLAGS_WIN32;
if ( !(current_process.flags & PDB32_CONSOLE_PROC) ) dwFlags |= USIG_FLAGS_GUI;
if ( !(flags & PDB32_CONSOLE_PROC) ) dwFlags |= USIG_FLAGS_GUI;
if ( dwFlags & USIG_FLAGS_GUI ) if ( dwFlags & USIG_FLAGS_GUI )
{ {
/* Feedback defaults to ON */ /* Feedback defaults to ON */
if ( !(startup_flags & STARTF_FORCEOFFFEEDBACK) ) if ( !(current_startupinfo.dwFlags & STARTF_FORCEOFFFEEDBACK) )
dwFlags |= USIG_FLAGS_FEEDBACK; dwFlags |= USIG_FLAGS_FEEDBACK;
} }
else else
{ {
/* Feedback defaults to OFF */ /* Feedback defaults to OFF */
if (startup_flags & STARTF_FORCEONFEEDBACK) if (current_startupinfo.dwFlags & STARTF_FORCEONFEEDBACK)
dwFlags |= USIG_FLAGS_FEEDBACK; dwFlags |= USIG_FLAGS_FEEDBACK;
} }
/* Call USER signal proc */ /* Call USER signal proc */
if ( uCode == USIG_THREAD_INIT || uCode == USIG_THREAD_EXIT ) if ( uCode == USIG_THREAD_INIT || uCode == USIG_THREAD_EXIT )
Callout.UserSignalProc( uCode, GetCurrentThreadId(), dwFlags, hModule ); proc( uCode, GetCurrentThreadId(), dwFlags, hModule );
else else
Callout.UserSignalProc( uCode, GetCurrentProcessId(), dwFlags, hModule ); proc( uCode, GetCurrentProcessId(), dwFlags, hModule );
} }
/*********************************************************************** /***********************************************************************
...@@ -371,9 +375,6 @@ static void start_process(void) ...@@ -371,9 +375,6 @@ static void start_process(void)
MODULE_DllProcessAttach( NULL, (LPVOID)1 ); MODULE_DllProcessAttach( NULL, (LPVOID)1 );
RtlReleasePebLock(); RtlReleasePebLock();
/* Get pointers to USER routines called by KERNEL */
THUNK_InitCallout();
/* Note: The USIG_PROCESS_CREATE signal is supposed to be sent in the /* Note: The USIG_PROCESS_CREATE signal is supposed to be sent in the
* context of the parent process. Actually, the USER signal proc * context of the parent process. Actually, the USER signal proc
* doesn't really care about that, but it *does* require that the * doesn't really care about that, but it *does* require that the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment