debuggers.hg

view xen/include/xen/keyhandler.h @ 3136:f1c44a4d4998

bitkeeper revision 1.1159.1.446 (41a48ee42Omqs3zoJHTZPhLlPx5LUw)

Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno/BK/xen-unstable.bk
into arcadians.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xen.bk-smp
author cl349@arcadians.cl.cam.ac.uk
date Wed Nov 24 13:38:44 2004 +0000 (2004-11-24)
parents d0353c3d3ebd 2754a2ed61c3
children 1c55bbe02576 bbe8541361dd
line source
1 /******************************************************************************
2 * keyhandler.h
3 *
4 * We keep an array of 'handlers' for each key code between 0 and 255;
5 * this is intended to allow very simple debugging routines (toggle
6 * debug flag, dump registers, reboot, etc) to be hooked in in a slightly
7 * nicer fashion than just editing the serial/keyboard drivers.
8 */
10 #ifndef __XEN_KEYHANDLER_H__
11 #define __XEN_KEYHANDLER_H__
13 struct xen_regs;
15 /*
16 * Register a callback function for key @key. The callback occurs in
17 * softirq context with no locks held and interrupts enabled.
18 */
19 typedef void keyhandler_t(unsigned char key);
20 extern void register_keyhandler(
21 unsigned char key, keyhandler_t *handler, char *desc);
23 /*
24 * Register an IRQ callback function for key @key. The callback occurs
25 * synchronously in hard-IRQ context with interrupts disabled. The @regs
26 * callback parameter points at the interrupted register context.
27 */
28 typedef void irq_keyhandler_t(unsigned char key, struct xen_regs *regs);
29 extern void register_irq_keyhandler(
30 unsigned char key, irq_keyhandler_t *handler, char *desc);
32 /* Inject a keypress into the key-handling subsystem. */
33 extern void handle_keypress(unsigned char key, struct xen_regs *regs);
35 #endif /* __XEN_KEYHANDLER_H__ */