diff options
Diffstat (limited to 'tools/regression/tls/ttls1')
| -rw-r--r-- | tools/regression/tls/ttls1/Makefile | 7 | ||||
| -rw-r--r-- | tools/regression/tls/ttls1/ttls1.c | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tools/regression/tls/ttls1/Makefile b/tools/regression/tls/ttls1/Makefile new file mode 100644 index 000000000000..8560de58cc9a --- /dev/null +++ b/tools/regression/tls/ttls1/Makefile @@ -0,0 +1,7 @@ +PROG= ttls1 +LDFLAGS+= -L../libxx -lxx -Wl,--rpath=${.OBJDIR}/../libxx +LDFLAGS+= -L../libyy -lyy -Wl,--rpath=${.OBJDIR}/../libyy +MAN= +DEBUG_FLAGS= -g + +.include <bsd.prog.mk> diff --git a/tools/regression/tls/ttls1/ttls1.c b/tools/regression/tls/ttls1/ttls1.c new file mode 100644 index 000000000000..24e4b1636e7d --- /dev/null +++ b/tools/regression/tls/ttls1/ttls1.c @@ -0,0 +1,14 @@ + +#include <stdio.h> + +extern int __thread xx1; +extern int __thread xx2; +extern int __thread xxa[]; +int __thread a[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; +extern int xxyy(); + +int main(int argc, char** argv) +{ + printf("xx1=%d, xx2=%d, xxa[5]=%d, a[5]=%d, xxyy()=%d\n", + xx1, xx2, xxa[5], a[5], xxyy()); +} |
