summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sptls04/init.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testsuites/sptests/sptls04/init.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/testsuites/sptests/sptls04/init.c b/testsuites/sptests/sptls04/init.c
index d73b0f4642..bbbe81b9d1 100644
--- a/testsuites/sptests/sptls04/init.c
+++ b/testsuites/sptests/sptls04/init.c
@@ -1,11 +1,5 @@
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
- *
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -15,7 +9,7 @@
/*
* This test program runs also on GNU/Linux and FreeBSD. Use
*
- * cc init.c && ./a.out
+ * cc init.c tls.c && ./a.out
*
* to run it.
*/
@@ -24,6 +18,8 @@
#include "config.h"
#endif
+#include "sptls04.h"
+
#ifdef __rtems__
#include <tmacros.h>
@@ -36,9 +32,9 @@
#endif /* __rtems__ */
-static __thread int i;
+static _Thread_local int i;
-static __thread int j;
+static _Thread_local int j;
static __attribute__((__constructor__)) void con(void)
{
@@ -49,6 +45,7 @@ static void test(void)
{
rtems_test_assert(i == 1);
rtems_test_assert(j == 0);
+ rtems_test_assert(k == 2);
}
#ifdef __rtems__