From: Mathieu Desnoyers Date: Sat, 9 Jul 2011 20:34:29 +0000 (-0400) Subject: rculfhash: document flags X-Git-Tag: v0.7.0~43^2~201 X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=d95bd16028d250211f2e65cd583e422f4ecdf7d0 rculfhash: document flags Signed-off-by: Mathieu Desnoyers --- diff --git a/rculfhash.c b/rculfhash.c index 55f56ce..e814717 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -53,6 +53,11 @@ #define max(a, b) ((a) > (b) ? (a) : (b)) #endif +/* + * The removed flag needs to be updated atomically with the pointer. + * The dummy flag does not require to be updated atomically with the + * pointer, but it is added as a pointer low bit flag to save space. + */ #define REMOVED_FLAG (1UL << 0) #define DUMMY_FLAG (1UL << 1) #define FLAGS_MASK ((1UL << 2) - 1) diff --git a/urcu/rculfhash.h b/urcu/rculfhash.h index 5c5d4eb..b98b493 100644 --- a/urcu/rculfhash.h +++ b/urcu/rculfhash.h @@ -9,7 +9,7 @@ extern "C" { #endif struct _rcu_ht_node { - struct rcu_ht_node *next; + struct rcu_ht_node *next; /* ptr | DUMMY_FLAG | REMOVED_FLAG */ unsigned long reverse_hash; };