EM-ODP
3.7.0
Event Machine on ODP
|
EM dispatch options. More...
#include <event_machine_dispatcher.h>
Data Fields | |
uint64_t | wait_ns |
uint16_t | burst_size |
bool | skip_input_poll |
bool | skip_output_drain |
bool | sched_pause |
uint32_t | __internal_check |
EM dispatch options.
The options must be initialized once with em_dispatch_opt_init() before using them with other em_dispatch_...() calls for the first time. Further calls to em_dispatch_...() with the same options structure do not need initialization and the user is allowed to modify the options between calls to change the dispatch behaviour.
Definition at line 190 of file event_machine_dispatcher.h.
uint32_t em_dispatch_opt_t::__internal_check |
Internal check - don't touch!
EM will verify that em_dispatch_opt_init(opt) has been called before use with dispatch functions.
Definition at line 252 of file event_machine_dispatcher.h.
uint16_t em_dispatch_opt_t::burst_size |
Scheduler burst size. The max number of events the dispatcher will request in one burst from the scheduler.
default: EM_SCHED_MULTI_MAX_BURST
Definition at line 210 of file event_machine_dispatcher.h.
bool em_dispatch_opt_t::sched_pause |
Pause the scheduler on the calling core when exiting the EM dispatch function. If enabled, will also resume the scheduling when entering dispatch. Pausing also implicitly causes the dispatcher to fetch and handle any leftover events held locally by the scheduler before returning.
false: Do not pause and resume the scheduler when entering and exiting dispatch (default). true: Pause scheduling when exiting dispatch and resume scheduling when entering. EM will further empty and dispatch any remaining events locally stashed in the scheduler before returning causing some extra dispatch 'rounds' to be run.
Definition at line 244 of file event_machine_dispatcher.h.
bool em_dispatch_opt_t::skip_input_poll |
Override the possibly configured dispatcher input-polling callback (set via em_conf_t::input.input_poll_fn).
false: Do not skip the input-poll callback if configured (default). true: Skip the input-poll callback in the dispatcher.
Definition at line 219 of file event_machine_dispatcher.h.
bool em_dispatch_opt_t::skip_output_drain |
Override the possibly configured dispatcher output-drain callback (set via em_conf_t::output.output_drain_fn).
false: Do not skip the output-drain callback if configured (default). true: Skip the output-drain callback in the dispatcher.
Definition at line 228 of file event_machine_dispatcher.h.
uint64_t em_dispatch_opt_t::wait_ns |
Scheduler wait-for-events timeout in nanoseconds, might save power. The scheduler will wait for events, if no immediately available, for 'wait_ns' nanoseconds per scheduling / dispatch round.
Note that using a large 'wait_ns' value relative to a dispatch duration in 'ns' might delay the return from dispatch.
0: do not wait for events (default)
Definition at line 201 of file event_machine_dispatcher.h.