direct-io.hg

view xen/common/event.c @ 441:f51904cbaf32

bitkeeper revision 1.217.1.1 (3ebb6b5a7lgG9jA710WaSwLy4Pviww)

event.c:
Add missing stop event to event.c lost during earlier checkin
author tlh20@elite.cl.cam.ac.uk
date Fri May 09 08:48:26 2003 +0000 (2003-05-09)
parents 148491d196aa
children 3b7be708d378
line source
1 /******************************************************************************
2 * event.c
3 *
4 * A nice interface for passing per-domain asynchronous events.
5 * These events are handled in the hypervisor, prior to return
6 * to the guest OS.
7 *
8 * Copyright (c) 2002, K A Fraser
9 */
11 #include <xeno/config.h>
12 #include <xeno/event.h>
14 typedef void (*hyp_event_callback_fn_t)(void);
16 extern void schedule(void);
18 /* Ordering must match definitions of _HYP_EVENT_* in xeno/sched.h */
19 static hyp_event_callback_fn_t event_call_fn[] =
20 {
21 schedule,
22 kill_domain,
23 stop_domain
24 };
26 /* Handle outstanding events for the currently-executing domain. */
27 void do_hyp_events(void)
28 {
29 int nr;
30 while ( (nr = ffs(current->hyp_events)) != 0 )
31 (event_call_fn[nr-1])();
32 }