]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/tst-tlsmod3.c
* sunrpc/svc_authux.c (_svcauth_unix): Remove spurious printf (ugh!).
[thirdparty/glibc.git] / elf / tst-tlsmod3.c
CommitLineData
fc093be1
UD
1#include <stdio.h>
2
3#include <tls.h>
fc093be1
UD
4
5#ifdef USE_TLS
ebda6173
UD
6# include "tls-macros.h"
7
fc093be1
UD
8extern int in_dso (int n, int *caller_foop);
9
10COMMON_INT_DEF(comm_n);
11
12
13
14
15int
16in_dso2 (void)
17{
18 int *foop = TLS_GD (foo);
19 int result = 0;
20 static int n;
21 int *np = TLS_GD (comm_n);
22
23 if (n != *np)
24 {
25 printf ("n = %d != comm_n = %d\n", n, *np);
26 result = 1;
27 }
28
29 result |= in_dso (*foop = 42 + n++, foop);
30
31 *foop = 16;
32
33 return result;
34}
35#endif