Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#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)
#endif
struct _rcu_ht_node {
- struct rcu_ht_node *next;
+ struct rcu_ht_node *next; /* ptr | DUMMY_FLAG | REMOVED_FLAG */
unsigned long reverse_hash;
};