EM-ODP 4.4.0
Event Machine on ODP
Loading...
Searching...
No Matches
em_dispatcher_inline.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <odp_api.h>
#include <event_machine.h>
#include <event_machine/helper/event_machine_debug.h>
#include "em_atomic_group.h"
#include "em_atomic_group_types.h"
#include "em_dispatcher_types.h"
#include "em_eo.h"
#include "em_eo_types.h"
#include "em_error.h"
#include "em_event.h"
#include "em_event_group.h"
#include "em_event_group_types.h"
#include "em_event_inline.h"
#include "em_event_state.h"
#include "em_event_types.h"
#include "em_hook_types.h"
#include "em_hooks.h"
#include "em_mem.h"
#include "em_queue.h"
#include "em_queue_inline.h"
#include "em_queue_types.h"
Include dependency graph for em_dispatcher_inline.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DISPATCH_MULTI_MAX_BURST    MAX(EM_SCHED_MULTI_MAX_BURST, EM_SCHED_AG_MULTI_MAX_BURST)
 

Functions

 __attribute__ ((always_inline)) static inline void call_eo_rcv_fn__no_cb(const em_receive_func_t eo_receive_func
 
 event_group_set_local (ev_hdr->egrp, ev_hdr->egrp_gen, 1)
 
 eo_receive_func (eo_ctx, event, ev_hdr->event_type, queue, queue_ctx)
 
 if (current_egrp_elem)
 
 event_group_set_local (ev_hdr_tbl[0]->egrp, ev_hdr_tbl[0]->egrp_gen, num_events)
 
 eo_receive_multi_func (eo_ctx, ev_tbl, num_events, queue, queue_ctx)
 

Variables

em_event_t event
 
em_event_t event_hdr_t *const ev_hdr
 
em_event_t event_hdr_t *const const em_queue_t queue
 
em_event_t event_hdr_t *const const em_queue_t void *const queue_ctx
 
em_event_t event_hdr_t *const const em_queue_t void *const void *const eo_ctx
 
locm current rcv_multi_cnt = 1
 
event_group_elem_t *const current_egrp_elem = locm->current.egrp_elem
 
em_event_t ev_tbl []
 
em_event_t event_hdr_tev_hdr_tbl []
 
em_event_t event_hdr_t const int num_events
 

Detailed Description

EM internal dispatcher functions

Definition in file em_dispatcher_inline.h.

Macro Definition Documentation

◆ DISPATCH_MULTI_MAX_BURST

#define DISPATCH_MULTI_MAX_BURST    MAX(EM_SCHED_MULTI_MAX_BURST, EM_SCHED_AG_MULTI_MAX_BURST)

Definition at line 52 of file em_dispatcher_inline.h.

Function Documentation

◆ __attribute__()

__attribute__ ( (always_inline)  ) const

Fast-path equivalent of call_eo_rcv_fn() for when no dispatch callbacks are registered.

The caller must have pre-extracted q_elem->queue, q_elem->context and q_elem->eo_ctx into locals so they can be passed by value to the receive function (and, when called from a burst loop, reused across the loop iterations).

Marked always_inline because GCC's heuristics may decline to inline this helper when called from multiple sites with a function pointer call inside; we rely on inlining for the dispatch fast path to remain fast.

Fast-path equivalent of call_eo_multircv_fn() for when no dispatch callbacks are registered.

The caller must have pre-extracted q_elem->queue, q_elem->context and q_elem->eo_ctx into locals so they can be passed by value to the receive function (and, when called from a burst loop, reused across the burst's batches).

Marked always_inline because GCC's heuristics may decline to inline this helper when called from multiple sites with a function pointer call inside; we rely on inlining for the dispatch fast path to remain fast.

◆ if()

if ( current_egrp_elem  )

Definition at line 255 of file em_dispatcher_inline.h.

Variable Documentation

◆ current_egrp_elem

event_group_elem_t *const current_egrp_elem = locm->current.egrp_elem

Definition at line 253 of file em_dispatcher_inline.h.

◆ eo_ctx

em_event_t event_hdr_t const int const em_queue_t void *const void *const eo_ctx
Initial value:
{
em_locm_t *const locm = &em_locm
ENV_LOCAL em_locm_t em_locm

Definition at line 243 of file em_dispatcher_inline.h.

◆ ev_hdr

em_event_t event_hdr_t* const ev_hdr

Definition at line 241 of file em_dispatcher_inline.h.

◆ ev_hdr_tbl

em_event_t event_hdr_t* ev_hdr_tbl[]

Definition at line 329 of file em_dispatcher_inline.h.

◆ ev_tbl

em_event_t ev_tbl[]

Definition at line 329 of file em_dispatcher_inline.h.

◆ event

em_event_t event

Definition at line 241 of file em_dispatcher_inline.h.

◆ num_events

em_event_t event_hdr_t const int num_events

Definition at line 330 of file em_dispatcher_inline.h.

◆ queue

em_event_t event_hdr_t const int const em_queue_t queue

Definition at line 242 of file em_dispatcher_inline.h.

◆ queue_ctx

em_event_t event_hdr_t const int const em_queue_t void *const queue_ctx

Definition at line 242 of file em_dispatcher_inline.h.

◆ rcv_multi_cnt

locm current rcv_multi_cnt = 1

Definition at line 247 of file em_dispatcher_inline.h.