openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/libnl-3.4.0/lib/cache_mngt.c
void nl_cache_mngt_unprovide(struct nl_cache* cache)
{
    struct nl_cache_ops* ops;

    nl_write_lock(&cache_ops_lock);

    ops = cache_ops_lookup_for_obj(cache->c_ops->co_obj_ops);
    if (!ops)
        BUG();
    else if (ops->co_major_cache == cache)
    {
        nl_cache_free(ops->co_major_cache);
        nl_cache_ops_put(ops);
        ops->co_major_cache = NULL;
    }

    nl_write_unlock(&cache_ops_lock);
}
/**
 * Unprovide a cache for global use
 * @arg cache		cache to unprovide
 *
 * Cancels the offer to use a cache globally. The
 * cache will no longer be returned via lookups but
 * may still be in use.
 */
Unprovide a cache for global use
@arg cache           cache to unprovide

Cancels the offer to use a cache globally. The
cache will no longer be returned via lookups but
may still be in use.
Unprovide a cache for global use @arg cache cache to unprovide Cancels the offer to use a cache globally . The cache will no longer be returned via lookups but may still be in use .
void nl_cache_mngt_unprovide(struct nl_cache* cache)
{
    struct nl_cache_ops* ops;
    nl_write_lock(&cache_ops_lock);
    ops = cache_ops_lookup_for_obj(cache->c_ops->co_obj_ops);
    if (!ops)
        BUG();
    else if (ops->co_major_cache == cache)
    {
        nl_cache_free(ops->co_major_cache);
        nl_cache_ops_put(ops);
        ops->co_major_cache = NULL;
    }
    nl_write_unlock(&cache_ops_lock);
}
void nl_cache_mngt_unprovide ( struct nl_cache * cache ) { struct nl_cache_ops * ops ; nl_write_lock ( & cache_ops_lock ) ; ops = cache_ops_lookup_for_obj ( cache -> c_ops -> co_obj_ops ) ; if ( ! ops ) BUG ( ) ; else if ( ops -> co_major_cache == cache ) { nl_cache_free ( ops -> co_major_cache ) ; nl_cache_ops_put ( ops ) ; ops -> co_major_cache = NULL ; } nl_write_unlock ( & cache_ops_lock ) ; }
Unprovide a cache for global use
 @arg cache           cache to unprovide
Unprovide a cache for global use @arg cache cache to unprovide