sparc: Fix debugger syscall restart interactions.
[deliverable/linux.git] / include / asm-sparc64 / ptrace.h
index 823656559d1adddd00fda91a0079992c3aff2609..90972a5ada59f8e3b324f430587922c7cbb2a562 100644 (file)
@@ -42,16 +42,14 @@ static inline int pt_regs_trap_type(struct pt_regs *regs)
        return regs->magic & 0x1ff;
 }
 
-static inline int pt_regs_clear_trap_type(struct pt_regs *regs)
+static inline bool pt_regs_is_syscall(struct pt_regs *regs)
 {
-       return regs->magic &= ~0x1ff;
+       return (regs->tstate & TSTATE_SYSCALL);
 }
 
-static inline bool pt_regs_is_syscall(struct pt_regs *regs)
+static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
 {
-       int tt = pt_regs_trap_type(regs);
-
-       return (tt == 0x110 || tt == 0x111 || tt == 0x16d);
+       return (regs->tstate &= ~TSTATE_SYSCALL);
 }
 
 struct pt_regs32 {
This page took 0.024933 seconds and 5 git commands to generate.