extern "C" { __thread int ext_int; extern __thread int my_int; int* get_ext_int() { return &ext_int; } int* get_my_int() { return &my_int; } }