Commit 10eba9b2 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

Revert "ntdll: Preserve syscall frame when calling async IO system APC.".

This reverts commit 8b8ddffa. ws2_32 no longer uses system APCs. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 2ead3a11
......@@ -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 );
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->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)
result->async_io.total = iosb->Information;
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;
}
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
......
......@@ -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;
}
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 );
/***********************************************************************
......
......@@ -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;
}
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 )
{
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)
{
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)
{
......
......@@ -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;
}
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 )
{
......@@ -1598,7 +1589,7 @@ __ASM_GLOBAL_FUNC( set_full_cpu_context,
*/
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)
{
......
......@@ -290,9 +290,6 @@ extern void WINAPI DECLSPEC_NORETURN call_user_exception_dispatcher( EXCEPTION_R
NTSTATUS (WINAPI *dispatcher)(EXCEPTION_RECORD*,CONTEXT*) ) 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 TICKSPERSEC 10000000
......
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