Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
events.h File Reference

Xen event channel interface. More...

Go to the source code of this file.

Data Structures

struct  event_channel_handle

Typedefs

typedef void(* evtchn_cb_t) (void *priv)
typedef struct event_channel_handle evtchn_handle_t

Functions

int evtchn_status (evtchn_status_t *status)
int evtchn_close (evtchn_port_t port)
int evtchn_set_priority (evtchn_port_t port, uint32_t priority)
int notify_evtchn (evtchn_port_t port)
int alloc_unbound_event_channel (domid_t remote_dom)
 Allocate event-channel between caller and remote domain.
int bind_interdomain_event_channel (domid_t remote_dom, evtchn_port_t remote_port, evtchn_cb_t cb, void *data)
 Allocate local event channel, binded to remote port and attach specified callback to it.
int bind_event_channel (evtchn_port_t port, evtchn_cb_t cb, void *data)
 Bind user-defined handler to specified event-channel.
int unbind_event_channel (evtchn_port_t port)
 Unbind handler from event channel, substitute it with empty callback.
int get_missed_events (evtchn_port_t port)
 Check if missed events are present on specified port.
int mask_event_channel (evtchn_port_t port)
 Disable event processing on specified port.
int unmask_event_channel (evtchn_port_t port)
 Enable event processing on specified port.
void clear_event_channel (evtchn_port_t port)
 Clear event channel from pending events.
int xen_events_init (void)
 Initialize Xen event channel driver, used on initialization.

Detailed Description

Xen event channel interface.

This file provides the interface for managing Xen event channels, including allocation, binding, and callback management.

Typedef Documentation

◆ evtchn_cb_t

typedef void(* evtchn_cb_t) (void *priv)

◆ evtchn_handle_t

Function Documentation

◆ alloc_unbound_event_channel()

int alloc_unbound_event_channel ( domid_t remote_dom)

Allocate event-channel between caller and remote domain.

Parameters
remote_domremote domain domid
Return values
portlocal event channel port on success
-errnonegative code on error

◆ bind_event_channel()

int bind_event_channel ( evtchn_port_t port,
evtchn_cb_t cb,
void * data )

Bind user-defined handler to specified event-channel.

Parameters
portevent channel number
cbpointer to event channel handler
dataprivate data, that will be passed to handler as parameter
Return values
0on success

◆ bind_interdomain_event_channel()

int bind_interdomain_event_channel ( domid_t remote_dom,
evtchn_port_t remote_port,
evtchn_cb_t cb,
void * data )

Allocate local event channel, binded to remote port and attach specified callback to it.

Parameters
remote_domremote domain domid
remote_portremote domain event channel port number
cbcallback, attached to locat port
dataprivate data, that will be passed to cb
Return values
portlocal event channel port on success
-errnonegative code on error

◆ clear_event_channel()

void clear_event_channel ( evtchn_port_t port)

Clear event channel from pending events.

Parameters
portevent channel number

◆ evtchn_close()

int evtchn_close ( evtchn_port_t port)

◆ evtchn_set_priority()

int evtchn_set_priority ( evtchn_port_t port,
uint32_t priority )

◆ evtchn_status()

int evtchn_status ( evtchn_status_t * status)

◆ get_missed_events()

int get_missed_events ( evtchn_port_t port)

Check if missed events are present on specified port.

Parameters
portevent channel number
Return values
1if missed events are present
0otherwise

◆ mask_event_channel()

int mask_event_channel ( evtchn_port_t port)

Disable event processing on specified port.

Parameters
portevent channel number
Return values
0on success
-errnonegative code on error

◆ notify_evtchn()

int notify_evtchn ( evtchn_port_t port)

◆ unbind_event_channel()

int unbind_event_channel ( evtchn_port_t port)

Unbind handler from event channel, substitute it with empty callback.

Parameters
portevent channel number to unbind
Return values
0on success

◆ unmask_event_channel()

int unmask_event_channel ( evtchn_port_t port)

Enable event processing on specified port.

Parameters
portevent channel number
Return values
0on success
-errnonegative code on error

◆ xen_events_init()

int xen_events_init ( void )

Initialize Xen event channel driver, used on initialization.

Return values
0on success
-errnonegative code on error