summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc/ptrace.h')
-rw-r--r--include/asm-sparc/ptrace.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h
index c25334234a6f..6b5e6ce5043c 100644
--- a/include/asm-sparc/ptrace.h
+++ b/include/asm-sparc/ptrace.h
@@ -39,6 +39,16 @@ struct pt_regs {
#define UREG_FP UREG_I6
#define UREG_RETPC UREG_I7
+static inline bool pt_regs_is_syscall(struct pt_regs *regs)
+{
+ return (regs->psr & PSR_SYSCALL);
+}
+
+static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
+{
+ return (regs->psr &= ~PSR_SYSCALL);
+}
+
/* A register window */
struct reg_window {
unsigned long locals[8];
OpenPOWER on IntegriCloud