On 02/23/2015 11:36 PM, Robbie King wrote:
+int odp_pool_term_global(void)
+{
+       int i;
+       pool_entry_t *pool;
+       int ret = 0;
+       int rc = 0;
+
+       for (i = 0; i < ODP_CONFIG_POOLS; i++) {
+               pool = get_pool_entry(i);
+
+               POOL_LOCK(&pool->s.lock);
+               if (pool->s.pool_shm != ODP_SHM_INVALID) {
+                       ODP_ERR("Not destroyed pool: %s\n", pool->s.name);
+                       rc = -1;
+               }
+               POOL_UNLOCK(&pool->s.lock);
+       }
what this for does?
you should do:
pool->s.name[0] = 0;
pool->s.flags.has_name = 1;
unmap(pool->s.pool_base_addr);

Also I would like to zero everything that odp_pool_create() created. Including atomic counters.

Thanks,
Maxim.

+
+       ret = odp_shm_free(odp_shm_lookup(SHM_DEFAULT_NAME));
+       if (ret < 0) {
+               ODP_ERR("shm free failed for %s", SHM_DEFAULT_NAME);
+               rc = -1;
+       }
+
+       return rc;
+}
+


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to