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 19 extern "C" { 20 #endif 21 22 /** 23 * Lock the internal EAL shared memory configuration for shared access. 24 */ 25 void 26 rte_mcfg_mem_read_lock(void); 27 28 /** 29 * Unlock the internal EAL shared memory configuration for shared access. 30 */ 31 void 32 rte_mcfg_mem_read_unlock(void); 33 34 /** 35 * Lock the internal EAL shared memory configuration for exclusive access. 36 */ 37 void 38 rte_mcfg_mem_write_lock(void); 39 40 /** 41 * Unlock the internal EAL shared memory configuration for exclusive access. 42 */ 43 void 44 rte_mcfg_mem_write_unlock(void); 45 46 /** 47 * Lock the internal EAL TAILQ list for shared access. 48 */ 49 void 50 rte_mcfg_tailq_read_lock(void); 51 52 /** 53 * Unlock the internal EAL TAILQ list for shared access. 54 */ 55 void 56 rte_mcfg_tailq_read_unlock(void); 57 58 /** 59 * Lock the internal EAL TAILQ list for exclusive access. 60 */ 61 void 62 rte_mcfg_tailq_write_lock(void); 63 64 /** 65 * Unlock the internal EAL TAILQ list for exclusive access. 66 */ 67 void 68 rte_mcfg_tailq_write_unlock(void); 69 70 /** 71 * Lock the internal EAL Mempool list for shared access. 72 */ 73 void 74 rte_mcfg_mempool_read_lock(void); 75 76 /** 77 * Unlock the internal EAL Mempool list for shared access. 78 */ 79 void 80 rte_mcfg_mempool_read_unlock(void); 81 82 /** 83 * Lock the internal EAL Mempool list for exclusive access. 84 */ 85 void 86 rte_mcfg_mempool_write_lock(void); 87 88 /** 89 * Unlock the internal EAL Mempool list for exclusive access. 90 */ 91 void 92 rte_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 101 void 102 rte_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 111 void 112 rte_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 122 bool 123 rte_mcfg_get_single_file_segments(void); 124 125 #ifdef __cplusplus 126 } 127 #endif 128 129 #endif /*__RTE_EAL_MEMCONFIG_H_*/ 130