a5aae07dceeddf5b871772a98d0c1fa06b2390c8
1 #ifndef _URCU_RCUJA_INTERNAL_H
2 #define _URCU_RCUJA_INTERNAL_H
5 * rcuja/rcuja-internal.h
7 * Userspace RCU library - RCU Judy Array Internal Header
9 * Copyright 2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27 #include <urcu/rculfhash.h>
29 /* Never declared. Opaque type used to store flagged node pointers. */
30 struct rcu_ja_node_flag
;
33 * Shadow node contains mutex and call_rcu head associated with a node.
35 struct rcu_ja_shadow_node
{
36 struct cds_lfht_node ht_node
; /* hash table node */
37 struct rcu_ja_node
*node
; /* reverse mapping and hash table key */
38 pthread_mutex_t lock
; /* mutual exclusion on node */
39 struct rcu_head head
; /* for deferred node and shadow node reclaim */
40 const struct rcu_flavor_struct
*flavor
; /* rcu flavor */
44 struct rcu_ja_node_flag
*root
;
46 * We use a hash table to associate nodes to their respective
47 * shadow node. This helps reducing lookup hot path cache
48 * footprint, especially for very small nodes.
53 __attribute__((visibility("protected")))
54 struct rcu_ja_shadow_node
*rcuja_shadow_lookup_lock(struct cds_lfht
*ht
,
55 struct rcu_ja_node
*node
);
56 __attribute__((visibility("protected")))
57 void rcuja_shadow_unlock(struct rcu_ja_shadow_node
*shadow_node
);
58 __attribute__((visibility("protected")))
59 int rcuja_shadow_set(struct cds_lfht
*ht
,
60 struct rcu_ja_node
*node
);
61 __attribute__((visibility("protected")))
62 int rcuja_shadow_clear_and_free_node(struct cds_lfht
*ht
,
63 struct rcu_ja_node
*node
);
64 __attribute__((visibility("protected")))
65 struct cds_lfht
*rcuja_create_ht(const struct rcu_flavor_struct
*flavor
);
66 __attribute__((visibility("protected")))
67 void rcuja_delete_ht(struct cds_lfht
*ht
);
69 #endif /* _URCU_RCUJA_INTERNAL_H */
This page took 0.033953 seconds and 4 git commands to generate.