projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: ifdef linux specific cpu count compat
[userspace-rcu.git]
/
tests
/
unit
/
test_build.c
diff --git
a/tests/unit/test_build.c
b/tests/unit/test_build.c
index b2786c55c00253d8d51ab6e1ae8ed90329755f85..7f062f19a236d85f99e1a3402dec9ad467b34582 100644
(file)
--- a/
tests/unit/test_build.c
+++ b/
tests/unit/test_build.c
@@
-59,6
+59,15
@@
#include "tap.h"
#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_lfstack(void)
{
struct cds_lfs_stack s;
@@
-97,6
+106,15
@@
void test_build_cds_list_head_init(void)
};
}
};
}
+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;
+}
+
int main(void)
{
plan_tests(3);
int main(void)
{
plan_tests(3);
@@
-105,6
+123,7
@@
int main(void)
test_wfstack();
test_wfcqueue();
test_build_cds_list_head_init();
test_wfstack();
test_wfcqueue();
test_build_cds_list_head_init();
+ test_urcu_tls();
return exit_status();
}
return exit_status();
}
This page took
0.02387 seconds
and
4
git commands to generate.