Update.
[glibc.git] / elf / tst-tlsmod3.c
blob087c11b7a02deb12920d33867944505710ec87db
1 #include <stdio.h>
3 #include <tls.h>
5 #ifdef USE_TLS
6 # include "tls-macros.h"
8 extern int in_dso (int n, int *caller_foop);
10 COMMON_INT_DEF(comm_n);
15 int
16 in_dso2 (void)
18 int *foop = TLS_GD (foo);
19 int result = 0;
20 static int n;
21 int *np = TLS_GD (comm_n);
23 if (n != *np)
25 printf ("n = %d != comm_n = %d\n", n, *np);
26 result = 1;
29 result |= in_dso (*foop = 42 + n++, foop);
31 *foop = 16;
33 return result;
35 #endif