projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rculfhash: introduce REMOVED_FLAG and FLAG_MASK
[urcu.git]
/
rculfhash.c
diff --git
a/rculfhash.c
b/rculfhash.c
index 3120d4585995c030a999903b0667d803ebf5b877..2ec91f2f51b6ffd37a7d295a66f52c99ade80791 100644
(file)
--- a/
rculfhash.c
+++ b/
rculfhash.c
@@
-53,6
+53,9
@@
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
+#define REMOVED_FLAG (1UL << 0)
+#define FLAGS_MASK ((1UL << 1) - 1)
+
struct rcu_table {
unsigned long size; /* always a power of 2 */
unsigned long resize_target;
struct rcu_table {
unsigned long size; /* always a power of 2 */
unsigned long resize_target;
@@
-176,19
+179,19
@@
void check_resize(struct rcu_ht *ht, struct rcu_table *t,
static
struct rcu_ht_node *clear_flag(struct rcu_ht_node *node)
{
static
struct rcu_ht_node *clear_flag(struct rcu_ht_node *node)
{
- return (struct rcu_ht_node *) (((unsigned long) node) & ~
0x1
);
+ return (struct rcu_ht_node *) (((unsigned long) node) & ~
FLAGS_MASK
);
}
static
int is_removed(struct rcu_ht_node *node)
{
}
static
int is_removed(struct rcu_ht_node *node)
{
- return ((unsigned long) node) &
0x1
;
+ return ((unsigned long) node) &
REMOVED_FLAG
;
}
static
struct rcu_ht_node *flag_removed(struct rcu_ht_node *node)
{
}
static
struct rcu_ht_node *flag_removed(struct rcu_ht_node *node)
{
- return (struct rcu_ht_node *) (((unsigned long) node) |
0x1
);
+ return (struct rcu_ht_node *) (((unsigned long) node) |
REMOVED_FLAG
);
}
static
}
static
This page took
0.025227 seconds
and
4
git commands to generate.