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
struct nl_cache_ops* nl_cache_ops_associate_safe(int protocol, int msgtype)
{
    struct nl_cache_ops* ops;

    nl_write_lock(&cache_ops_lock);
    if ((ops = __cache_ops_associate(protocol, msgtype)))
        nl_cache_ops_get(ops);
    nl_write_unlock(&cache_ops_lock);

    return ops;
}
/**
 * Associate protocol and message type to cache operations
 * @arg protocol		netlink protocol
 * @arg msgtype			netlink message type
 *
 * Searches the registered cache operations for a matching protocol
 * and message type.
 *
 * @note The reference counter of the returned cache operation is incremented
 *       and must be decremented after use with nl_cache_ops_put().
 *
 * @return The cache operations or NULL if no no match was found.
 */
Associate protocol and message type to cache operations
@arg protocol                netlink protocol
@arg msgtype                 netlink message type

Searches the registered cache operations for a matching protocol
and message type.

@note The reference counter of the returned cache operation is incremented
and must be decremented after use with nl_cache_ops_put().

@return The cache operations or NULL if no no match was found.
Associate protocol and message type to cache operations @arg protocol netlink protocol @arg msgtype netlink message type Searches the registered cache operations for a matching protocol and message type . @note The reference counter of the returned cache operation is incremented and must be decremented after use with nl_cache_ops_put () . @return The cache operations or NULL if no no match was found .
struct nl_cache_ops* nl_cache_ops_associate_safe(int protocol, int msgtype)
{
    struct nl_cache_ops* ops;
    nl_write_lock(&cache_ops_lock);
    if ((ops = __cache_ops_associate(protocol, msgtype)))
        nl_cache_ops_get(ops);
    nl_write_unlock(&cache_ops_lock);
    return ops;
}
struct nl_cache_ops * nl_cache_ops_associate_safe ( int protocol , int msgtype ) { struct nl_cache_ops * ops ; nl_write_lock ( & cache_ops_lock ) ; if ( ( ops = __cache_ops_associate ( protocol , msgtype ) ) ) nl_cache_ops_get ( ops ) ; nl_write_unlock ( & cache_ops_lock ) ; return ops ; }
Associate protocol and message type to cache operations
 @arg protocol                netlink protocol
 @arg msgtype                 netlink message type
Associate protocol and message type to cache operations @arg protocol netlink protocol @arg msgtype netlink message type