ntdll: Allow the dispatcher functions to return to the caller.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b564414e9b
commit
e8753b4bc2
|
@ -354,10 +354,10 @@ static int wait_select_reply( void *cookie )
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* invoke_user_apc
|
* invoke_user_apc
|
||||||
*/
|
*/
|
||||||
static void invoke_user_apc( CONTEXT *context, const user_apc_t *apc, NTSTATUS status )
|
static NTSTATUS invoke_user_apc( CONTEXT *context, const user_apc_t *apc, NTSTATUS status )
|
||||||
{
|
{
|
||||||
call_user_apc_dispatcher( context, apc->args[0], apc->args[1], apc->args[2],
|
return call_user_apc_dispatcher( context, apc->args[0], apc->args[1], apc->args[2],
|
||||||
wine_server_get_ptr( apc->func ), pKiUserApcDispatcher, status );
|
wine_server_get_ptr( apc->func ), pKiUserApcDispatcher, status );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -675,7 +675,7 @@ unsigned int server_wait( const select_op_t *select_op, data_size_t size, UINT f
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = server_select( select_op, size, flags, abs_timeout, NULL, NULL, &apc );
|
ret = server_select( select_op, size, flags, abs_timeout, NULL, NULL, &apc );
|
||||||
if (ret == STATUS_USER_APC) invoke_user_apc( NULL, &apc, ret );
|
if (ret == STATUS_USER_APC) return invoke_user_apc( NULL, &apc, ret );
|
||||||
|
|
||||||
/* A test on Windows 2000 shows that Windows always yields during
|
/* A test on Windows 2000 shows that Windows always yields during
|
||||||
a wait, but a wait that is hit by an event gets a priority
|
a wait, but a wait that is hit by an event gets a priority
|
||||||
|
@ -696,7 +696,7 @@ NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alertable )
|
||||||
if (alertable)
|
if (alertable)
|
||||||
{
|
{
|
||||||
status = server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, 0, NULL, NULL, &apc );
|
status = server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, 0, NULL, NULL, &apc );
|
||||||
if (status == STATUS_USER_APC) invoke_user_apc( context, &apc, status );
|
if (status == STATUS_USER_APC) return invoke_user_apc( context, &apc, status );
|
||||||
}
|
}
|
||||||
status = NtSetContextThread( GetCurrentThread(), context );
|
status = NtSetContextThread( GetCurrentThread(), context );
|
||||||
if (!status && (context->ContextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER)
|
if (!status && (context->ContextFlags & CONTEXT_INTEGER) == CONTEXT_INTEGER)
|
||||||
|
|
|
@ -1163,7 +1163,7 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL
|
||||||
if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED)
|
if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED)
|
||||||
return NtContinue( context, FALSE );
|
return NtContinue( context, FALSE );
|
||||||
|
|
||||||
if (first_chance) call_user_exception_dispatcher( rec, context, pKiUserExceptionDispatcher );
|
if (first_chance) return call_user_exception_dispatcher( rec, context, pKiUserExceptionDispatcher );
|
||||||
|
|
||||||
if (rec->ExceptionFlags & EH_STACK_INVALID)
|
if (rec->ExceptionFlags & EH_STACK_INVALID)
|
||||||
ERR_(seh)("Exception frame is not in stack limits => unable to dispatch exception.\n");
|
ERR_(seh)("Exception frame is not in stack limits => unable to dispatch exception.\n");
|
||||||
|
|
|
@ -284,13 +284,13 @@ extern void add_completion( HANDLE handle, ULONG_PTR value, NTSTATUS status, ULO
|
||||||
|
|
||||||
extern void dbg_init(void) DECLSPEC_HIDDEN;
|
extern void dbg_init(void) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
extern void WINAPI DECLSPEC_NORETURN call_user_apc_dispatcher( CONTEXT *context_ptr, ULONG_PTR arg1,
|
extern NTSTATUS WINAPI call_user_apc_dispatcher( CONTEXT *context_ptr, ULONG_PTR arg1,
|
||||||
ULONG_PTR arg2, ULONG_PTR arg3,
|
ULONG_PTR arg2, ULONG_PTR arg3,
|
||||||
PNTAPCFUNC func,
|
PNTAPCFUNC func,
|
||||||
void (WINAPI *dispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULONG_PTR,PNTAPCFUNC),
|
void (WINAPI *dispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULONG_PTR,PNTAPCFUNC),
|
||||||
NTSTATUS status ) DECLSPEC_HIDDEN;
|
NTSTATUS status ) DECLSPEC_HIDDEN;
|
||||||
extern void WINAPI DECLSPEC_NORETURN call_user_exception_dispatcher( EXCEPTION_RECORD *rec, CONTEXT *context,
|
extern NTSTATUS WINAPI call_user_exception_dispatcher( EXCEPTION_RECORD *rec, CONTEXT *context,
|
||||||
NTSTATUS (WINAPI *dispatcher)(EXCEPTION_RECORD*,CONTEXT*) ) DECLSPEC_HIDDEN;
|
NTSTATUS (WINAPI *dispatcher)(EXCEPTION_RECORD*,CONTEXT*) ) DECLSPEC_HIDDEN;
|
||||||
extern void WINAPI call_raise_user_exception_dispatcher( NTSTATUS (WINAPI *dispatcher)(void) ) DECLSPEC_HIDDEN;
|
extern void WINAPI call_raise_user_exception_dispatcher( NTSTATUS (WINAPI *dispatcher)(void) ) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
#define IMAGE_DLLCHARACTERISTICS_PREFER_NATIVE 0x0010 /* Wine extension */
|
#define IMAGE_DLLCHARACTERISTICS_PREFER_NATIVE 0x0010 /* Wine extension */
|
||||||
|
|
Loading…
Reference in New Issue