Commit fa1590bb authored by Alexander Kartashov's avatar Alexander Kartashov Committed by Pavel Emelyanov

restorer: introduced the macro SIGFRAME_OFFSET

The macro is designated to tune the beginning of a sigframe on different architectures.
Signed-off-by: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 446f89dd
...@@ -131,6 +131,8 @@ struct rt_sigframe { ...@@ -131,6 +131,8 @@ struct rt_sigframe {
#define RT_SIGFRAME_UC(rt_sigframe) rt_sigframe->uc #define RT_SIGFRAME_UC(rt_sigframe) rt_sigframe->uc
#define SIGFRAME_OFFSET 8
int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r); int restore_gpregs(struct rt_sigframe *f, UserX86RegsEntry *r);
......
...@@ -210,7 +210,7 @@ long __export_restore_thread(struct thread_restore_args *args) ...@@ -210,7 +210,7 @@ long __export_restore_thread(struct thread_restore_args *args)
futex_dec_and_wake(&thread_inprogress); futex_dec_and_wake(&thread_inprogress);
new_sp = (long)rt_sigframe + 8; new_sp = (long)rt_sigframe + SIGFRAME_OFFSET;
ARCH_RT_SIGRETURN(new_sp); ARCH_RT_SIGRETURN(new_sp);
core_restore_end: core_restore_end:
...@@ -715,7 +715,7 @@ long __export_restore_task(struct task_restore_core_args *args) ...@@ -715,7 +715,7 @@ long __export_restore_task(struct task_restore_core_args *args)
/* /*
* Sigframe stack. * Sigframe stack.
*/ */
new_sp = (long)rt_sigframe + 8; new_sp = (long)rt_sigframe + SIGFRAME_OFFSET;
/* /*
* Prepare the stack and call for sigreturn, * Prepare the stack and call for sigreturn,
......
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