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