~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/common/event.c

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 */
10
 
 
11
 
#include <xeno/config.h>
12
 
#include <xeno/event.h>
13
 
 
14
 
typedef void (*hyp_event_callback_fn_t)(void);
15
 
 
16
 
/* Ordering must match definitions of _HYP_EVENT_* in xeno/sched.h */
17
 
static hyp_event_callback_fn_t event_call_fn[] = 
18
 
{
19
 
    __enter_scheduler,
20
 
    kill_domain,
21
 
};
22
 
 
23
 
/* Handle outstanding events for the currently-executing domain. */
24
 
void do_hyp_events(void)
25
 
{
26
 
    int nr;
27
 
    while ( (nr = ffs(current->hyp_events)) != 0 )
28
 
        (event_call_fn[nr-1])();
29
 
}