Revert "Fix the issue when threads running < num_threads"

This reverts commit 06aa4d2d6b16a5c6fac5884681bd32d12f47ef34.
This commit is contained in:
VadimTk
2016-04-08 17:34:50 +00:00
parent 5d87570f6b
commit cb9a2cdc29

View File

@ -474,7 +474,6 @@ static void *runner_thread(void *arg)
thread_id = ctxt->id;
log_text(LOG_DEBUG, "Runner thread started (%d)!", thread_id);
pthread_mutex_lock(&thread_start_mutex);
if (test->ops.thread_init != NULL && test->ops.thread_init(thread_id) != 0)
{
sb_globals.error = 1;
@ -485,11 +484,9 @@ static void *runner_thread(void *arg)
We do this to make sure all threads get to this barrier
about the same time
*/
pthread_mutex_lock(&thread_start_mutex);
sb_globals.num_running++;
pthread_mutex_unlock(&thread_start_mutex);
while(sb_globals.num_running < sb_globals.num_threads) {
sleep(1);
}
do
{