aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2013-04-17 18:24:52 +0000
committerPekka Enberg <penberg@kernel.org>2013-04-17 18:25:32 +0000
commit9985bc420a8c99e5fa03187da9cd5f3b98349351 (patch)
treec8b5ad9bd589eef78dec8305a6a01f280b8366f2
parenta048d852cac71dc4753288cfd5536560d7a2a9b9 (diff)
downloadjato-9985bc420a8c99e5fa03187da9cd5f3b98349351.tar.gz
sys/linux-x86: Simplify install_signal_bh()
Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--sys/linux-x86/signal.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/linux-x86/signal.c b/sys/linux-x86/signal.c
index f51bd0d8..8fdf2d53 100644
--- a/sys/linux-x86/signal.c
+++ b/sys/linux-x86/signal.c
@@ -68,19 +68,16 @@ int install_signal_bh(void *ctx, signal_bh_fn bh)
uc = ctx;
- stack = (unsigned long*)uc->uc_mcontext.gregs[REG_SP];
+ stack = (unsigned long *) uc->uc_mcontext.gregs[REG_SP];
/* push bottom-half handler address on stack */
- stack--;
- *stack = (unsigned long)bh;
+ *(--stack) = (unsigned long) bh;
/* push return address on stack */
- stack--;
- *stack = uc->uc_mcontext.gregs[REG_IP];
+ *(--stack) = uc->uc_mcontext.gregs[REG_IP];
- uc->uc_mcontext.gregs[REG_SP] -= 2 * sizeof(unsigned long);
-
- uc->uc_mcontext.gregs[REG_IP] = (unsigned long)signal_bh_trampoline;
+ uc->uc_mcontext.gregs[REG_SP] = (unsigned long) stack;
+ uc->uc_mcontext.gregs[REG_IP] = (unsigned long) signal_bh_trampoline;
return 0;
}