projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rcuja: implement add
[userspace-rcu.git]
/
rcuja
/
rcuja-internal.h
diff --git
a/rcuja/rcuja-internal.h
b/rcuja/rcuja-internal.h
index b892a8747cf89b5250369b5558c6830c9647ff33..28908e050b06e88d4dc9003487ee4f912596b819 100644
(file)
--- a/
rcuja/rcuja-internal.h
+++ b/
rcuja/rcuja-internal.h
@@
-27,42
+27,67
@@
#include <urcu/rculfhash.h>
/* Never declared. Opaque type used to store flagged node pointers. */
#include <urcu/rculfhash.h>
/* Never declared. Opaque type used to store flagged node pointers. */
-struct
rcu_ja_
node_flag;
+struct
cds_ja_i
node_flag;
/*
* Shadow node contains mutex and call_rcu head associated with a node.
*/
/*
* Shadow node contains mutex and call_rcu head associated with a node.
*/
-struct
rcu
_ja_shadow_node {
+struct
cds
_ja_shadow_node {
struct cds_lfht_node ht_node; /* hash table node */
struct cds_lfht_node ht_node; /* hash table node */
- struct rcu_ja_node *node; /* reverse mapping and hash table key */
- pthread_mutex_t lock; /* mutual exclusion on node */
+ struct cds_ja_inode *node; /* reverse mapping and hash table key */
+ /*
+ * mutual exclusion on all nodes belonging to the same tree
+ * position (e.g. both nodes before and after recompaction
+ * use the same lock).
+ */
+ pthread_mutex_t *lock;
+ unsigned int nr_child; /* number of children in node */
struct rcu_head head; /* for deferred node and shadow node reclaim */
};
struct rcu_head head; /* for deferred node and shadow node reclaim */
};
-struct rcu_ja {
- struct rcu_ja_node_flag *root;
+struct cds_ja {
+ struct cds_ja_inode_flag *root;
+ unsigned int tree_depth;
+ uint64_t key_max;
/*
/*
- * We use a hash table to associate node
s to their respective
- *
shadow node. This helps reducing lookup hot path cache
- * footprint, especially for very small nodes.
+ * We use a hash table to associate node
keys to their
+ *
respective shadow node. This helps reducing lookup hot path
+ *
cache
footprint, especially for very small nodes.
*/
struct cds_lfht *ht;
};
__attribute__((visibility("protected")))
*/
struct cds_lfht *ht;
};
__attribute__((visibility("protected")))
-struct rcu_ja_shadow_node *rcuja_shadow_lookup_lock(struct cds_lfht *ht,
- struct rcu_ja_node *node);
+struct cds_ja_shadow_node *rcuja_shadow_lookup_lock(struct cds_lfht *ht,
+ struct cds_ja_inode *node);
+
__attribute__((visibility("protected")))
__attribute__((visibility("protected")))
-void rcuja_shadow_unlock(struct rcu_ja_shadow_node *shadow_node);
+void rcuja_shadow_unlock(struct cds_ja_shadow_node *shadow_node);
+
__attribute__((visibility("protected")))
int rcuja_shadow_set(struct cds_lfht *ht,
__attribute__((visibility("protected")))
int rcuja_shadow_set(struct cds_lfht *ht,
- struct rcu_ja_node *node);
+ struct cds_ja_inode *new_node,
+ struct cds_ja_shadow_node *inherit_from);
+
+/* rcuja_shadow_clear flags */
+enum {
+ RCUJA_SHADOW_CLEAR_FREE_NODE = (1U << 0),
+ RCUJA_SHADOW_CLEAR_FREE_LOCK = (1U << 1),
+};
+
__attribute__((visibility("protected")))
__attribute__((visibility("protected")))
-int rcuja_shadow_clear_and_free_node(struct cds_lfht *ht,
- struct rcu_ja_node *node);
+int rcuja_shadow_clear(struct cds_lfht *ht,
+ struct cds_ja_inode *node,
+ unsigned int flags);
+
__attribute__((visibility("protected")))
__attribute__((visibility("protected")))
-struct cds_lfht *rcuja_create_ht(void);
+void rcuja_shadow_prune(struct cds_lfht *ht,
+ unsigned int flags);
+
+__attribute__((visibility("protected")))
+struct cds_lfht *rcuja_create_ht(const struct rcu_flavor_struct *flavor);
+
__attribute__((visibility("protected")))
__attribute__((visibility("protected")))
-
void
rcuja_delete_ht(struct cds_lfht *ht);
+
int
rcuja_delete_ht(struct cds_lfht *ht);
#endif /* _URCU_RCUJA_INTERNAL_H */
#endif /* _URCU_RCUJA_INTERNAL_H */
This page took
0.052836 seconds
and
4
git commands to generate.