Files
xen/extras/mini-os/include/events.h
T
Keir Fraser 8f96998338 stubdom: fixes to compile with qemu-xen
This adds fixes to the stub domain build into compiling Ian Jackson's
qemu-xen.  The most notable change is that mini-os headers now
#include each other through a mini-os/ prefix, so that we can turn all
-I into -isystem and still be sure that we include Mini-OS headers
(and not qemu's console.h or blktaplib's list.h for instance...).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-07-10 14:15:46 +01:00

52 lines
1.7 KiB
C

/* -*- Mode:C; c-basic-offset:4; tab-width:4 -*-
****************************************************************************
* (C) 2003 - Rolf Neugebauer - Intel Research Cambridge
* (C) 2005 - Grzegorz Milos - Intel Reseach Cambridge
****************************************************************************
*
* File: events.h
* Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk)
* Changes: Grzegorz Milos (gm281@cam.ac.uk)
*
* Date: Jul 2003, changes Jun 2005
*
* Environment: Xen Minimal OS
* Description: Deals with events on the event channels
*
****************************************************************************
*/
#ifndef _EVENTS_H_
#define _EVENTS_H_
#include<mini-os/traps.h>
#include<xen/event_channel.h>
typedef void (*evtchn_handler_t)(evtchn_port_t, struct pt_regs *, void *);
/* prototypes */
int do_event(evtchn_port_t port, struct pt_regs *regs);
evtchn_port_t bind_virq(uint32_t virq, evtchn_handler_t handler, void *data);
evtchn_port_t bind_pirq(uint32_t pirq, int will_share, evtchn_handler_t handler, void *data);
evtchn_port_t bind_evtchn(evtchn_port_t port, evtchn_handler_t handler,
void *data);
void unbind_evtchn(evtchn_port_t port);
void init_events(void);
int evtchn_alloc_unbound(domid_t pal, evtchn_handler_t handler,
void *data, evtchn_port_t *port);
int evtchn_bind_interdomain(domid_t pal, evtchn_port_t remote_port,
evtchn_handler_t handler, void *data,
evtchn_port_t *local_port);
void unbind_all_ports(void);
static inline int notify_remote_via_evtchn(evtchn_port_t port)
{
evtchn_send_t op;
op.port = port;
return HYPERVISOR_event_channel_op(EVTCHNOP_send, &op);
}
void fini_events(void);
#endif /* _EVENTS_H_ */