__thread Foo foo;
"foo"如何实际解决?编译器是否以函数调用静默替换"foo"的每个实例?"foo"存储在相对于堆栈底部的某处,并且编译器将其存储为"嘿,对于每个线程,将此空间放在堆栈底部附近,并将foo存储为'堆栈底部的偏移x' "?
linux multithreading gcc thread-local-storage
gcc ×1
linux ×1
multithreading ×1
thread-local-storage ×1