Message ID | 1422586576-30078-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | New |
Headers | show |
diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 8c6b0b0..24723aa 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -37,6 +37,7 @@ int odp_shm_init_local(void); int odp_buffer_pool_init_global(void); int odp_buffer_pool_term_global(void); +int odp_buffer_pool_term_local(void); int odp_pktio_init_global(void); int odp_pktio_term_global(void); diff --git a/platform/linux-generic/odp_buffer_pool.c b/platform/linux-generic/odp_buffer_pool.c index 2634bff..dc0ec1b 100644 --- a/platform/linux-generic/odp_buffer_pool.c +++ b/platform/linux-generic/odp_buffer_pool.c @@ -124,6 +124,12 @@ int odp_buffer_pool_term_global(void) return ret; } +int odp_buffer_pool_term_local(void) +{ + _odp_flush_caches(); + return 0; +} + /** * Pool creation */ diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index 3724fac..205dcae 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -147,5 +147,10 @@ int odp_term_local(void) return -1; } + if (odp_buffer_pool_term_local()) { + ODP_ERR("ODP buffer pool local term failed.\n"); + return -1; + } + return (odp_thread_term_local() > 0) ? 1 : 0; }