diff options
author | Matias Elo <matias.elo@nokia.com> | 2021-09-20 13:05:28 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2021-09-22 16:01:54 +0300 |
commit | c6339d406ebb4fb525b47e1456c49e1773c65bad (patch) | |
tree | c066ca472c55e6159c3530c7b57d7e598733793c /platform/linux-generic/odp_shared_memory.c | |
parent | f36c9ec6070071104cdc3d5b87568b28e9551040 (diff) |
linux-gen: shm: allocate enough resources for internal allocations
Reserve enough SHM blocks for implementation internal usage and return
correct value in odp_shm_capability(). Removed ODP_ prefix from
CONFIG_SHM_BLOCKS config header option.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'platform/linux-generic/odp_shared_memory.c')
-rw-r--r-- | platform/linux-generic/odp_shared_memory.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/platform/linux-generic/odp_shared_memory.c b/platform/linux-generic/odp_shared_memory.c index ee47b7e96..966850a07 100644 --- a/platform/linux-generic/odp_shared_memory.c +++ b/platform/linux-generic/odp_shared_memory.c @@ -15,9 +15,6 @@ #include <odp_global_data.h> #include <string.h> -ODP_STATIC_ASSERT(ODP_CONFIG_SHM_BLOCKS >= ODP_CONFIG_POOLS, - "ODP_CONFIG_SHM_BLOCKS < ODP_CONFIG_POOLS"); - static inline uint32_t from_handle(odp_shm_t shm) { return _odp_typeval(shm) - 1; @@ -47,7 +44,7 @@ int odp_shm_capability(odp_shm_capability_t *capa) { memset(capa, 0, sizeof(odp_shm_capability_t)); - capa->max_blocks = ODP_CONFIG_SHM_BLOCKS; + capa->max_blocks = CONFIG_SHM_BLOCKS; capa->max_size = odp_global_ro.shm_max_size; capa->max_align = 0; |