2 * test_urcu_multiflavor.c
4 * Userspace RCU library - test multiple RCU flavors into one program
6 * Copyright February 2012 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef DYNAMIC_LINK_TEST
27 #include <urcu/urcu-mb.h>
28 #include <urcu/urcu-bp.h>
29 #include <urcu/urcu-memb.h>
30 #include <urcu/urcu-signal.h>
31 #include <urcu/urcu-qsbr.h>
36 static int test_mf_mb(void)
38 urcu_mb_register_thread();
40 urcu_mb_read_unlock();
41 urcu_mb_synchronize_rcu();
42 urcu_mb_unregister_thread();
46 static int test_mf_bp(void)
48 urcu_bp_register_thread();
50 urcu_bp_read_unlock();
51 urcu_bp_synchronize_rcu();
52 urcu_bp_unregister_thread();
56 static int test_mf_memb(void)
58 urcu_memb_register_thread();
59 urcu_memb_read_lock();
60 urcu_memb_read_unlock();
61 urcu_memb_synchronize_rcu();
62 urcu_memb_unregister_thread();
66 static int test_mf_signal(void)
68 urcu_signal_register_thread();
69 urcu_signal_read_lock();
70 urcu_signal_read_unlock();
71 urcu_signal_synchronize_rcu();
72 urcu_signal_unregister_thread();
76 static int test_mf_qsbr(void)
78 urcu_qsbr_register_thread();
79 urcu_qsbr_read_lock();
80 urcu_qsbr_read_unlock();
81 urcu_qsbr_synchronize_rcu();
82 urcu_qsbr_unregister_thread();
86 int main(int argc
, char **argv
)
93 ok1(!test_mf_signal());
This page took 0.05627 seconds and 5 git commands to generate.