aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/ia32
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2009-02-20 19:00:13 -0800
committerIngo Molnar <mingo@elte.hu>2009-02-22 17:54:47 +0100
commit8801ead40caa8ba9c7d47a06ff1247c166cbfd5a (patch)
treeb26597ea01f5402a6a410ce73dbe06ea73d95f6a /arch/x86/ia32
parenta47e3ec197f515e25c77805f02d26f9e86456f65 (diff)
x86: ia32_signal: introduce GET_SEG() macro
Impact: cleanup introduce GET_SEG() macro like arch/x86/kernel/signal.c. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r--arch/x86/ia32/ia32_signal.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index adc63f81cb8..8dd0903da08 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -192,11 +192,15 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr,
get_user_ex(regs->x, &sc->x); \
}
-#define COPY_SEG_CPL3(seg) { \
- unsigned short tmp; \
- get_user_ex(tmp, &sc->seg); \
- regs->seg = tmp | 3; \
-}
+#define GET_SEG(seg) ({ \
+ unsigned short tmp; \
+ get_user_ex(tmp, &sc->seg); \
+ tmp; \
+})
+
+#define COPY_SEG_CPL3(seg) do { \
+ regs->seg = GET_SEG(seg) | 3; \
+} while (0)
#define RELOAD_SEG(seg) { \
unsigned int cur, pre; \