diff options
author | Petri Savolainen <petri.savolainen@linaro.org> | 2014-09-05 14:29:10 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2014-09-16 01:59:24 +0400 |
commit | 0c2eba19fe43bec0ab19c8d0abf43eca892e0220 (patch) | |
tree | 2e0a92e8a7891182bfdcc3cc2844bdf7e198e549 /platform/linux-generic/include/api/odp_shared_memory.h | |
parent | 1c72b0f2420cb73c0aa170181ff0e3074fc69877 (diff) |
Shared memory reserve flag
Add flags parameter to reserve call.
* SW_ONLY: optimize memory usage when HW accelerators are not
involved.
* PROC: for communication with external (non-ODP) processes in the
system
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic/include/api/odp_shared_memory.h')
-rw-r--r-- | platform/linux-generic/include/api/odp_shared_memory.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/platform/linux-generic/include/api/odp_shared_memory.h b/platform/linux-generic/include/api/odp_shared_memory.h index 8ac88474d..7d9fedd1b 100644 --- a/platform/linux-generic/include/api/odp_shared_memory.h +++ b/platform/linux-generic/include/api/odp_shared_memory.h @@ -21,9 +21,18 @@ extern "C" { #include <odp_std_types.h> -/** Maximum shared memory block name lenght in chars */ +/** Maximum shared memory block name length in chars */ #define ODP_SHM_NAME_LEN 32 +/* + * Shared memory flags + */ + +/* Share level */ +#define ODP_SHM_SW_ONLY 0x1 /**< Application SW only, no HW access */ +#define ODP_SHM_PROC 0x2 /**< Share with external processes */ + + /** * Reserve a block of shared memory @@ -31,10 +40,12 @@ extern "C" { * @param name Name of the block (maximum ODP_SHM_NAME_LEN - 1 chars) * @param size Block size in bytes * @param align Block alignment in bytes + * @param flags Shared mem parameter flags (ODP_SHM_*). Default value is 0. * * @return Pointer to the reserved block, or NULL */ -void *odp_shm_reserve(const char *name, uint64_t size, uint64_t align); +void *odp_shm_reserve(const char *name, uint64_t size, uint64_t align, + uint32_t flags); /** * Lookup for a block of shared memory |