EM-ODP  3.7.0
Event Machine on ODP
event_machine_hw_config.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EM_MAX_CORES   64
 
#define EM_UNDEF_U64   0
 
#define EM_UNDEF_U32   0
 
#define EM_UNDEF_U16   0
 
#define EM_UNDEF_U8   0
 
#define EM_UNDEF_UINTPTR   EM_STATIC_CAST(uintptr_t, NULL)
 
#define EM_UNDEF_PTR   NULL
 
#define EM_QUEUE_PRIO_NUM   8
 
#define EM_QUEUE_RANGE_OFFSET   1
 
#define _EM_QUEUE_STATIC_MIN   (0 + EM_QUEUE_RANGE_OFFSET)
 
#define _EM_QUEUE_STATIC_MAX   (0xFE + EM_QUEUE_RANGE_OFFSET)
 
#define EM_QUEUE_STATIC_MIN   EM_STATIC_CAST(uint16_t, _EM_QUEUE_STATIC_MIN)
 
#define EM_QUEUE_STATIC_MAX   EM_STATIC_CAST(uint16_t, _EM_QUEUE_STATIC_MAX)
 
#define EM_QUEUE_STATIC_NUM   (_EM_QUEUE_STATIC_MAX - _EM_QUEUE_STATIC_MIN + 1)
 
#define EM_MAX_QUEUE_GROUPS   (EM_MAX_CORES + 64)
 
#define EM_QUEUE_GROUP_DEFAULT   EM_REINTERPRET_CAST(em_queue_group_t, EM_MAX_QUEUE_GROUPS)
 
#define EM_QUEUE_GROUP_NAME_LEN   32
 
#define EM_QUEUE_GROUP_DEFAULT_NAME   "default"
 
#define EM_QUEUE_GROUP_CORE_BASE_NAME   "core"
 
#define EM_POOL_DEFAULT   EM_REINTERPRET_CAST(em_pool_t, 1)
 
#define EM_POOL_NAME_LEN   32
 
#define EM_POOL_DEFAULT_NAME   "default"
 
#define EM_POOL_SUBPOOL_STAT_INTERNAL   129
 
#define EM_EVENT_USER_AREA_MAX_SIZE   256
 
#define EM_SCHED_MULTI_MAX_BURST   32
 
#define EM_SCHED_AG_MULTI_MAX_BURST   32
 
#define EM_QUEUE_LOCAL_MULTI_MAX_BURST   32
 
#define EM_EO_MULTIRCV_MAX_EVENTS   32
 
#define EM_OUTPUT_QUEUE_IMMEDIATE   0
 

Detailed Description

Event Machine HW dependent constants and definitions.

Note
Always use the defined names from this file instead of direct numerical values. The values are platform/implementation specific.

Definition in file event_machine_hw_config.h.

Macro Definition Documentation

◆ EM_EO_MULTIRCV_MAX_EVENTS

#define EM_EO_MULTIRCV_MAX_EVENTS   32

The default maximum number of events passed to the EO's multi-event receive function (when the EO has been created with em_eo_create_multircv()). This value is used by EM as a default if the user does not specify a value (i.e. gives '0') for 'em_eo_multircv_param_t::max_events' when calling em_eo_create_multircv()

Definition at line 249 of file event_machine_hw_config.h.

◆ EM_EVENT_USER_AREA_MAX_SIZE

#define EM_EVENT_USER_AREA_MAX_SIZE   256

The maximum size in bytes that can be configured for the event user area. The user area is located outside of the payload in the event metadata (hdr) and can be used to store event related state without affecting the payload.

Definition at line 216 of file event_machine_hw_config.h.

◆ EM_MAX_QUEUE_GROUPS

#define EM_MAX_QUEUE_GROUPS   (EM_MAX_CORES + 64)

Maximum number of EM queue groups

Examples
queue_groups.c.

Definition at line 142 of file event_machine_hw_config.h.

◆ EM_OUTPUT_QUEUE_IMMEDIATE

#define EM_OUTPUT_QUEUE_IMMEDIATE   0

'0': allow EM to buffer events sent to output queues before calling the user provided output callback to improve throughput '1': each em_send/_multi() will immediately call the user provided output queue callback with no EM internal buffering This define mostly affects behaviour and performance when sending events from an ordered scheduling context where EM needs to ensure event ordering before calling the user provided output callback function.

Definition at line 261 of file event_machine_hw_config.h.

◆ EM_POOL_DEFAULT

◆ EM_POOL_DEFAULT_NAME

#define EM_POOL_DEFAULT_NAME   "default"

The name of the EM default event pool

Definition at line 202 of file event_machine_hw_config.h.

◆ EM_POOL_NAME_LEN

#define EM_POOL_NAME_LEN   32

Max event pool name length

Examples
hello.c.

Definition at line 196 of file event_machine_hw_config.h.

◆ EM_POOL_SUBPOOL_STAT_INTERNAL

#define EM_POOL_SUBPOOL_STAT_INTERNAL   129

Reserve for EM pool subpool statistic internal use

Definition at line 208 of file event_machine_hw_config.h.

◆ EM_QUEUE_GROUP_CORE_BASE_NAME

#define EM_QUEUE_GROUP_CORE_BASE_NAME   "core"

