From b41da4d18b6b781ce686d3da1c5f2a89a92f439b Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 6 Jun 2013 15:16:57 -0400 Subject: [PATCH] rcuja API: document lookup Signed-off-by: Mathieu Desnoyers --- urcu/rcuja.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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); -- 2.34.1