From d25f23805c6d7128b508a359d47af136dd2fd0db Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Mon, 11 Aug 2025 10:22:56 +0200 Subject: Wrapped pthread use in custom API --- src/solvers/distribution.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/solvers/distribution.h') diff --git a/src/solvers/distribution.h b/src/solvers/distribution.h index 27b72d7..4cb7157 100644 --- a/src/solvers/distribution.h +++ b/src/solvers/distribution.h @@ -43,7 +43,7 @@ getdistribution( const tableinfo_t info[static 1] ) { getdistribution_data_t targ[THREADS]; - pthread_t thread[THREADS]; + wrapthread_define_var_thread_t(thread[THREADS]); uint8_t pval, k; uint64_t local_distr[THREADS][INFO_DISTRIBUTION_LEN]; uint64_t i, j, nbytes, sz, epb; @@ -60,12 +60,12 @@ getdistribution( .distr = local_distr[i], .table = table, }; - pthread_create(&thread[i], NULL, + wrapthread_create(&thread[i], NULL, getdistribution_runthread, &targ[i]); } for (i = 0; i < THREADS; i++) - pthread_join(thread[i], NULL); + wrapthread_join(thread[i], NULL); memset(distr, 0, INFO_DISTRIBUTION_LEN * sizeof(uint64_t)); for (i = 0; i < THREADS; i++) -- cgit v1.3