ia64/xen-unstable

view xen/include/xen/keyhandler.h @ 3883:2fd53607c7ee

bitkeeper revision 1.1230.2.1 (421a871fZOwVkDnyTbM9miM9F5Em1g)

Avoid pulling in more header files (again).
Signed-off-by: chris@xensource.com
author cl349@arcadians.cl.cam.ac.uk
date Tue Feb 22 01:13:03 2005 +0000 (2005-02-22)
parents 73f9c9685211
children ff8c9a2be5f7
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 /*
14 * Register a callback function for key @key. The callback occurs in
15 * softirq context with no locks held and interrupts enabled.
16 */
17 typedef void keyhandler_t(unsigned char key);
18 extern void register_keyhandler(
19 unsigned char key, keyhandler_t *handler, char *desc);
21 /*
22 * Register an IRQ callback function for key @key. The callback occurs
23 * synchronously in hard-IRQ context with interrupts disabled. The @regs
24 * callback parameter points at the interrupted register context.
25 */
26 typedef void irq_keyhandler_t(unsigned char key, struct xen_regs *regs);
27 extern void register_irq_keyhandler(
28 unsigned char key, irq_keyhandler_t *handler, char *desc);
30 /* Inject a keypress into the key-handling subsystem. */
31 extern void handle_keypress(unsigned char key, struct xen_regs *regs);
33 #endif /* __XEN_KEYHANDLER_H__ */