Back to index

glibc  2.9
tst-tlsmod13a.c
Go to the documentation of this file.
00001 #include <tls.h>
00002 
00003 #if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE
00004 __thread int b[2] __attribute__ ((tls_model ("initial-exec")));
00005 #else
00006 int b[2];
00007 #endif
00008 
00009 extern int foo (void);
00010 
00011 int
00012 bar (void)
00013 {
00014   return foo () + b[0];
00015 }