projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: rcuja merge fixes
[userspace-rcu.git]
/
urcu
/
rcuja.h
diff --git
a/urcu/rcuja.h
b/urcu/rcuja.h
index 637366778d0ff1e664723e3ff2e006d50f171b22..82e272bd4ede1aec436845aef287754dd1dab8b6 100644
(file)
--- a/
urcu/rcuja.h
+++ b/
urcu/rcuja.h
@@
-25,12
+25,10
@@
* Include this file _after_ including your URCU flavor.
*/
* Include this file _after_ including your URCU flavor.
*/
-#include <stdint.h>
#include <urcu/compiler.h>
#include <urcu-call-rcu.h>
#include <urcu-flavor.h>
#include <stdint.h>
#include <urcu/compiler.h>
#include <urcu-call-rcu.h>
#include <urcu-flavor.h>
#include <stdint.h>
-#include <urcu/rcuhlist.h>
#ifdef __cplusplus
extern "C" {
#ifdef __cplusplus
extern "C" {
@@
-58,6
+56,10
@@
void cds_ja_node_init(struct cds_ja_node *node)
{
}
{
}
+/*
+ * Note: key UINT64_MAX is reserved internally for iteration.
+ */
+
/*
* cds_ja_lookup - look up by key.
* @ja: the Judy array.
/*
* cds_ja_lookup - look up by key.
* @ja: the Judy array.
@@
-204,7
+206,9
@@
int cds_ja_destroy(struct cds_ja *ja);
*/
#define cds_ja_for_each_key_rcu(ja, key, pos) \
for ((key) = 0; \
*/
#define cds_ja_for_each_key_rcu(ja, key, pos) \
for ((key) = 0; \
- ((pos) = cds_ja_lookup_above_equal(ja, key, &(key))); )
+ ((key) != UINT64_MAX ? \
+ ((pos) = cds_ja_lookup_above_equal(ja, key, &(key))) : 0); \
+ (key)++)
/*
* cds_ja_for_each_key_prev_rcu: Iterate over all keys in descending order.
/*
* cds_ja_for_each_key_prev_rcu: Iterate over all keys in descending order.
@@
-218,8
+222,10
@@
int cds_ja_destroy(struct cds_ja *ja);
* Safe against node removal during iteration.
*/
#define cds_ja_for_each_key_prev_rcu(ja, key, pos) \
* Safe against node removal during iteration.
*/
#define cds_ja_for_each_key_prev_rcu(ja, key, pos) \
- for ((key) = UINT64_MAX; \
- ((pos) = cds_ja_lookup_below_equal(ja, key, &(key))); )
+ for ((key) = UINT64_MAX - 1; \
+ ((key) != UINT64_MAX ? \
+ ((pos) = cds_ja_lookup_below_equal(ja, key, &(key))) : 0); \
+ (key)--)
#ifdef __cplusplus
}
#ifdef __cplusplus
}
This page took
0.023274 seconds
and
4
git commands to generate.