From: Mathieu Desnoyers Date: Thu, 6 Jun 2013 19:16:57 +0000 (-0400) Subject: rcuja API: document lookup X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=b41da4d18b6b781ce686d3da1c5f2a89a92f439b rcuja API: document lookup Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/rcuja.h b/urcu/rcuja.h index f8cba6a..ecbebbc 100644 --- a/urcu/rcuja.h +++ b/urcu/rcuja.h @@ -58,7 +58,28 @@ void cds_ja_node_init(struct cds_ja_node *node) { } +/* + * cds_ja_lookup - look up by key. + * @ja: the Judy array. + * @key: key to look up. + * + * Returns the first node of a duplicate chain if a match is found, else + * returns NULL. + * A RCU read-side lock should be held across call to this function and + * use of its return value. + */ struct cds_ja_node *cds_ja_lookup(struct cds_ja *ja, uint64_t key); + +/* + * cds_ja_lookup_lower_equal - look up first node with key <= @key. + * @ja: the Judy array. + * @key: key to look up. + * + * Returns the first node of a duplicate chain if a node is present in + * the tree which has a key lower or equal to @key, else returns NULL. + * A RCU read-side lock should be held across call to this function and + * use of its return value. + */ struct cds_ja_node *cds_ja_lookup_lower_equal(struct cds_ja *ja, uint64_t key);