1 // SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2 // SPDX-FileCopyrightText: 2009 Paul E. McKenney, IBM Corporation.
4 // SPDX-License-Identifier: LGPL-2.1-or-later
6 #ifndef _URCU_CALL_RCU_H
7 #define _URCU_CALL_RCU_H
10 * Userspace RCU header - batch memory reclamation with kernel API
12 * This header is meant to be included indirectly through a liburcu
19 #include <urcu/wfcqueue.h>
25 /* Note that struct call_rcu_data is opaque to callers. */
31 #define URCU_CALL_RCU_RT (1U << 0)
32 #define URCU_CALL_RCU_RUNNING (1U << 1)
33 #define URCU_CALL_RCU_STOP (1U << 2)
34 #define URCU_CALL_RCU_STOPPED (1U << 3)
35 #define URCU_CALL_RCU_PAUSE (1U << 4)
36 #define URCU_CALL_RCU_PAUSED (1U << 5)
39 * The rcu_head data structure is placed in the structure to be freed
44 struct cds_wfcq_node next
;
45 void (*func
)(struct rcu_head
*head
);
51 * Important: see rcu-api.md in userspace-rcu documentation for
52 * call_rcu family of functions usage detail, including the surrounding
53 * RCU usage required when using these primitives.
56 void call_rcu(struct rcu_head
*head
,
57 void (*func
)(struct rcu_head
*head
));
59 struct call_rcu_data
*create_call_rcu_data(unsigned long flags
,
61 void call_rcu_data_free(struct call_rcu_data
*crdp
);
63 struct call_rcu_data
*get_default_call_rcu_data(void);
64 struct call_rcu_data
*get_cpu_call_rcu_data(int cpu
);
65 struct call_rcu_data
*get_thread_call_rcu_data(void);
66 struct call_rcu_data
*get_call_rcu_data(void);
67 pthread_t
get_call_rcu_thread(struct call_rcu_data
*crdp
);
69 void set_thread_call_rcu_data(struct call_rcu_data
*crdp
);
70 int set_cpu_call_rcu_data(int cpu
, struct call_rcu_data
*crdp
);
72 int create_all_cpu_call_rcu_data(unsigned long flags
);
73 void free_all_cpu_call_rcu_data(void);
75 void call_rcu_before_fork(void);
76 void call_rcu_after_fork_parent(void);
77 void call_rcu_after_fork_child(void);
79 void rcu_barrier(void);
85 #endif /* _URCU_CALL_RCU_H */
This page took 0.031965 seconds and 4 git commands to generate.