Fix error in benchmark

Discovered by compiling with clang instead.
This commit is contained in:
Noah Lev 2024-03-08 16:58:38 -05:00
parent 04f5c16ce9
commit 6e154b152d
2 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ void sort_pthreads(void *base, size_t num_elems, size_t width,
/* Barrier, wait for all threads to finish */
for (i = 0; i < num_threads; i++)
{
int ret_val;
long ret_val;
CHECK_ERROR(pthread_join(tid[i], (void **)(void*)&ret_val) != 0);
CHECK_ERROR(ret_val != 0);
}

View File

@ -171,7 +171,7 @@ void wordcount_splitter(void *data_in)
/* Barrier, wait for all threads to finish */
for (i = 0; i < num_procs; i++)
{
int ret_val;
long ret_val;
CHECK_ERROR(pthread_join(tid[i], (void **)(void*)&ret_val) != 0);
CHECK_ERROR(ret_val != 0);
}
@ -203,7 +203,7 @@ void wordcount_splitter(void *data_in)
/* Barrier, wait for all threads to finish */
for (i = 0; i < num_threads; i++)
{
int ret_val;
long ret_val;
CHECK_ERROR(pthread_join(tid[i], (void **)(void*)&ret_val) != 0);
CHECK_ERROR(ret_val != 0);