mirror of
https://github.com/ioacademy-jikim/debugging
synced 2025-06-10 01:16:12 +00:00
25 lines
304 B
C
25 lines
304 B
C
#include <config.h>
|
|
|
|
#ifdef HAVE_TLS
|
|
#include <pthread.h>
|
|
|
|
extern __thread int so_extern;
|
|
static __thread int so_local;
|
|
extern __thread int global;
|
|
|
|
int *test_so_extern(void)
|
|
{
|
|
return &so_extern;
|
|
}
|
|
|
|
int *test_so_local(void)
|
|
{
|
|
return &so_local;
|
|
}
|
|
|
|
int *test_so_global(void)
|
|
{
|
|
return &global;
|
|
}
|
|
#endif
|