void threadlocal_stats_reset(struct thread_stats *thread_stats) { int ii; for (ii = 0; ii < settings.num_threads; ++ii) { pthread_mutex_lock(&thread_stats[ii].mutex); threadlocal_stats_clear(&thread_stats[ii]); pthread_mutex_unlock(&thread_stats[ii].mutex); } }
void threadlocal_stats_reset(struct thread_stats *thread_stats) { int ii; for (ii = 0; ii < settings.num_threads; ++ii) { cb_mutex_enter(&thread_stats[ii].mutex); threadlocal_stats_clear(&thread_stats[ii]); cb_mutex_exit(&thread_stats[ii].mutex); } }