EM-ODP  3.7.0
Event Machine on ODP
em_idle_hooks_t Struct Reference

#include <event_machine_hooks.h>

Data Fields

em_idle_hook_to_idle_t to_idle_hook
 
em_idle_hook_to_active_t to_active_hook
 
em_idle_hook_while_idle_t while_idle_hook
 

Detailed Description

Idle hooks given by the user via this struct to the em_init() will be called by the EM dispatcher on each core.

The EM dispatcher will call:

  • to_idle_hook when a core doesn't get any more events from scheduled or local queues after the core has been active
  • to_active_hook when a core gets events after being idle
  • while_idle_hook when a core continues being idle

Not all the idle hooks need to be provided, use NULL for unused idle hooks.

Note
Notice that doing heavy processing in the hooks might significantly impact performance.
Only used if EM_IDLE_HOOKS_ENABLE != 0

Definition at line 254 of file event_machine_hooks.h.

Field Documentation

◆ to_active_hook

em_idle_hook_to_active_t em_idle_hooks_t::to_active_hook

Idle hook called when entering the active state Initialize to NULL if unused.

Definition at line 264 of file event_machine_hooks.h.

◆ to_idle_hook

em_idle_hook_to_idle_t em_idle_hooks_t::to_idle_hook

Idle hook called when entering the idle state Initialize to NULL if unused.

Definition at line 259 of file event_machine_hooks.h.

◆ while_idle_hook

em_idle_hook_while_idle_t em_idle_hooks_t::while_idle_hook

Idle hook called while remaining in the idle state Initialize to NULL if unused.

Definition at line 269 of file event_machine_hooks.h.


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