debuggers.hg

view xen/include/xen/keyhandler.h @ 3683:1c55bbe02576

bitkeeper revision 1.1159.212.84 (42033fc2Q0eAAtQcKyCf8cXCt_Fgfg)

Common-code cleanups, for ia64.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Fri Feb 04 09:26:26 2005 +0000 (2005-02-04)
parents f1c44a4d4998
children 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 #include <asm/regs.h>
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__ */