Skip to content

Commit

Permalink
Delete old "exclusive" lock ahd switch to a recursive mutex.
Browse files Browse the repository at this point in the history
Signed-off-by: Quincey Koziol <[email protected]>
  • Loading branch information
qkoziol committed Mar 27, 2024
1 parent 5cd90fa commit 932fa5e
Show file tree
Hide file tree
Showing 11 changed files with 62 additions and 390 deletions.
1 change: 0 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,6 @@ set (H5TS_SOURCES
${HDF5_SRC_DIR}/H5TSbarrier.c
${HDF5_SRC_DIR}/H5TSc11.c
${HDF5_SRC_DIR}/H5TScond.c
${HDF5_SRC_DIR}/H5TSexlock.c
${HDF5_SRC_DIR}/H5TSint.c
${HDF5_SRC_DIR}/H5TSkey.c
${HDF5_SRC_DIR}/H5TSmutex.c
Expand Down
2 changes: 1 addition & 1 deletion src/H5FDsubfiling/H5FDioc_threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ ioc_io_queue_dispatch_eligible_entries(ioc_data_t *ioc_data, bool try_lock)
bool acquired;
herr_t ret;

ret = H5TS_mutex_try_lock(&ioc_data->io_queue.q_mutex, &acquired);
ret = H5TS_mutex_trylock(&ioc_data->io_queue.q_mutex, &acquired);
assert(SUCCEED == ret);
if (!acquired)
return;
Expand Down
3 changes: 2 additions & 1 deletion src/H5TS.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ H5TSmutex_acquire(unsigned lock_count, bool *acquired)

FUNC_ENTER_API_NAMECHECK_ONLY

/* Acquire the "attempt" lock */
/* Acquire the "API" lock */
if (H5_UNLIKELY(H5TS__mutex_acquire(lock_count, acquired) < 0))
HGOTO_DONE(FAIL);

Expand Down Expand Up @@ -131,6 +131,7 @@ H5TSmutex_release(unsigned *lock_count)

FUNC_ENTER_API_NAMECHECK_ONLY

/* Release the "API" lock */
*lock_count = 0;
if (H5_UNLIKELY(H5TS__mutex_release(lock_count) < 0))
ret_value = FAIL;
Expand Down
334 changes: 0 additions & 334 deletions src/H5TSexlock.c

This file was deleted.

Loading

0 comments on commit 932fa5e

Please sign in to comment.