EM-ODP 4.4.0
Event Machine on ODP
Loading...
Searching...
No Matches
event_machine_helper.h File Reference
Include dependency graph for event_machine_helper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define em_core_id_get_physical   em_core_id_physical
 
#define em_core_mask_get_physical   em_core_mask_physical
 

Functions

int em_error_format_string (char *str, size_t size, em_eo_t eo, em_status_t error, em_escope_t escope, va_list args)
 
void em_version_print (void)
 Print EM related version information.
 
void em_info_print (void)
 Print miscellaneous EM information.
 
int em_core_id_physical (int core)
 
void em_core_mask_physical (em_core_mask_t *phys, const em_core_mask_t *logic)
 

Detailed Description

Event Machine helper functions and macros

Definition in file event_machine_helper.h.

Macro Definition Documentation

◆ em_core_id_get_physical

#define em_core_id_get_physical   em_core_id_physical

Definition at line 109 of file event_machine_helper.h.

◆ em_core_mask_get_physical

#define em_core_mask_get_physical   em_core_mask_physical

Definition at line 124 of file event_machine_helper.h.

Function Documentation

◆ em_core_id_physical()

int em_core_id_physical ( int  core)

Converts a logical core id to a physical core id

Note
This may be a very slow operation and MUST NOT be used in the fast path!
Parameters
coreLogical (Event Machine) core id
Returns
Physical core id or -1 on error.

Definition at line 100 of file event_machine_helper.c.

◆ em_core_mask_physical()

void em_core_mask_physical ( em_core_mask_t phys,
const em_core_mask_t logic 
)

Converts a logical core mask to a physical core mask

Note
This may be a very slow operation and MUST NOT be used in the fast path!
Parameters
[out]physCore mask of physical core ids
logicCore mask of logical (Event Machine) core ids

Definition at line 135 of file event_machine_helper.c.

◆ em_error_format_string()

int em_error_format_string ( char *  str,
size_t  size,
em_eo_t  eo,
em_status_t  error,
em_escope_t  escope,
va_list  args 
)

Format error string

Creates an error report string from EM internal errors. Main use case: application error handlers to create an error report from EM internal errors.

Parameters
[out]strOutput string pointer
sizeMaximum string length in characters
eoEO handle
errorError code (EM internal)
escopeError scope (EM internal)
argsVariable arguments as passed to the error handler
Returns
Output string length (including final '\0'), or 0 on invalid input
Examples
bench_pool.c, and error.c.

◆ em_info_print()

void em_info_print ( void  )

Print miscellaneous EM information.

Print information about the running EM instance. Mainly for debug or startup logging needs.

The printed content may vary from one EM release to the next.

Examples
bench_event.c.

Definition at line 95 of file event_machine_helper.c.

◆ em_version_print()

void em_version_print ( void  )

Print EM related version information.

Prints the EM version information, as well as version information for the used ODP and HW etc. (similar to what EM prints at startup).

For EM API version strings, defines and macros see include/event_machine/api/event_machine_version.h

The printed content may vary from one EM release to the next.

Definition at line 90 of file event_machine_helper.c.