EM-ODP 4.4.0
Event Machine on ODP
Loading...
Searching...
No Matches
em_dispatch_duration_t Struct Reference

#include <event_machine_dispatcher.h>

Data Fields

em_dispatch_duration_select_t select
 
uint64_t rounds
 
uint64_t ns
 
uint64_t events
 
struct { 
 
   uint64_t   rounds 
 
   uint64_t   ns 
 
no_events 
 

Detailed Description

Dispatch duration.

Select which dispatch duration, or combination, is to be used with the em_dispatch_duration() function. Bitwise OR .select-flags for a combination. Dispatch will end when one of the selected 'duration' options is reached, whichever is hit first.

Examples
dyn_cores.c.

Definition at line 129 of file event_machine_dispatcher.h.

Field Documentation

◆ events

uint64_t em_dispatch_duration_t::events

Dispatch until (at least) the given number of events have been handled, if used must be > 0. Only considered if .select contains EM_DISPATCH_DURATION_EVENTS.

Note that the option 'burst_size' affects the number of events dispatched. EM will request new events to dispatch while the number of dispatched events is < .events and then handle the whole burst.

The option 'sched_pause=true' might also increase the number of events dispatched since the EM dispatcher needs to fetch and handle any leftover events held locally by the scheduler before returning.

Examples
dyn_cores.c.

Definition at line 177 of file event_machine_dispatcher.h.

◆ ns

uint64_t em_dispatch_duration_t::ns

Dispatch (at least) for the given time in nanoseconds, if used must be > 0. Only considered if .select contains EM_DISPATCH_DURATION_NS.

Using a large value for the option 'wait_ns' relative to .ns might delay the return from dispatch.

The runtime of the EO-receive function for the last batch of events is not covered by .ns. EM will request new events to dispatch while the elapsed dispatch time is < .ns.

Dispatch until no events have been received for the given time in nanoseconds, if used must be > 0. Only considered if .select contains EM_DISPATCH_DURATION_NO_EVENTS_NS.

Examples
dyn_cores.c.

Definition at line 162 of file event_machine_dispatcher.h.

◆ rounds

uint64_t em_dispatch_duration_t::rounds

Dispatch for the given number of rounds, if used must be > 0. Only considered if .select contains EM_DISPATCH_DURATION_ROUNDS.

Dispatch until no events have been received for the given number of rounds, if used must be > 0. Only considered if .select contains EM_DISPATCH_DURATION_NO_EVENTS_ROUNDS.

Examples
dyn_cores.c.

Definition at line 147 of file event_machine_dispatcher.h.

◆ select

em_dispatch_duration_select_t em_dispatch_duration_t::select

Select which 'duration'-fields that should be taken into account when evaluating the em_dispatch_duration() run time.

Only the duration fields that correspond to set .select-flags will be used.

Examples
dyn_cores.c.

Definition at line 137 of file event_machine_dispatcher.h.


The documentation for this struct was generated from the following file: