Function panda_sys::qht_lookup

source ·
pub unsafe extern "C" fn qht_lookup(
    ht: *mut qht,
    func: qht_lookup_func_t,
    userp: *const c_void,
    hash: u32
) -> *mut c_void
Expand description

qht_lookup - Look up a pointer in a QHT @ht: QHT to be looked up @func: function to compare existing pointers against @userp @userp: pointer to pass to @func @hash: hash of the pointer to be looked up

Needs to be called under an RCU read-critical section.

smp_read_barrier_depends() is implied before the call to @func.

The user-provided @func compares pointers in QHT against @userp. If the function returns true, a match has been found.

Returns the corresponding pointer when a match is found. Returns NULL otherwise.