Message ID | 1424116520-20381-11-git-send-email-mike.holmes@linaro.org |
---|---|
State | New |
Headers | show |
This looks good, but will need to be rebased following application of my most recent pool patch since odp_buffer_pool.c is being renamed to odp_pool.c Bill On Mon, Feb 16, 2015 at 1:55 PM, Mike Holmes <mike.holmes@linaro.org> wrote: > From: Yan Sonming <yan.songming@linaro.org> > > Signed-off-by: Yan Sonming <yan.songming@linaro.org> > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > platform/linux-generic/include/odp_internal.h | 1 + > platform/linux-generic/odp_buffer_pool.c | 6 ++++++ > platform/linux-generic/odp_init.c | 5 +++++ > 3 files changed, 12 insertions(+) > > diff --git a/platform/linux-generic/include/odp_internal.h > b/platform/linux-generic/include/odp_internal.h > index 7f45a3e..7d522f9 100644 > --- a/platform/linux-generic/include/odp_internal.h > +++ b/platform/linux-generic/include/odp_internal.h > @@ -42,6 +42,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 bb384bc..e6f2ccd 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 732bd8f..151c597 100644 > --- a/platform/linux-generic/odp_init.c > +++ b/platform/linux-generic/odp_init.c > @@ -151,5 +151,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; > } > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 7f45a3e..7d522f9 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -42,6 +42,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 bb384bc..e6f2ccd 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 732bd8f..151c597 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -151,5 +151,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; }