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

#include <event_machine_queue.h>

Data Fields

em_pool_t pool
 
uint64_t max_tmo_ns
 
uint32_t max_size
 
em_event_type_t event_type
 
uint32_t __internal_check
 

Detailed Description

Aggregator queue configuration parameters.

Aggregator queues try to bundle multiple events into vector events before enqueuing the events or vector events to the parent scheduled or unscheduled queue.

Always initialize with em_queue_aggr_conf_init() before setting fields to ensure forward compatibility with potentially added new options.

See also
em_queue_aggr_conf_init()

Definition at line 560 of file event_machine_queue.h.

Field Documentation

◆ __internal_check

uint32_t em_queue_aggr_conf_t::__internal_check

Internal check - don't touch!

EM will verify that em_queue_aggr_conf_init(conf) has been called before use.

Definition at line 626 of file event_machine_queue.h.

◆ event_type

em_event_type_t em_queue_aggr_conf_t::event_type

Event type eligible for aggregation into vector events

Only events of this type are collected into the vector. Use EM_EVENT_TYPE_ANY to allow all event types except event vectors.

Regardless of 'event_type', a vector event (major type EM_EVENT_TYPE_VECTOR) must never be sent to an aggregator queue (no vectors within vectors), see aggregator_queue.

Set to EM_EVENT_TYPE_UNDEF by em_queue_aggr_conf_init(); must be set to a valid type before calling em_queue_create_param().

Definition at line 618 of file event_machine_queue.h.

◆ max_size

uint32_t em_queue_aggr_conf_t::max_size

Maximum number of events in vector

Event aggregation forms an event vector event after '.max_size' events have been collected or '.max_tmo_ns' has passed.

'.max_size' also determines which subpool of the vector pool ('.pool') is used: EM selects the first subpool whose em_pool_cfg_t::subpool[x].size >= '.max_size' at queue creation time, and all vector events for this aggregator are allocated from that subpool (see em_pool_cfg_t::subpool[].size for details).

Must be non-zero; the default value of 0 set by em_queue_aggr_conf_init() is rejected at queue creation time.

Definition at line 603 of file event_machine_queue.h.

◆ max_tmo_ns

uint64_t em_queue_aggr_conf_t::max_tmo_ns

Maximum time to wait for events to fill a vector

Maximum time in nanoseconds for event aggregation to form an event vector. A value of zero (0) means there is no timeout and events may await aggregation indefinitely. Set to 0 by em_queue_aggr_conf_init().

Definition at line 586 of file event_machine_queue.h.

◆ pool

em_pool_t em_queue_aggr_conf_t::pool

Event vector pool

Pool from which to allocate event vectors when aggregating events. The pool must have been created with the EM_EVENT_TYPE_VECTOR type.

EM pins the aggregator to the first subpool whose 'size' >= em_queue_aggr_conf_t::max_size at queue creation time. All vector events for the aggregator come from that one subpool. Different aggregators can target different subpools by using different 'max_size' values.

Set to EM_POOL_UNDEF by em_queue_aggr_conf_init().

Definition at line 575 of file event_machine_queue.h.


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