25#include <l4/sys/utcb.h>
45typedef void (*l4vcpu_setup_ipc_t)(
l4_utcb_t *utcb);
84 l4vcpu_event_hndl_t do_event_work_cb,
105 l4vcpu_event_hndl_t do_event_work_cb,
125 l4vcpu_event_hndl_t do_event_work_cb,
144 l4vcpu_event_hndl_t do_event_work_cb,
207#include <l4/sys/ipc.h>
208#include <l4/vcpu/vcpu_arch.h>
214 vcpu->state &= ~L4_VCPU_F_IRQ;
222 unsigned s = vcpu->state;
231 l4vcpu_event_hndl_t do_event_work_cb,
236 vcpu->i.tag =
l4_ipc_wait(utcb, &vcpu->i.label, to);
238 do_event_work_cb(vcpu);
244 l4vcpu_event_hndl_t do_event_work_cb,
262 do_event_work_cb, setup_ipc);
270 l4vcpu_event_hndl_t do_event_work_cb,
282 l4vcpu_event_hndl_t do_event_work_cb,
285 l4vcpu_wait(vcpu, utcb,
L4_IPC_NEVER, do_event_work_cb, setup_ipc);
int l4vcpu_ext_alloc(l4_vcpu_state_t **vcpu, l4_addr_t *ext_state, l4_cap_idx_t task, l4_cap_idx_t regmgr) L4_NOTHROW
Allocate state area for an extended vCPU.
int l4vcpu_is_irq_entry(l4_vcpu_state_t const *vcpu) L4_NOTHROW
Return whether the entry reason was an IRQ/IPC message.
void l4vcpu_irq_enable(l4_vcpu_state_t *vcpu, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW
Enable a vCPU for event delivery.
void l4vcpu_irq_restore(l4_vcpu_state_t *vcpu, unsigned s, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW
Restore a previously saved IRQ/event state.
unsigned l4vcpu_irq_disable_save(l4_vcpu_state_t *vcpu) L4_NOTHROW
Disable a vCPU for event delivery and return previous state.
int l4vcpu_is_page_fault_entry(l4_vcpu_state_t const *vcpu) L4_NOTHROW
Return whether the entry reason was a page fault.
void l4vcpu_irq_disable(l4_vcpu_state_t *vcpu) L4_NOTHROW
Disable a vCPU for event delivery.
void l4vcpu_print_state(const l4_vcpu_state_t *vcpu, const char *prefix) L4_NOTHROW
Print the state of a vCPU.
void l4vcpu_wait_for_event(l4_vcpu_state_t *vcpu, l4_utcb_t *utcb, l4vcpu_event_hndl_t do_event_work_cb, l4vcpu_setup_ipc_t setup_ipc) L4_NOTHROW
Wait for event.
unsigned long l4_addr_t
Address type.
unsigned long l4_cap_idx_t
Capability selector type.
l4_msgtag_t l4_ipc_wait(l4_utcb_t *utcb, l4_umword_t *label, l4_timeout_t timeout) L4_NOTHROW
Wait for an incoming message from any possible sender.
unsigned l4_msgtag_has_error(l4_msgtag_t t) L4_NOTHROW
Test for error indicator flag.
#define L4_IPC_BOTH_TIMEOUT_0
0 receive and send timeout
#define L4_IPC_NEVER
never timeout
struct l4_utcb_t l4_utcb_t
Opaque type for the UTCB.
@ L4_VCPU_SF_IRQ_PENDING
An event is pending: Either an IRQ or another thread attempts to send an IPC to this vCPU thread.
@ L4_VCPU_F_IRQ
Receiving of IRQs and IPC enabled.
#define __END_DECLS
End section with C types and functions.
#define L4_CV
Define calling convention.
#define L4_NOTHROW
Mark a function declaration and definition as never throwing an exception.
#define L4_INLINE
L4 Inline function attribute.
void l4_barrier(void)
Memory barrier.
#define __BEGIN_DECLS
Start section with C types and functions.
#define L4_LIKELY(x)
Expression is likely to execute.