![]() |
EM-ODP 4.4.0
Event Machine on ODP
|


Go to the source code of this file.
Macros | |
| #define | EM_LOCM_INIT_VALUES {.core_id = -2, .local_queues.empty = 1 /* rest '0' */} |
Functions | |
| bool | is_core_initialized (void) |
| void | core_log_fn_set (em_log_func_t func) |
| void | core_vlog_fn_set (em_vlog_func_t func) |
| em_status_t | init_cli_thread (void) |
| em_status_t | sync_api_init_local (void) |
| em_status_t | init_local (const em_conf_local_t *conf_local, em_escope_t escope) |
| em_status_t | init_extthr (const em_conf_local_t *conf_local, em_escope_t escope) |
| void | flush_scheduler_events (void) |
| em_status_t | term_core (em_escope_t escope) |
| em_status_t | term_extthr (em_escope_t escope) |
| void | cfgfile_opts_print (void) |
| void | conf_opts_print (void) |
| void | conf_local_opts_print (void) |
Variables | |
| const em_locm_t | locm_init_values |
EM internal initialization
Definition in file em_init.h.
| #define EM_LOCM_INIT_VALUES {.core_id = -2, .local_queues.empty = 1 /* rest '0' */} |
Init values for the em_locm_t struct.
Set only non-zero init values, other members initialized to '0' as per C standard when used to initialize a global struct.
.core_id: 0 to EM_MAX_CORES-1 for EM_CORE_TYPE_WORKER or EM_CORE_TYPE_CONTROL -1 for EM_CORE_TYPE_EXTERNAL Undefined for threads/processes not initialized as EM-cores Set here to -2 to distinguish from EM_CORE_TYPE_EXTERNAL when not yet initialized via em_init_local()/em_init_core().
| void core_log_fn_set | ( | em_log_func_t | func | ) |
| void core_vlog_fn_set | ( | em_vlog_func_t | func | ) |
| em_status_t init_cli_thread | ( | void | ) |
Initialize an external thread for the EM CLI.
This function makes sure that EM shared memory has been setup properly before an EM external thread is created.
Must be called once by non EM core which wants to access EM shared memory or use EM APIs.
| em_status_t init_extthr | ( | const em_conf_local_t * | conf_local, |
| em_escope_t | escope | ||
| ) |
| em_status_t init_local | ( | const em_conf_local_t * | conf_local, |
| em_escope_t | escope | ||
| ) |
| bool is_core_initialized | ( | void | ) |
Check whether the current thread/process has already completed EM core-local initialization.
Works uniformly for both thread-per-core and process-per-core modes:
This is a pure check with no side effects. init_thr_mem() sets init_pid and em_init_local()/em_init_core() set is_core_local_inited.
| em_status_t sync_api_init_local | ( | void | ) |
| em_status_t term_core | ( | em_escope_t | escope | ) |
| em_status_t term_extthr | ( | em_escope_t | escope | ) |