Skip to content
Snippets Groups Projects
Commit 936928f8 authored by Alexandre Abadie's avatar Alexandre Abadie
Browse files

tests/pthread_condition_variable: small improvements

parent 7ff3a2a5
Branches
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ static void *second_thread(void *arg)
int main(void)
{
puts("START");
count = 0;
is_finished = 0;
expected_value = 1000ul * 1000ul;
......@@ -74,10 +75,14 @@ int main(void)
puts("condition fulfilled.");
is_finished = 1;
mutex_unlock(&mutex);
return 0;
break;
}
pthread_cond_wait(&cv, &mutex);
mutex_unlock(&mutex);
}
puts("SUCCESS");
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment