Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
events.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021-2025 EPAM Systems
3 * Copyright (c) 2022 Arm Limited (or its affiliates). All rights reserved.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
13
14#ifndef __XEN_EVENTS_H__
15#define __XEN_EVENTS_H__
16
17#include <xen/public/event_channel.h>
18
19#include <zephyr/kernel.h>
20
27
35typedef void (*evtchn_cb_t)(void *priv);
36
38/* Internal event-channel callback slot. */
39struct event_channel_handle {
40 evtchn_cb_t cb;
41 void *priv;
42};
43typedef struct event_channel_handle evtchn_handle_t;
45
58int evtchn_status(evtchn_status_t *status);
59
69int evtchn_close(evtchn_port_t port);
70
81int evtchn_set_priority(evtchn_port_t port, uint32_t priority);
82
92int notify_evtchn(evtchn_port_t port);
93
103int alloc_unbound_event_channel(domid_t remote_dom);
104
115int alloc_unbound_event_channel_dom0(domid_t dom, domid_t remote_dom);
116
129int bind_interdomain_event_channel(domid_t remote_dom, evtchn_port_t remote_port,
130 evtchn_cb_t cb, void *data);
131
143int bind_event_channel(evtchn_port_t port, evtchn_cb_t cb, void *data);
144
157int unbind_event_channel(evtchn_port_t port);
158
169int get_missed_events(evtchn_port_t port);
170
180int mask_event_channel(evtchn_port_t port);
181
191int unmask_event_channel(evtchn_port_t port);
192
200void clear_event_channel(evtchn_port_t port);
201
214
216
217#endif /* __XEN_EVENTS_H__ */
void clear_event_channel(evtchn_port_t port)
Clear the pending bit for an event channel.
void(* evtchn_cb_t)(void *priv)
Event-channel callback signature.
Definition events.h:35
int get_missed_events(evtchn_port_t port)
Get and clear the missed-event state for an unbound channel.
int notify_evtchn(evtchn_port_t port)
Send a notification over an event channel.
int alloc_unbound_event_channel(domid_t remote_dom)
Allocate an unbound event channel for the calling domain.
int mask_event_channel(evtchn_port_t port)
Mask local delivery for an event channel.
int bind_event_channel(evtchn_port_t port, evtchn_cb_t cb, void *data)
Attach a callback to an already allocated local event channel.
int evtchn_set_priority(evtchn_port_t port, uint32_t priority)
Set the Xen priority assigned to an event channel.
int alloc_unbound_event_channel_dom0(domid_t dom, domid_t remote_dom)
Allocate an unbound event channel between two domains.
int unbind_event_channel(evtchn_port_t port)
Remove the callback bound to an event channel.
int evtchn_close(evtchn_port_t port)
Close a local event channel.
int unmask_event_channel(evtchn_port_t port)
Unmask local delivery for an event channel.
int bind_interdomain_event_channel(domid_t remote_dom, evtchn_port_t remote_port, evtchn_cb_t cb, void *data)
Bind to a remote event channel and register a callback.
int evtchn_status(evtchn_status_t *status)
Query the status of an event channel.
int xen_events_init(void)
Initialize Xen event handling for the current guest.
Public kernel APIs.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90