cregit-Linux how code gets into the kernel

Release 4.12 include/linux/sysrq.h

Directory: include/linux
/* -*- 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>
 *
 *      (c) 2000 Crutcher Dunnavant <crutcher+kernel@datastacks.com>
 *      overhauled to use key registration
 *      based upon discusions in irc://irc.openprojects.net/#kernelnewbies
 */

#ifndef _LINUX_SYSRQ_H

#define _LINUX_SYSRQ_H

#include <linux/errno.h>
#include <linux/types.h>

/* Possible values of bitmask for enabling sysrq functions */
/* 0x0001 is reserved for enable everything */

#define SYSRQ_ENABLE_LOG	0x0002

#define SYSRQ_ENABLE_KEYBOARD	0x0004

#define SYSRQ_ENABLE_DUMP	0x0008

#define SYSRQ_ENABLE_SYNC	0x0010

#define SYSRQ_ENABLE_REMOUNT	0x0020

#define SYSRQ_ENABLE_SIGNAL	0x0040

#define SYSRQ_ENABLE_BOOT	0x0080

#define SYSRQ_ENABLE_RTNICE	0x0100


struct sysrq_key_op {
	
void (*handler)(int);
	
char *help_msg;
	
char *action_msg;
	
int enable_mask;
};

#ifdef CONFIG_MAGIC_SYSRQ

/* 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 key);
void __handle_sysrq(int key, bool check_mask);
int register_sysrq_key(int key, struct sysrq_key_op *op);
int unregister_sysrq_key(int key, struct sysrq_key_op *op);
struct sysrq_key_op *__sysrq_get_key_op(int key);

int sysrq_toggle_support(int enable_mask);

#else


static inline void handle_sysrq(int key) { }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Torokhov555.56%150.00%
Ingo Molnar444.44%150.00%
Total9100.00%2100.00%


static inline void __handle_sysrq(int key, bool check_mask) { }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Torokhov12100.00%2100.00%
Total12100.00%2100.00%


static inline int register_sysrq_key(int key, struct sysrq_key_op *op) { return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds1157.89%150.00%
Dmitry Torokhov842.11%150.00%
Total19100.00%2100.00%


static inline int unregister_sysrq_key(int key, struct sysrq_key_op *op) { return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Torokhov1052.63%150.00%
Ingo Molnar947.37%150.00%
Total19100.00%2100.00%

#endif #endif /* _LINUX_SYSRQ_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Linus Torvalds5929.65%215.38%
Dmitry Torokhov4623.12%323.08%
Jan Kara3718.59%17.69%
Ingo Molnar189.05%17.69%
Jason Wessel94.52%17.69%
Thomas Petazzoni94.52%17.69%
Al Viro94.52%17.69%
Linus Torvalds (pre-git)73.52%17.69%
Tobias Doerffel31.51%17.69%
Jason Baron21.01%17.69%
Total199100.00%13100.00%
Directory: include/linux
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.