Base-name of EM core-specific queue groups (one per EM-core), if created by EM (note: see the EM runtime config file for option). The full queue group name for a single-core group is: "core" + "%d", which gives "core0", "core1", ... "core99", ... EM earlier relied on these queue groups for internal core specific messaging and also allowed applications to use them. Currently EM does not internally need these groups but will create them based on an EM config file option for applications relying on their existence.

Example: Find the queue group that includes only this core. (EM single-core queue group creation enabled in config file)

char qgrp_name[EM_QUEUE_GROUP_NAME_LEN];
int core = em_core_id();
em_queue_group_t qgrp_core;
snprintf(qgrp_name, sizeof(qgrp_name), "%s%d",
...
qgrp_core = em_queue_group_find(qgrp_name);
...

Definition at line 185 of file event_machine_hw_config.h.

◆ EM_QUEUE_GROUP_DEFAULT

◆ EM_QUEUE_GROUP_DEFAULT_NAME

#define EM_QUEUE_GROUP_DEFAULT_NAME   "default"

The name of the EM default queue group

Definition at line 158 of file event_machine_hw_config.h.

◆ EM_QUEUE_GROUP_NAME_LEN

#define EM_QUEUE_GROUP_NAME_LEN   32

Max queue group name length

Examples
queue_groups.c.

Definition at line 152 of file event_machine_hw_config.h.

◆ EM_QUEUE_LOCAL_MULTI_MAX_BURST

#define EM_QUEUE_LOCAL_MULTI_MAX_BURST   32

The maximum number of events from a local queue (EM_QUEUE_TYPE_LOCAL) to dispatch in one burst.

Definition at line 239 of file event_machine_hw_config.h.

◆ EM_QUEUE_PRIO_NUM

#define EM_QUEUE_PRIO_NUM   8

Number of queue scheduling priorities, normal default is 8.

See also
em_queue_prio_e

Definition at line 103 of file event_machine_hw_config.h.

◆ EM_QUEUE_RANGE_OFFSET

#define EM_QUEUE_RANGE_OFFSET   1

Determines the EM queue handles range to use. Note: value must be >= 1 and <= 'UINT16_MAX - em_queue_get_max_num() + 1' idx EM Queue handle 0 -> 0 + offset 1 -> 1 + offset ... max-1 -> max-1 + offset

Definition at line 115 of file event_machine_hw_config.h.

◆ EM_QUEUE_STATIC_MAX

#define EM_QUEUE_STATIC_MAX   EM_STATIC_CAST(uint16_t, _EM_QUEUE_STATIC_MAX)

Maximum static queue ID

Definition at line 131 of file event_machine_hw_config.h.

◆ EM_QUEUE_STATIC_MIN

#define EM_QUEUE_STATIC_MIN   EM_STATIC_CAST(uint16_t, _EM_QUEUE_STATIC_MIN)

Minimum static queue ID

Definition at line 126 of file event_machine_hw_config.h.

◆ EM_QUEUE_STATIC_NUM

#define EM_QUEUE_STATIC_NUM   (_EM_QUEUE_STATIC_MAX - _EM_QUEUE_STATIC_MIN + 1)

Number of static queues

Definition at line 136 of file event_machine_hw_config.h.

◆ EM_SCHED_AG_MULTI_MAX_BURST

#define EM_SCHED_AG_MULTI_MAX_BURST   32

The maximum number of events from an atomic group to dispatch in one burst.

Definition at line 232 of file event_machine_hw_config.h.

◆ EM_SCHED_MULTI_MAX_BURST

#define EM_SCHED_MULTI_MAX_BURST   32

The maximum number of events to request from the scheduler and then dispatch in one burst.

Note
the odp sched burst size is determined by the odp-config-file values: sched_basic: burst_size_default[...] and burst_size_max[...]

Definition at line 226 of file event_machine_hw_config.h.

◆ EM_UNDEF_PTR

#define EM_UNDEF_PTR   NULL

EM undefined pointer

Definition at line 93 of file event_machine_hw_config.h.

◆ EM_UNDEF_U16

#define EM_UNDEF_U16   0

EM undefined u16

Definition at line 74 of file event_machine_hw_config.h.

◆ EM_UNDEF_U32

#define EM_UNDEF_U32   0

EM undefined u32

Definition at line 68 of file event_machine_hw_config.h.

◆ EM_UNDEF_U64

#define EM_UNDEF_U64   0

EM undefined u64

Definition at line 62 of file event_machine_hw_config.h.

◆ EM_UNDEF_U8

#define EM_UNDEF_U8   0

EM undefined u8

Definition at line 80 of file event_machine_hw_config.h.

◆ EM_UNDEF_UINTPTR

#define EM_UNDEF_UINTPTR   EM_STATIC_CAST(uintptr_t, NULL)

EM undefined uintptr

Definition at line 86 of file event_machine_hw_config.h.

EM_QUEUE_GROUP_NAME_LEN
#define EM_QUEUE_GROUP_NAME_LEN
Definition: event_machine_hw_config.h:152
EM_QUEUE_GROUP_CORE_BASE_NAME
#define EM_QUEUE_GROUP_CORE_BASE_NAME
Definition: event_machine_hw_config.h:185
em_queue_group_find
em_queue_group_t em_queue_group_find(const char *name)
Definition: event_machine_queue_group.c:236
em_core_id
int em_core_id(void)
Definition: event_machine_core.c:34