Update.
[glibc.git] / elf / tst-tlsmod4.c
blobd40b3fdf61ed2791d7b23162d859226c7be0301b
1 #include <stdio.h>
3 #include <tls.h>
5 #ifdef USE_TLS
6 # include "tls-macros.h"
9 COMMON_INT_DEF(baz);
12 int
13 in_dso (int n, int *caller_bazp)
15 int *bazp = TLS_GD (baz);
16 int result = 0;
18 if (caller_bazp != NULL && bazp != caller_bazp)
20 printf ("callers address of baz differs: %p vs %p\n", caller_bazp, bazp);
21 result = 1;
23 else if (*bazp != n)
25 printf ("baz != %d\n", n);
26 result = 1;
29 *bazp = 16;
31 return result;
33 #endif