Skip to content

Commit

Permalink
Correct some atomics issues
Browse files Browse the repository at this point in the history
Signed-off-by: Quincey Koziol <[email protected]>
  • Loading branch information
qkoziol committed Oct 31, 2024
1 parent 87d91c1 commit 473cebc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/H5FL.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
* Default limits on how much memory can accumulate on each free list before
* it is garbage collected.
*/
#ifdef H5_HAVE_CONCURRENCY
#ifdef H5_HAVE_THREADS
static bool H5TS_limits_init = false;
static H5TS_atomic_size_t H5FL_reg_glb_mem_lim;
static H5TS_atomic_size_t H5FL_reg_lst_mem_lim;
Expand All @@ -84,7 +84,7 @@ static H5TS_atomic_size_t H5FL_blk_glb_mem_lim;
static H5TS_atomic_size_t H5FL_blk_lst_mem_lim;
static H5TS_atomic_size_t H5FL_fac_glb_mem_lim;
static H5TS_atomic_size_t H5FL_fac_lst_mem_lim;
#else /* H5_HAVE_CONCURRENCY */
#else /* H5_HAVE_THREADS */
static size_t H5FL_reg_glb_mem_lim = H5FL_REG_GLB_MEM_LIM;
static size_t H5FL_reg_lst_mem_lim = H5FL_REG_LST_MEM_LIM;
static size_t H5FL_arr_glb_mem_lim = H5FL_ARR_GLB_MEM_LIM;
Expand All @@ -93,7 +93,7 @@ static size_t H5FL_blk_glb_mem_lim = H5FL_BLK_GLB_MEM_LIM;
static size_t H5FL_blk_lst_mem_lim = H5FL_BLK_LST_MEM_LIM;
static size_t H5FL_fac_glb_mem_lim = H5FL_FAC_GLB_MEM_LIM;
static size_t H5FL_fac_lst_mem_lim = H5FL_FAC_LST_MEM_LIM;
#endif /* H5_HAVE_CONCURRENCY */
#endif /* H5_HAVE_THREADS */

/* A garbage collection node for regular free lists */
typedef struct H5FL_reg_gc_node_t {
Expand Down Expand Up @@ -145,7 +145,7 @@ typedef struct H5FL_blk_gc_list_t {
bool init; /* Whether the mutex has been initialized */
H5TS_dlftt_mutex_t mutex; /* Guard access to the list of free lists */
#endif /* H5_HAVE_CONCURRENCY */
size_t mem_freed; /* Amount of free memory on list */
H5TS_atomic_size_t mem_freed; /* Amount of free memory on list */
struct H5FL_blk_gc_node_t *first; /* Pointer to the first node in the list of things to garbage collect */
} H5FL_blk_gc_list_t;

Expand Down

0 comments on commit 473cebc

Please sign in to comment.