2 * Copyright 2021 Simon Marchi <simon.marchi@efficios.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 * This file is meant to verify that headers are compatible with both C and
21 * C++. It includes all exported headers and is compiled as C and C++ source.
24 #ifndef DYNAMIC_LINK_TEST
28 #include <urcu/arch.h>
29 #include <urcu/call-rcu.h>
31 #include <urcu/compiler.h>
32 #include <urcu/debug.h>
33 #include <urcu/defer.h>
34 #include <urcu/flavor.h>
35 #include <urcu/futex.h>
36 #include <urcu/hlist.h>
37 #include <urcu/lfstack.h>
38 #include <urcu/list.h>
39 #include <urcu/pointer.h>
40 #include <urcu/rcuhlist.h>
41 #include <urcu/rculfhash.h>
42 #include <urcu/rculfqueue.h>
43 #include <urcu/rculfstack.h>
44 #include <urcu/rculist.h>
46 #include <urcu/syscall-compat.h>
47 #include <urcu/system.h>
48 #include <urcu/tls-compat.h>
49 #include <urcu/uatomic.h>
50 #include <urcu/urcu-bp.h>
51 #include <urcu/urcu.h>
52 #include <urcu/urcu-mb.h>
53 #include <urcu/urcu-memb.h>
54 #include <urcu/urcu-qsbr.h>
55 #include <urcu/urcu-signal.h>
56 #include <urcu/wfcqueue.h>
57 #include <urcu/wfqueue.h>
58 #include <urcu/wfstack.h>
62 static void test_lfstack(void)
64 struct cds_lfs_stack s
;
67 if (!cds_lfs_empty(&s
))
68 fail("cds_lfs_empty");
70 ok(1, "cds_lfs_empty");
73 static void test_wfstack(void)
75 struct cds_wfs_stack s
;
78 if (!cds_wfs_empty(&s
))
79 fail("cds_lfs_empty");
81 ok(1, "cds_lfs_empty");
84 static void test_wfcqueue(void)
86 struct cds_wfcq_head head
;
87 struct cds_wfcq_tail tail
;
89 cds_wfcq_init(&head
, &tail
);
90 if (!cds_wfcq_empty(&head
, &tail
))
91 fail("cds_wfcq_empty");
93 ok(1, "cds_wfcq_empty");
98 /* Need at least 1 test to make a valid TAP test plan. */
106 return exit_status();
This page took 0.030994 seconds and 4 git commands to generate.