]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/test/tls/tst-tls-at-ctor.c
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / test / tls / tst-tls-at-ctor.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <tls.h>
4
5 #define TLS_VAR_INIT_VALUE 99
6
7 #ifdef USE_TLS
8 extern __thread int tls_var;
9 #endif
10
11 int main(void)
12 {
13         int ret = EXIT_SUCCESS;
14 #ifdef USE_TLS
15         if (tls_var != TLS_VAR_INIT_VALUE) {
16                 printf("tls_var = %d - Expected value = %d\n", tls_var, TLS_VAR_INIT_VALUE);
17                 ret = EXIT_FAILURE;
18         }
19 #endif
20         return ret;
21 }