EM-ODP 4.4.0
Event Machine on ODP
Loading...
Searching...
No Matches
em_core.h File Reference
#include <stdio.h>
#include <odp_api.h>
#include <event_machine.h>
#include "em_core_types.h"
#include "em_internal_event_types.h"
Include dependency graph for em_core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

em_status_t core_map_init (core_map_t *const core_map)
 
em_status_t core_map_init_local (core_map_t *const core_map, const em_conf_local_t *conf_local)
 
em_status_t core_map_init_extthr (core_map_t *const core_map)
 
void i_event__term_thread_req (const internal_event_t *i_ev)
 
int core_map_term_local (core_map_t *const core_map, em_escope_t escope)
 
int core_map_term_extthr (core_map_t *const core_map, em_escope_t escope)
 
void mask_em2odp__rwlocked (const em_core_mask_t *const core_mask, odp_thrmask_t *const odp_thrmask)
 
void mask_em2odp (const em_core_mask_t *const em_core_mask, odp_thrmask_t *const odp_thrmask)
 
int read_proc_cpuid (FILE *proc_tid_stat_file)
 Get the CPU ID from the /proc/[tid]/stat file.
 

Detailed Description

EM internal core-related functions

Definition in file em_core.h.

Function Documentation

◆ core_map_init()

em_status_t core_map_init ( core_map_t *const  core_map)

Definition at line 62 of file em_core.c.

◆ core_map_init_extthr()

em_status_t core_map_init_extthr ( core_map_t *const  core_map)

Local init of an EM external thread/process, EM_CORE_TYPE_EXT

Definition at line 345 of file em_core.c.

◆ core_map_init_local()

em_status_t core_map_init_local ( core_map_t *const  core_map,
const em_conf_local_t conf_local 
)

Local init of EM-cores of type EM_CORE_TYPE_WORKER or EM_CORE_TYPE_CONTROL

Definition at line 232 of file em_core.c.

◆ core_map_term_extthr()

int core_map_term_extthr ( core_map_t *const  core_map,
em_escope_t  escope 
)

Definition at line 528 of file em_core.c.

◆ core_map_term_local()

int core_map_term_local ( core_map_t *const  core_map,
em_escope_t  escope 
)

Definition at line 459 of file em_core.c.

◆ i_event__term_thread_req()

void i_event__term_thread_req ( const internal_event_t i_ev)

EM internal event handler (see em_internal_event.c&h) Handle the internal event notifying the EM-cores about a thread termination (internal event id: TERM_THREAD_REQ).

Definition at line 390 of file em_core.c.

◆ mask_em2odp()

void mask_em2odp ( const em_core_mask_t *const  em_core_mask,
odp_thrmask_t *const  odp_thrmask 
)

Definition at line 606 of file em_core.c.

◆ mask_em2odp__rwlocked()

void mask_em2odp__rwlocked ( const em_core_mask_t *const  core_mask,
odp_thrmask_t *const  odp_thrmask 
)

Definition at line 586 of file em_core.c.

◆ read_proc_cpuid()

int read_proc_cpuid ( FILE *  proc_tid_stat_file)

Get the CPU ID from the /proc/[tid]/stat file.

This function reads the CPU ID from the specified file, which is expected to be in the format of /proc/[tid]/stat. The CPU ID is the 39th field in the file and indicates the CPU number the thread was last executed on.

Parameters
proc_tid_stat_fileA file pointer to the /proc/[tid]/stat file.
Returns
The CPU ID the thread was last executed on, or -1 if an error occurs.

Definition at line 637 of file em_core.c.