diff options
author | Matias Elo <matias.elo@nokia.com> | 2018-11-30 14:05:11 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2018-12-13 12:30:17 +0300 |
commit | 4e90a2f1744301ecca05ad862ab54c118a40c1ce (patch) | |
tree | 49329566c8207be0e5146160606a9ef8fe5933c8 /platform/linux-dpdk/odp_shared_memory.c | |
parent | e094fc96f67937b1c89150af5a0110c26aa60aaf (diff) |
Port 9a4f8305e "linux-gen: split global data into RO and RW structs"
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-dpdk/odp_shared_memory.c')
-rw-r--r-- | platform/linux-dpdk/odp_shared_memory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/linux-dpdk/odp_shared_memory.c b/platform/linux-dpdk/odp_shared_memory.c index 1134aa23b..64552858d 100644 --- a/platform/linux-dpdk/odp_shared_memory.c +++ b/platform/linux-dpdk/odp_shared_memory.c @@ -99,7 +99,7 @@ static void name_to_mz_name(const char *name, char *mz_name) /* Use pid and counter to make name unique */ do { snprintf(mz_name, RTE_MEMZONE_NAMESIZE, SHM_BLOCK_NAME, - (odp_instance_t)odp_global_data.main_pid, i++, name); + (odp_instance_t)odp_global_ro.main_pid, i++, name); mz_name[RTE_MEMZONE_NAMESIZE - 1] = 0; } while (mz_name_used(mz_name)); } @@ -158,7 +158,7 @@ int _odp_shm_init_global(const odp_init_t *init ODP_UNUSED) { void *addr; - if ((getpid() != odp_global_data.main_pid) || + if ((getpid() != odp_global_ro.main_pid) || (syscall(SYS_gettid) != getpid())) { ODP_ERR("shm_init_global() must be performed by the main " "ODP process!\n."); @@ -191,7 +191,7 @@ int _odp_shm_term_global(void) shm_block_t *block; int idx; - if ((getpid() != odp_global_data.main_pid) || + if ((getpid() != odp_global_ro.main_pid) || (syscall(SYS_gettid) != getpid())) { ODP_ERR("shm_term_global() must be performed by the main " "ODP process!\n."); |