corrected: incrementing globals with sync pthread_mutex_t