1/* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2010-2014 Intel Corporation 3 */ 4 5#ifndef _RTE_EAL_MEMCONFIG_H_ 6#define _RTE_EAL_MEMCONFIG_H_ 7 8#include <stdbool.h> 9 10#include <rte_compat.h> 11 12/** 13 * @file 14 * 15 * This API allows access to EAL shared memory configuration through an API. 16 */ 17 18#ifdef __cplusplus 19extern "C" { 20#endif 21 22/** 23 * Lock the internal EAL shared memory configuration for shared access. 24 */ 25void 26rte_mcfg_mem_read_lock(void); 27 28/** 29 * Unlock the internal EAL shared memory configuration for shared access. 30 */ 31void 32rte_mcfg_mem_read_unlock(void); 33 34/** 35 * Lock the internal EAL shared memory configuration for exclusive access. 36 */ 37void 38rte_mcfg_mem_write_lock(void); 39 40/** 41 * Unlock the internal EAL shared memory configuration for exclusive access. 42 */ 43void 44rte_mcfg_mem_write_unlock(void); 45 46/** 47 * Lock the internal EAL TAILQ list for shared access. 48 */ 49void 50rte_mcfg_tailq_read_lock(void); 51 52/** 53 * Unlock the internal EAL TAILQ list for shared access. 54 */ 55void 56rte_mcfg_tailq_read_unlock(void); 57 58/** 59 * Lock the internal EAL TAILQ list for exclusive access. 60 */ 61void 62rte_mcfg_tailq_write_lock(void); 63 64/** 65 * Unlock the internal EAL TAILQ list for exclusive access. 66 */ 67void 68rte_mcfg_tailq_write_unlock(void); 69 70/** 71 * Lock the internal EAL Mempool list for shared access. 72 */ 73void 74rte_mcfg_mempool_read_lock(void); 75 76/** 77 * Unlock the internal EAL Mempool list for shared access. 78 */ 79void 80rte_mcfg_mempool_read_unlock(void); 81 82/** 83 * Lock the internal EAL Mempool list for exclusive access. 84 */ 85void 86rte_mcfg_mempool_write_lock(void); 87 88/** 89 * Unlock the internal EAL Mempool list for exclusive access. 90 */ 91void 92rte_mcfg_mempool_write_unlock(void); 93 94/** 95 * @warning 96 * @b EXPERIMENTAL: this API may change without prior notice 97 * 98 * Lock the internal EAL Timer Library lock for exclusive access. 99 */ 100__rte_experimental 101void 102rte_mcfg_timer_lock(void); 103 104/** 105 * @warning 106 * @b EXPERIMENTAL: this API may change without prior notice 107 * 108 * Unlock the internal EAL Timer Library lock for exclusive access. 109 */ 110__rte_experimental 111void 112rte_mcfg_timer_unlock(void); 113 114/** 115 * @warning 116 * @b EXPERIMENTAL: this API may change without prior notice 117 * 118 * If true, pages are put in single files (per memseg list), 119 * as opposed to creating a file per page. 120 */ 121__rte_experimental 122bool 123rte_mcfg_get_single_file_segments(void); 124 125#ifdef __cplusplus 126} 127#endif 128 129#endif /*__RTE_EAL_MEMCONFIG_H_*/ 130