include/linux/sysrq.h
Source file repositories/reference/linux-study-clean/include/linux/sysrq.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/sysrq.h- Extension
.h- Size
- 1993 bytes
- Lines
- 84
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/errno.hlinux/types.h
Detected Declarations
struct sysrq_key_opfunction handle_sysrqfunction unregister_sysrq_keyfunction sysrq_mask
Annotated Snippet
struct sysrq_key_op {
void (* const handler)(u8);
const char * const help_msg;
const char * const action_msg;
const 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(u8 key);
void __handle_sysrq(u8 key, bool check_mask);
int register_sysrq_key(u8 key, const struct sysrq_key_op *op);
int unregister_sysrq_key(u8 key, const struct sysrq_key_op *op);
extern const struct sysrq_key_op *__sysrq_reboot_op;
int sysrq_toggle_support(int enable_mask);
int sysrq_mask(void);
#else
static inline void handle_sysrq(u8 key)
{
}
static inline void __handle_sysrq(u8 key, bool check_mask)
{
}
static inline int register_sysrq_key(u8 key, const struct sysrq_key_op *op)
{
return -EINVAL;
}
static inline int unregister_sysrq_key(u8 key, const struct sysrq_key_op *op)
{
return -EINVAL;
}
static inline int sysrq_mask(void)
{
/* Magic SysRq disabled mask */
return 0;
}
#endif
#endif /* _LINUX_SYSRQ_H */
Annotation
- Immediate include surface: `linux/errno.h`, `linux/types.h`.
- Detected declarations: `struct sysrq_key_op`, `function handle_sysrq`, `function unregister_sysrq_key`, `function sysrq_mask`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.