lib/ccmap.c
/* Increments the count of 'hash' values in the 'ccmap'.  The caller must
 * ensure that 'ccmap' cannot change concurrently (from another thread).
 *
 * Returns the current count of the given hash value after the incremention. */
Increments the count of 'hash' values in the 'ccmap'.  The caller must
ensure that 'ccmap' cannot change concurrently (from another thread).

Returns the current count of the given hash value after the incremention.
Increments the count of ' hash ' values in the ' ccmap ' . The caller must ensure that ' ccmap ' cannot change concurrently ( from another thread ) . Returns the current count of the given hash value after the incremention .
uint32_t
ccmap_inc(struct ccmap *ccmap, uint32_t hash)
{
    struct ccmap_impl *impl = ccmap_get_impl(ccmap);
    uint32_t count;
    if (OVS_UNLIKELY(impl->n_unique >= impl->max_n)) {
        COVERAGE_INC(ccmap_expand);
        impl = ccmap_rehash(ccmap, (impl->mask << 1) | 1);
    }
    while (OVS_UNLIKELY(!(count = ccmap_try_inc(impl, hash, 1)))) {
        impl = ccmap_rehash(ccmap, impl->mask);
    }
    ++impl->n;
    if (count == 1) {
        ++impl->n_unique;
    }
    return count;
}
uint32_t ccmap_inc ( struct ccmap * ccmap , uint32_t hash ) { struct ccmap_impl * impl = ccmap_get_impl ( ccmap ) ; uint32_t count ; if ( OVS_UNLIKELY ( impl -> n_unique >= impl -> max_n ) ) { COVERAGE_INC ( ccmap_expand ) ; impl = ccmap_rehash ( ccmap , ( impl -> mask << 1 ) | 1 ) ; } while ( OVS_UNLIKELY ( ! ( count = ccmap_try_inc ( impl , hash , 1 ) ) ) ) { impl = ccmap_rehash ( ccmap , impl -> mask ) ; } ++ impl -> n ; if ( count == 1 ) { ++ impl -> n_unique ; } return count ; }
Increments the count of 'hash' values in the 'ccmap'.
Increments the count of ' hash ' values in the ' ccmap ' .