diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-11-27 10:03:35 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-11-27 10:03:35 +0000 |
commit | d255c83172c37319a8e8174e0abccb47abd1296c (patch) | |
tree | 8ce4362fccd3754caa4fc55ff89230448b4c0563 /extras/mini-os/events.c | |
parent | e9542d25deafb3c0e4ab376765de9d51c8f45117 (diff) | |
download | xen-d255c83172c37319a8e8174e0abccb47abd1296c.tar.gz xen-d255c83172c37319a8e8174e0abccb47abd1296c.tar.bz2 xen-d255c83172c37319a8e8174e0abccb47abd1296c.zip |
[MINIOS] Exports a function to have all Xen ports unbound.
This is necessary when using mini-os as the foundation for a boot-loader.
Signed-off-by: Jacob Gorm Hansen <jacobg@diku.dk>
Diffstat (limited to 'extras/mini-os/events.c')
-rw-r--r-- | extras/mini-os/events.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c index e05f68d83d..5d60ab70fc 100644 --- a/extras/mini-os/events.c +++ b/extras/mini-os/events.c @@ -35,6 +35,21 @@ typedef struct _ev_action_t { static ev_action_t ev_actions[NR_EVS]; void default_handler(evtchn_port_t port, struct pt_regs *regs, void *data); +void unbind_all_ports(void) +{ + int i; + + for(i=0;i<NR_EVS;i++) + { + if(ev_actions[i].handler != default_handler) + { + struct evtchn_close close; + mask_evtchn(i); + close.port = i; + HYPERVISOR_event_channel_op(EVTCHNOP_close, &close); + } + } +} /* * Demux events to different handlers. |