On Tue, Mar 29, 2016 at 8:59 AM, Maxim Uvarov <[email protected]>
wrote:

> Print cause and pool name on destroy to make debug more
> easily.
>
> Signed-off-by: Maxim Uvarov <[email protected]>
>

Reviewed-by: Bill Fischofer <[email protected]>


> ---
>  platform/linux-generic/odp_pool.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/platform/linux-generic/odp_pool.c
> b/platform/linux-generic/odp_pool.c
> index 588362b..eb545b2 100644
> --- a/platform/linux-generic/odp_pool.c
> +++ b/platform/linux-generic/odp_pool.c
> @@ -459,6 +459,7 @@ int odp_pool_destroy(odp_pool_t pool_hdl)
>         if (pool->s.pool_shm == ODP_SHM_INVALID ||
>             pool->s.flags.predefined) {
>                 POOL_UNLOCK(&pool->s.lock);
> +               ODP_ERR("invalid shm for pool %s\n", pool->s.name);
>                 return -1;
>         }
>
> @@ -469,6 +470,7 @@ int odp_pool_destroy(odp_pool_t pool_hdl)
>         /* Call fails if pool has allocated buffers */
>         if (odp_atomic_load_u32(&pool->s.bufcount) < pool->s.buf_num) {
>                 POOL_UNLOCK(&pool->s.lock);
> +               ODP_ERR("pool %s not empty\n", pool->s.name);
>                 return -1;
>         }
>
> --
> 2.7.1.250.gff4ea60
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to