d00bb4ae6d8c111cdfa68987bc8b59e5622174d8
1 #ifndef _URCU_CALL_RCU_H
2 #define _URCU_CALL_RCU_H
7 * Userspace RCU header - deferred execution
9 * Copyright (c) 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 * Copyright (c) 2009 Paul E. McKenney, IBM Corporation.
12 * LGPL-compatible code should include this header with :
14 * #define _LGPL_SOURCE
15 * #include <urcu-defer.h>
17 * This library is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU Lesser General Public
19 * License as published by the Free Software Foundation; either
20 * version 2.1 of the License, or (at your option) any later version.
22 * This library is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * Lesser General Public License for more details.
27 * You should have received a copy of the GNU Lesser General Public
28 * License along with this library; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
35 #include <urcu/wfqueue.h>
41 /* Note that struct call_rcu_data is opaque to callers. */
47 #define URCU_CALL_RCU_RT 0x1
48 #define URCU_CALL_RCU_RUNNING 0x2
49 #define URCU_CALL_RCU_STOP 0x4
50 #define URCU_CALL_RCU_STOPPED 0x8
53 * The rcu_head data structure is placed in the structure to be freed
58 struct cds_wfq_node next
;
59 void (*func
)(struct rcu_head
*head
);
67 * get_cpu_call_rcu_data should be called with RCU read-side lock held.
68 * Callers should be registered RCU read-side threads.
70 struct call_rcu_data
*get_cpu_call_rcu_data(int cpu
);
71 pthread_t
get_call_rcu_thread(struct call_rcu_data
*crdp
);
72 struct call_rcu_data
*create_call_rcu_data(unsigned long flags
,
74 int set_cpu_call_rcu_data(int cpu
, struct call_rcu_data
*crdp
);
75 struct call_rcu_data
*get_default_call_rcu_data(void);
77 * get_call_rcu_data should be called from registered RCU read-side
78 * threads. For the QSBR flavor, the caller should be online.
80 struct call_rcu_data
*get_call_rcu_data(void);
81 struct call_rcu_data
*get_thread_call_rcu_data(void);
82 void set_thread_call_rcu_data(struct call_rcu_data
*crdp
);
83 int create_all_cpu_call_rcu_data(unsigned long flags
);
85 * call_rcu should be called from registered RCU read-side threads.
86 * For the QSBR flavor, the caller should be online.
88 void call_rcu(struct rcu_head
*head
,
89 void (*func
)(struct rcu_head
*head
));
90 void call_rcu_data_free(struct call_rcu_data
*crdp
);
91 void free_all_cpu_call_rcu_data(void);
92 void call_rcu_after_fork_child(void);
98 #endif /* _URCU_CALL_RCU_H */
This page took 0.032974 seconds and 4 git commands to generate.