Skip to content

Commit dffd000

Browse files
committed
Added assert to check if threads were already initialized.
1 parent 582511f commit dffd000

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tst_threads.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ int tst_thread_init(int max_threads, struct tst_thread_env_t ***thread_env) {
138138

139139
assert(max_threads > 0);
140140
assert(thread_env != NULL);
141+
assert(num_threads == 0);
141142

142143
/* Without the pthread_mutex_lock, as no threads are started, yet */
143144
working = 0;

0 commit comments

Comments
 (0)