EM-ODP  3.7.0
Event Machine on ODP
event_machine_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_HANDLE_T(type_t)
 
#define EM_STATIC_CAST(type, value)   ((type)(value))
 
#define EM_REINTERPRET_CAST(type, value)   ((type)(value))
 
#define EM_HDL_UNDEF   NULL
 
#define PRI_HDL   "p"
 
#define EM_CONFIG_POOLS   16
 
#define EM_QUEUE_NAME_LEN   32
 
#define EM_MAX_OUTPUT_QUEUES   64
 
#define EM_MAX_ATOMIC_GROUPS   128
 
#define EM_ATOMIC_GROUP_NAME_LEN   32
 
#define EM_MAX_EOS   512
 
#define EM_EO_NAME_LEN   32
 
#define EM_MAX_EVENT_GROUPS   1024
 
#define EM_EVENT_GROUP_MAX_NOTIF   6
 
#define EM_DISPATCH_CALLBACKS_ENABLE   1
 
#define EM_API_HOOKS_ENABLE   1
 
#define EM_IDLE_HOOKS_ENABLE   0
 
#define EM_SCHED_WAIT_ENABLE   0
 
#define EM_CALLBACKS_MAX   8
 
#define EM_CHECK_LEVEL   1
 
#define EM_ESV_ENABLE   0
 
#define EM_DEBUG_PRINT   0
 
#define EM_EVENT_GROUP_SAFE_MODE   1
 
#define EM_DEBUG_TIMESTAMP_ENABLE   0
 

Detailed Description

Event Machine configuration options

Definition in file event_machine_config.h.

Macro Definition Documentation

◆ EM_API_HOOKS_ENABLE

#define EM_API_HOOKS_ENABLE   1

Enable the usage of EM API hooks

User provided API hook functions can be provided via em_init(). EM will call the given hooks each time the corresponding API function is called.

Definition at line 182 of file event_machine_config.h.

◆ EM_ATOMIC_GROUP_NAME_LEN

#define EM_ATOMIC_GROUP_NAME_LEN   32

Max atomic group name length

Examples
queue_types_ag.c, and queue_types_local.c.

Definition at line 143 of file event_machine_config.h.

◆ EM_CALLBACKS_MAX

#define EM_CALLBACKS_MAX   8

Maximum number of EM callbacks/hooks that can be registered.

The user may register up to the number 'EM_CALLBACKS_MAX' of each callback/hook. API-hooks, such as the alloc-, free- and send-hook, or dispatcher callbacks, such as the enter- and exit-callbacks as well as idle-hooks can be registered each up to this limit.

Definition at line 234 of file event_machine_config.h.

◆ EM_CHECK_LEVEL

#define EM_CHECK_LEVEL   1

Error check level

Conditionally compiled error checking level, range 0...3 Level 0 does not do any runtime argument checking (be careful!) Level 1 adds minimum checks Level 2 adds most checks except the slowest ones Level 3 adds all checks and gives lowest performance

Note
em-odp: the 'EM_CHECK_LEVEL' value can be overridden by a command-line option to the 'configure' script, e.g.: $build> ../configure ... –enable-check-level=3 The overridden value will be made available to the application via a pkgconfig set define.

Definition at line 253 of file event_machine_config.h.

◆ EM_CONFIG_POOLS

#define EM_CONFIG_POOLS   16

Maximum number of EM pools

Definition at line 119 of file event_machine_config.h.

◆ EM_DEBUG_PRINT

#define EM_DEBUG_PRINT   0

Event Machine Debug Printouts

'0': disabled '1': enabled

Note
em-odp: the 'EM_DEBUG_PRINT' value can be overridden by a command-line option to the 'configure' script, e.g.: $build> ../configure ... –enable-debug-print The overridden value will be made available to the application via a pkgconfig set define.

Definition at line 292 of file event_machine_config.h.

◆ EM_DEBUG_TIMESTAMP_ENABLE

#define EM_DEBUG_TIMESTAMP_ENABLE   0

Enable Debug Timestamps for timing analysis. This may reduce performance but allows to trace dispatcher timings. Timestamps are per dispatcher (thread local).

'0': disabled (default) '1': enabled, lower overhead but potentially inaccurate (no HW barriers) '2': enabled, strict version with full HW barriers

Note
em-odp: the 'EM_DEBUG_TIMESTAMP_ENABLE' value can be overridden by a command-line option to the 'configure' script, e.g.: $build> ../configure ... –enable-debug-timestamps=N The overridden value will be made available to the application via a pkgconfig set define. Use value 1 for lower overhead timestamps and value 2 for strict timestamp with HW barriers.
See also
event_machine_helper.h

Definition at line 325 of file event_machine_config.h.

◆ EM_EO_NAME_LEN

#define EM_EO_NAME_LEN   32

Maximum EO name string length

Examples
atomic_processing_end.c, and queue_types_ag.c.

