https://bugs.linaro.org/show_bug.cgi?id=1851
--- Comment #1 from Bill Fischofer <[email protected]> ---
>From the documentation of odp_pool_destroy():
Results are undefined if an attempt is made to destroy a pool that contains
allocated
or otherwise active buffers.
There is no requirement that odp_term_local() be called prior to calling
odp_pool_destroy(). Indeed, it is invalid to call any ODP API following a call
to odp_term_local() as that API is intended to be the final ODP call prior to
thread termination, just as odp_init_local() is expected to be called prior to
any other ODP API call on that thread.
ODP implementations may maintain thread-local caches of buffers for performance
reasons (linux-generic does this) and this means that attempting to destroy a
pool that has been used by multiple threads requires application coordination
as otherwise you'd be destroying a pool that has active buffers used by other
threads. The simplest way to do this is for each thread that has allocated
buffers from a pool to attempt to call odp_pool_destroy() for it. Each such
call will flush its local cache and fail if the pool is still active. When the
last thread flushes its cache then the pool will no longer be active and the
destroy() call will succeed.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp