Revert "ntdll: Preserve syscall frame when calling async IO system APC.".
This reverts commit 8b8ddffa21
.
ws2_32 no longer uses system APCs.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2ead3a1124
commit
10eba9b2e9
|
@ -379,24 +379,9 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
|
||||||
{
|
{
|
||||||
IO_STATUS_BLOCK *iosb = wine_server_get_ptr( call->async_io.sb );
|
IO_STATUS_BLOCK *iosb = wine_server_get_ptr( call->async_io.sb );
|
||||||
struct async_fileio *user = wine_server_get_ptr( call->async_io.user );
|
struct async_fileio *user = wine_server_get_ptr( call->async_io.user );
|
||||||
void *saved_frame = get_syscall_frame();
|
|
||||||
void *frame;
|
|
||||||
|
|
||||||
result->type = call->type;
|
result->type = call->type;
|
||||||
result->async_io.status = user->callback( user, iosb, call->async_io.status );
|
result->async_io.status = user->callback( user, iosb, call->async_io.status );
|
||||||
|
|
||||||
if ((frame = get_syscall_frame()) != saved_frame)
|
|
||||||
{
|
|
||||||
/* The frame can be altered by syscalls from ws2_32 async callbacks
|
|
||||||
* which are currently in the user part. */
|
|
||||||
static unsigned int once;
|
|
||||||
|
|
||||||
if (!once++)
|
|
||||||
FIXME( "syscall frame changed in APC function, frame %p, saved_frame %p.\n", frame, saved_frame );
|
|
||||||
|
|
||||||
set_syscall_frame( saved_frame );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result->async_io.status != STATUS_PENDING)
|
if (result->async_io.status != STATUS_PENDING)
|
||||||
result->async_io.total = iosb->Information;
|
result->async_io.total = iosb->Information;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -201,15 +201,6 @@ static inline struct arm_thread_data *arm_thread_data(void)
|
||||||
return (struct arm_thread_data *)ntdll_get_thread_data()->cpu_data;
|
return (struct arm_thread_data *)ntdll_get_thread_data()->cpu_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *get_syscall_frame(void)
|
|
||||||
{
|
|
||||||
return arm_thread_data()->syscall_frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_syscall_frame(void *frame)
|
|
||||||
{
|
|
||||||
arm_thread_data()->syscall_frame = frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* unwind_builtin_dll
|
* unwind_builtin_dll
|
||||||
|
|
|
@ -157,16 +157,6 @@ static inline struct arm64_thread_data *arm64_thread_data(void)
|
||||||
return (struct arm64_thread_data *)ntdll_get_thread_data()->cpu_data;
|
return (struct arm64_thread_data *)ntdll_get_thread_data()->cpu_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *get_syscall_frame(void)
|
|
||||||
{
|
|
||||||
return arm64_thread_data()->syscall_frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_syscall_frame(void *frame)
|
|
||||||
{
|
|
||||||
arm64_thread_data()->syscall_frame = frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern void raise_func_trampoline( EXCEPTION_RECORD *rec, CONTEXT *context, void *dispatcher );
|
extern void raise_func_trampoline( EXCEPTION_RECORD *rec, CONTEXT *context, void *dispatcher );
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -527,16 +527,6 @@ static inline struct x86_thread_data *x86_thread_data(void)
|
||||||
return (struct x86_thread_data *)ntdll_get_thread_data()->cpu_data;
|
return (struct x86_thread_data *)ntdll_get_thread_data()->cpu_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *get_syscall_frame(void)
|
|
||||||
{
|
|
||||||
return x86_thread_data()->syscall_frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_syscall_frame(void *frame)
|
|
||||||
{
|
|
||||||
x86_thread_data()->syscall_frame = frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct syscall_xsave *get_syscall_xsave( struct syscall_frame *frame )
|
static struct syscall_xsave *get_syscall_xsave( struct syscall_frame *frame )
|
||||||
{
|
{
|
||||||
return (struct syscall_xsave *)((ULONG_PTR)((struct syscall_xsave *)frame - 1) & ~63);
|
return (struct syscall_xsave *)((ULONG_PTR)((struct syscall_xsave *)frame - 1) & ~63);
|
||||||
|
@ -973,7 +963,7 @@ __ASM_GLOBAL_FUNC( set_full_cpu_context,
|
||||||
*/
|
*/
|
||||||
void signal_restore_full_cpu_context(void)
|
void signal_restore_full_cpu_context(void)
|
||||||
{
|
{
|
||||||
struct syscall_xsave *xsave = get_syscall_xsave( get_syscall_frame() );
|
struct syscall_xsave *xsave = get_syscall_xsave( x86_thread_data()->syscall_frame );
|
||||||
|
|
||||||
if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE)
|
if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -327,15 +327,6 @@ static inline struct amd64_thread_data *amd64_thread_data(void)
|
||||||
return (struct amd64_thread_data *)ntdll_get_thread_data()->cpu_data;
|
return (struct amd64_thread_data *)ntdll_get_thread_data()->cpu_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *get_syscall_frame(void)
|
|
||||||
{
|
|
||||||
return amd64_thread_data()->syscall_frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_syscall_frame(void *frame)
|
|
||||||
{
|
|
||||||
amd64_thread_data()->syscall_frame = frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct syscall_xsave *get_syscall_xsave( struct syscall_frame *frame )
|
static struct syscall_xsave *get_syscall_xsave( struct syscall_frame *frame )
|
||||||
{
|
{
|
||||||
|
@ -1598,7 +1589,7 @@ __ASM_GLOBAL_FUNC( set_full_cpu_context,
|
||||||
*/
|
*/
|
||||||
void signal_restore_full_cpu_context(void)
|
void signal_restore_full_cpu_context(void)
|
||||||
{
|
{
|
||||||
struct syscall_xsave *xsave = get_syscall_xsave( get_syscall_frame() );
|
struct syscall_xsave *xsave = get_syscall_xsave( amd64_thread_data()->syscall_frame );
|
||||||
|
|
||||||
if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE)
|
if (cpu_info.ProcessorFeatureBits & CPU_FEATURE_XSAVE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -290,9 +290,6 @@ extern void WINAPI DECLSPEC_NORETURN call_user_exception_dispatcher( EXCEPTION_R
|
||||||
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;
|
||||||
|
|
||||||
extern void *get_syscall_frame(void) DECLSPEC_HIDDEN;
|
|
||||||
extern void set_syscall_frame(void *frame) DECLSPEC_HIDDEN;
|
|
||||||
|
|
||||||
#define IMAGE_DLLCHARACTERISTICS_PREFER_NATIVE 0x0010 /* Wine extension */
|
#define IMAGE_DLLCHARACTERISTICS_PREFER_NATIVE 0x0010 /* Wine extension */
|
||||||
|
|
||||||
#define TICKSPERSEC 10000000
|
#define TICKSPERSEC 10000000
|
||||||
|
|
Loading…
Reference in New Issue