Definition at line 155 of file event_machine_config.h.

◆ EM_ESV_ENABLE

#define EM_ESV_ENABLE   0

Event State Verification (ESV)

'0': disabled '1': enabled - event state is verified when the event is passed from EM to the user (e.g. dispatch) and from the user to EM (e.g. send) to catch illegal usage patterns like double-send, double-free, usage-after-send etc.

Also see the config/em-odp.conf file for ESV runtime options!

Note
em-odp: the 'EM_ESV_ENABLE' value can be overridden by a command-line option to the 'configure' script, e.g.: $build> ../configure ... –enable-esv The overridden value will be made available to the application via a pkgconfig set define.

Definition at line 275 of file event_machine_config.h.

◆ EM_EVENT_GROUP_MAX_NOTIF

#define EM_EVENT_GROUP_MAX_NOTIF   6

Maximum number of notifications

Definition at line 167 of file event_machine_config.h.

◆ EM_EVENT_GROUP_SAFE_MODE

#define EM_EVENT_GROUP_SAFE_MODE   1

Guards event groups in undefined and error situations

Excess and aborted group events don't belong to a valid group when received. Most event group APIs check if the core local event group has expired during receive function. Impacts performance when event groups are used.

Definition at line 303 of file event_machine_config.h.

◆ EM_HANDLE_T

#define EM_HANDLE_T (   type_t)
Value:
typedef struct _##type_t { \
void *unused; \
} *(type_t)

Define 'type_t' as a struct ptr to improve type safety

Definition at line 74 of file event_machine_config.h.

◆ EM_HDL_UNDEF

#define EM_HDL_UNDEF   NULL

Undefined EM-handle

Definition at line 104 of file event_machine_config.h.

◆ EM_IDLE_HOOKS_ENABLE

#define EM_IDLE_HOOKS_ENABLE   0

Enable the usage of EM idle hooks

User provided idle hook functions can be provided via em_conf_t::idle_hooks when calling em_init() or via their register functions. EM will call the given hooks in the dispatcher depending on whether there are events to be processed by the core.

Note
em-odp: the 'EM_IDLE_HOOKS_ENABLE' value can be overridden by a command-line option to the 'configure' script, e.g.: $build> ../configure ... –enable-idle-hooks The overridden value will be made available to the application via a pkgconfig set define.

Definition at line 200 of file event_machine_config.h.

◆ EM_MAX_ATOMIC_GROUPS

#define EM_MAX_ATOMIC_GROUPS   128

Maximum number of EM atomic groups

Definition at line 137 of file event_machine_config.h.

◆ EM_MAX_EOS

#define EM_MAX_EOS   512

Maximum total number of EOs

Definition at line 149 of file event_machine_config.h.

◆ EM_MAX_EVENT_GROUPS

#define EM_MAX_EVENT_GROUPS   1024

Maximum number of event groups

Definition at line 161 of file event_machine_config.h.

◆ EM_MAX_OUTPUT_QUEUES

#define EM_MAX_OUTPUT_QUEUES   64

Maximum number of output queues

Examples
queues_output.c.

Definition at line 131 of file event_machine_config.h.

◆ EM_QUEUE_NAME_LEN

#define EM_QUEUE_NAME_LEN   32

Maximum queue name string length

Examples
atomic_processing_end.c, queue_types_ag.c, and queues_output.c.

Definition at line 125 of file event_machine_config.h.

◆ EM_REINTERPRET_CAST

#define EM_REINTERPRET_CAST (   type,
  value 
)    ((type)(value))

Support C++ reinterpret casts in EM API files

Definition at line 94 of file event_machine_config.h.

◆ EM_SCHED_WAIT_ENABLE

#define EM_SCHED_WAIT_ENABLE   0

Enable the EM dispatcher/scheduler to start waiting for events if none are immediately available. Waiting for events, rather than busy-waiting, might save power. The EM dispatch loop will call odp_schedule_multi(..., sched_wait_ns, ...) when EM_SCHED_WAIT_ENABLE=1. The EM dispatch loop will call odp_schedule_multi_no_wait() when EM_SCHED_WAIT_ENABLE=0. The 'sched_wait_ns' value can be set via the EM config file (config/em-odp.conf) variable 'dispatch.sched_wait_ns = value'

Note
em-odp: the 'EM_SCHED_WAIT_ENABLE' value can be overridden by a command-line option to the 'configure' script, e.g.: $build> ../configure ... –enable-sched-wait The overridden value will be made available to the application via a pkgconfig set define.

Definition at line 222 of file event_machine_config.h.

◆ EM_STATIC_CAST

#define EM_STATIC_CAST (   type,
  value 
)    ((type)(value))

Support C++ static casts in EM API files

Definition at line 84 of file event_machine_config.h.

◆ PRI_HDL

#define PRI_HDL   "p"

EM-handle printf format

Definition at line 113 of file event_machine_config.h.