2017-12-19 15:49:03 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
* Copyright(c) 2010-2014 Intel Corporation
|
2012-12-19 23:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _RTE_EAL_MEMCONFIG_H_
|
|
|
|
#define _RTE_EAL_MEMCONFIG_H_
|
|
|
|
|
2019-11-04 11:03:00 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2019-07-05 17:22:44 +00:00
|
|
|
#include <rte_compat.h>
|
|
|
|
|
2019-07-05 13:10:30 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* This API allows access to EAL shared memory configuration through an API.
|
|
|
|
*/
|
2012-12-19 23:00:00 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2019-07-05 13:10:27 +00:00
|
|
|
/**
|
|
|
|
* Lock the internal EAL shared memory configuration for shared access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_mem_read_lock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unlock the internal EAL shared memory configuration for shared access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_mem_read_unlock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Lock the internal EAL shared memory configuration for exclusive access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_mem_write_lock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unlock the internal EAL shared memory configuration for exclusive access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_mem_write_unlock(void);
|
|
|
|
|
2019-07-05 13:10:28 +00:00
|
|
|
/**
|
|
|
|
* Lock the internal EAL TAILQ list for shared access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_tailq_read_lock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unlock the internal EAL TAILQ list for shared access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_tailq_read_unlock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Lock the internal EAL TAILQ list for exclusive access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_tailq_write_lock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unlock the internal EAL TAILQ list for exclusive access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_tailq_write_unlock(void);
|
|
|
|
|
2019-07-05 13:10:29 +00:00
|
|
|
/**
|
|
|
|
* Lock the internal EAL Mempool list for shared access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_mempool_read_lock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unlock the internal EAL Mempool list for shared access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_mempool_read_unlock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Lock the internal EAL Mempool list for exclusive access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_mempool_write_lock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unlock the internal EAL Mempool list for exclusive access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_mempool_write_unlock(void);
|
|
|
|
|
2019-07-05 17:22:44 +00:00
|
|
|
/**
|
|
|
|
* Lock the internal EAL Timer Library lock for exclusive access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_timer_lock(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unlock the internal EAL Timer Library lock for exclusive access.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
rte_mcfg_timer_unlock(void);
|
|
|
|
|
2019-11-04 11:03:00 +00:00
|
|
|
/**
|
|
|
|
* If true, pages are put in single files (per memseg list),
|
|
|
|
* as opposed to creating a file per page.
|
|
|
|
*/
|
|
|
|
bool
|
|
|
|
rte_mcfg_get_single_file_segments(void);
|
|
|
|
|
2012-12-19 23:00:00 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /*__RTE_EAL_MEMCONFIG_H_*/
|