3 * $Id: sysrq.h,v 1.3 1997/07/17 11:54:33 mj Exp $
5 * Linux Magic System Request Key Hacks
7 * (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
9 * (c) 2000 Crutcher Dunnavant <crutcher+kernel@datastacks.com>
10 * overhauled to use key registration
11 * based upon discusions in irc://irc.openprojects.net/#kernelnewbies
14 #include <linux/config.h>
20 void (*handler)(int, struct pt_regs *, struct tty_struct *);
25 #ifdef CONFIG_MAGIC_SYSRQ
27 /* Generic SysRq interface -- you may call it from any device driver, supplying
28 * ASCII code of the key, pointer to registers and kbd/tty structs (if they
29 * are available -- else NULL's).
32 void handle_sysrq(int, struct pt_regs *, struct tty_struct *);
33 void __handle_sysrq(int, struct pt_regs *, struct tty_struct *);
34 int register_sysrq_key(int, struct sysrq_key_op *);
35 int unregister_sysrq_key(int, struct sysrq_key_op *);
36 struct sysrq_key_op *__sysrq_get_key_op(int key);
40 static inline int __reterr(void)
45 #define register_sysrq_key(ig,nore) __reterr()
46 #define unregister_sysrq_key(ig,nore) __reterr()