rculfhash: document flags
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 9 Jul 2011 20:34:29 +0000 (16:34 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 9 Jul 2011 20:34:29 +0000 (16:34 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash.c
urcu/rculfhash.h

index 55f56ceb6bc54a248032d3e2ce94e2db1bfeb82b..e8147178ada51bc333c27237ac806311c8bc08a0 100644 (file)
 #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)
index 5c5d4eb1a57ad87a0b2ec8f7c10ed704efd6b66f..b98b4932922e02fab3cd53e6630a46ca3b848a06 100644 (file)
@@ -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;
 };
 
This page took 0.025819 seconds and 4 git commands to generate.