#include #include #include #include #include using namespace std; // In this version, rather than synchronize the data, // we synchronize execution of the code, in particular, // the increase_unsync method mutex globalMutex; // mutex to control exeuction of method int unsync_counter = 0; void increase(int n) { for (int i=0; i(t2 - t1).count() << " microseconds" << endl; return 0; }