Skip to content

Commit

Permalink
Align portable emulation of thread barriers w/phtread_barrier_*
Browse files Browse the repository at this point in the history
Signed-off-by: Quincey Koziol <[email protected]>
  • Loading branch information
qkoziol committed Apr 14, 2024
1 parent 0b5c871 commit d56765f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/H5TSbarrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
*--------------------------------------------------------------------------
*/
herr_t
H5TS__barrier_init(H5TS_barrier_t *barrier, uint64_t count)
H5TS__barrier_init(H5TS_barrier_t *barrier, unsigned count)
{
herr_t ret_value = SUCCEED;

Expand Down Expand Up @@ -104,7 +104,7 @@ H5TS__barrier_init(H5TS_barrier_t *barrier, uint64_t count)
* Purpose: Wait at a barrier.
*
* Note: Similar to pthread_barrier_wait, a barrier may be re-used
* multiple times without intervening calls to H5TS_barrier_init.
* multiple times without intervening calls to H5TS__barrier_init.
*
* Return: Non-negative on success / Negative on failure
*
Expand Down
8 changes: 4 additions & 4 deletions src/H5TSprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ typedef pthread_barrier_t H5TS_barrier_t;
typedef struct H5TS_barrier_t {
H5TS_mutex_t mutex;
H5TS_cond_t cv;
uint64_t count;
uint64_t entered;
uint64_t threshold;
unsigned count;
unsigned entered;
unsigned threshold;
} H5TS_barrier_t;
#endif

Expand Down Expand Up @@ -249,7 +249,7 @@ H5_DLL void H5TS_atomic_destroy_uint(H5TS_atomic_uint_t *obj);
#endif /* H5_HAVE_STDATOMIC_H */

/* Barrier related function declarations */
H5_DLL herr_t H5TS__barrier_init(H5TS_barrier_t *barrier, uint64_t count);
H5_DLL herr_t H5TS__barrier_init(H5TS_barrier_t *barrier, unsigned count);
H5_DLL herr_t H5TS__barrier_wait(H5TS_barrier_t *barrier);
H5_DLL herr_t H5TS__barrier_destroy(H5TS_barrier_t *barrier);

Expand Down

0 comments on commit d56765f

Please sign in to comment.