Skip to content

Commit 84343e5

Browse files
committed
Fix: num_threads does not include master thread
1 parent c4a4dab commit 84343e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tst_threads.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ int tst_thread_cleanup (struct tst_thread_env_t ** thread_env)
240240
* \return Success: thread ID, Fail: -1
241241
*/
242242
inline int tst_thread_get_num() {
243-
assert(num_threads > 0);
243+
assert(num_threads >= 0);
244244
assert(NULL != tst_thread_tid_array);
245245
int i = 0;
246246
pthread_t self = pthread_self();

0 commit comments

Comments
 (0)