#include "tap.h"
+struct my_tls_struct {
+ int int1;
+ char char1;
+ void *void1;
+};
+
+static DEFINE_URCU_TLS(int, my_tls_int);
+static DEFINE_URCU_TLS(struct my_tls_struct, my_tls_struct);
+
static void test_lfstack(void)
{
struct cds_lfs_stack s;
};
}
+static
+void test_urcu_tls(void)
+{
+ URCU_TLS(my_tls_int) = 1;
+ URCU_TLS(my_tls_struct).int1 = 1;
+ URCU_TLS(my_tls_struct).char1 = 'a';
+ URCU_TLS(my_tls_struct).void1 = NULL;
+}
+
+struct an_opaque_struct;
+struct a_clear_struct
+{
+ int x;
+};
+
+static
+void test_build_rcu_dereference(void)
+{
+ static struct an_opaque_struct *opaque = NULL;
+ static struct an_opaque_struct *const opaque_const = NULL;
+ static struct a_clear_struct *clear = NULL;
+ static struct a_clear_struct *const clear_const = NULL;
+
+ rcu_dereference(opaque);
+ rcu_dereference(opaque_const);
+ rcu_dereference(clear);
+ rcu_dereference(clear_const);
+}
+
int main(void)
{
plan_tests(3);
test_wfstack();
test_wfcqueue();
test_build_cds_list_head_init();
+ test_urcu_tls();
+ test_build_rcu_dereference();
return exit_status();
}