blob: e630aba706f5806faaba20746abccdc5a430477d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* -*- linux-c -*-
*
* $Id: sysrq.h,v 1.3 1997/07/17 11:54:33 mj Exp $
*
* Linux Magic System Request Key Hacks
*
* (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/
#include <linux/config.h>
struct pt_regs;
struct kbd_struct;
struct tty_struct;
/* Generic SysRq interface -- you may call it from any device driver, supplying
* ASCII code of the key, pointer to registers and kbd/tty structs (if they
* are available -- else NULL's).
*/
void handle_sysrq(int, struct pt_regs *, struct kbd_struct *, struct tty_struct *);
/* Deferred actions */
extern int emergency_sync_scheduled;
#define EMERG_SYNC 1
#define EMERG_REMOUNT 2
void do_emergency_sync(void);
#ifdef CONFIG_MAGIC_SYSRQ
#define CHECK_EMERGENCY_SYNC \
if (emergency_sync_scheduled) \
do_emergency_sync();
#else
#define CHECK_EMERGENCY_SYNC
#endif
|