]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/ptrace.h
[MIPS] Add external declaration of pagetable_init() to pgalloc.h
[linux-2.6-omap-h63xx.git] / include / asm-mips / ptrace.h
index 30bf555faeaaee200fec9b2614f9aa17afe76d7b..8a1f2b6f04aca4e4b68fd9b63a2f4a42f7021da0 100644 (file)
@@ -82,6 +82,14 @@ struct pt_regs {
 
 extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit);
 
+extern NORET_TYPE void die(const char *, struct pt_regs *);
+
+static inline void die_if_kernel(const char *str, struct pt_regs *regs)
+{
+       if (unlikely(!user_mode(regs)))
+               die(str, regs);
+}
+
 #endif
 
 #endif /* _ASM_PTRACE_H */