1 #include <pthread.h> 2 3 volatile int GlobalVar; 4 CalledFunc()5extern "C" void CalledFunc() { 6 GlobalVar++; 7 } 8 GlobalFunc()9extern "C" void GlobalFunc() { 10 for (int i = 0; i < 1000000; ++i) { 11 CalledFunc(); 12 } 13 } 14 main()15int main() { 16 while (true) { 17 GlobalFunc(); 18 } 19 return 0; 20 } 21