binutils-gdb/gdb/testsuite/gdb.threads/tls-shared.c

12 lines
167 B
C

#include <pthread.h>
__thread int i_tls = 1;
int foo ()
{
/* Ensure we link against pthreads even with --as-needed. */
pthread_testcancel();
return i_tls;
}