EM-ODP 4.4.0
Event Machine on ODP
Loading...
Searching...
No Matches
em_core.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015-2024, Nokia Solutions and Networks
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * * Neither the name of the copyright holder nor the names of its
15 * contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef EM_CORE_H_
32#define EM_CORE_H_
33
34/**
35 * @file
36 * EM internal core-related functions
37 */
38
39#include <stdio.h>
40
41#include <odp_api.h>
42
43#include <event_machine.h>
44
45#include "em_core_types.h"
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52em_status_t core_map_init(core_map_t *const core_map);
53em_status_t core_map_init_local(core_map_t *const core_map, const em_conf_local_t *conf_local);
55
57
58int core_map_term_local(core_map_t *const core_map, em_escope_t escope);
59int core_map_term_extthr(core_map_t *const core_map, em_escope_t escope);
60
61void mask_em2odp__rwlocked(const em_core_mask_t *const core_mask,
62 odp_thrmask_t *const odp_thrmask /*out*/);
63void mask_em2odp(const em_core_mask_t *const em_core_mask,
64 odp_thrmask_t *const odp_thrmask /*out*/);
65int read_proc_cpuid(FILE *proc_tid_stat_file);
66
67#ifdef __cplusplus
68}
69#endif
70
71#endif /* EM_CORE_H_ */
void i_event__term_thread_req(const internal_event_t *i_ev)
Definition em_core.c:390
int read_proc_cpuid(FILE *proc_tid_stat_file)
Get the CPU ID from the /proc/[tid]/stat file.
Definition em_core.c:637
em_status_t core_map_init_local(core_map_t *const core_map, const em_conf_local_t *conf_local)
Definition em_core.c:232
em_status_t core_map_init_extthr(core_map_t *const core_map)
Definition em_core.c:345
uint32_t em_escope_t
uint32_t em_status_t