Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 12, 2024
1 parent e55c15e commit edec810
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/H5TSpkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ typedef enum {

typedef struct H5TS_rec_rwlock_t {
/* General fields */
H5TS_mutex_t mutex;
H5TS_mutex_t mutex;
H5TS_rec_rwlock_type_t lock_type;

/* Writer fields */
Expand Down
2 changes: 1 addition & 1 deletion src/H5TSrec_rwlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ H5TS__rec_rwlock_rdlock(H5TS_rec_rwlock_t *lock)
if (H5_UNLIKELY(H5TS_key_create(&lock->rec_read_lock_count_key, free) < 0))
HGOTO_DONE(FAIL);
lock->is_key_registered = true;
count = NULL;
count = NULL;
}
else if (H5_UNLIKELY(H5TS_key_get_value(lock->rec_read_lock_count_key, (void **)&count) < 0))
HGOTO_DONE(FAIL);
Expand Down
82 changes: 41 additions & 41 deletions test/ttsafe_rec_rwlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ typedef struct rec_rwlock_test_udata_t {

/* thread control fields */
H5TS_rec_rwlock_t *lock;
int32_t target_rd_lock_cycles;
int32_t target_wr_lock_cycles;
int32_t max_recursive_lock_depth;
int32_t target_rd_lock_cycles;
int32_t target_wr_lock_cycles;
int32_t max_recursive_lock_depth;

/* thread stats fields */
int64_t read_locks_granted;
Expand Down Expand Up @@ -114,20 +114,20 @@ typedef struct rec_rwlock_test_udata_t {
static H5TS_THREAD_RETURN_TYPE
tts_rec_rwlock_smoke_check_test_thread(void *_udata)
{
hbool_t read;
int32_t rec_lock_depth = 0;
int32_t max_rec_lock_depth;
int32_t rd_locks_remaining;
int32_t wr_locks_remaining;
herr_t result;
H5TS_rec_rwlock_t *lock;
hbool_t read;
int32_t rec_lock_depth = 0;
int32_t max_rec_lock_depth;
int32_t rd_locks_remaining;
int32_t wr_locks_remaining;
herr_t result;
H5TS_rec_rwlock_t *lock;
rec_rwlock_test_udata_t *udata = (rec_rwlock_test_udata_t *)_udata;

assert(_udata);
rd_locks_remaining = udata->target_rd_lock_cycles;
wr_locks_remaining = udata->target_wr_lock_cycles;
max_rec_lock_depth = udata->max_recursive_lock_depth;
lock = udata->lock;
lock = udata->lock;

while (rd_locks_remaining > 0 || wr_locks_remaining > 0) {
if (wr_locks_remaining == 0)
Expand Down Expand Up @@ -547,17 +547,17 @@ tts_rec_rwlock_smoke_check_1(void)
void
tts_rec_rwlock_smoke_check_2(void)
{
herr_t result;
int express_test;
int i;
int num_threads = MAX_NUM_THREADS;
int lock_cycles = MAX_LOCK_CYCLES;
H5TS_thread_t threads[MAX_NUM_THREADS];
herr_t result;
int express_test;
int i;
int num_threads = MAX_NUM_THREADS;
int lock_cycles = MAX_LOCK_CYCLES;
H5TS_thread_t threads[MAX_NUM_THREADS];
rec_rwlock_test_udata_t *udata = NULL;
#if H5TS_ENABLE_REC_RWLOCK_STATS
hbool_t verbose = FALSE;
int32_t total_target_rd_lock_cycles = 0;
int32_t total_target_wr_lock_cycles = 0;
hbool_t verbose = FALSE;
int32_t total_target_rd_lock_cycles = 0;
int32_t total_target_wr_lock_cycles = 0;
H5TS_rec_rwlock_stats_t stats;
H5TS_rec_rwlock_stats_t expected;
#endif
Expand Down Expand Up @@ -601,7 +601,7 @@ tts_rec_rwlock_smoke_check_2(void)
/* 2) Setup the user data to be passed to each reader test thread. */
for (i = 0; i < MAX_NUM_THREADS; i++) {
memset(&udata[i], 0, sizeof(udata[i]));
udata[i].lock = &lock;
udata[i].lock = &lock;
udata[i].target_rd_lock_cycles = lock_cycles;
udata[i].max_recursive_lock_depth = 10;
}
Expand Down Expand Up @@ -753,17 +753,17 @@ tts_rec_rwlock_smoke_check_2(void)
void
tts_rec_rwlock_smoke_check_3(void)
{
herr_t result;
int i;
int express_test;
int num_threads = MAX_NUM_THREADS;
int lock_cycles = MAX_LOCK_CYCLES;
H5TS_thread_t threads[MAX_NUM_THREADS];
herr_t result;
int i;
int express_test;
int num_threads = MAX_NUM_THREADS;
int lock_cycles = MAX_LOCK_CYCLES;
H5TS_thread_t threads[MAX_NUM_THREADS];
rec_rwlock_test_udata_t *udata = NULL;
#if H5TS_ENABLE_REC_RWLOCK_STATS
hbool_t verbose = FALSE;
int32_t total_target_rd_lock_cycles = 0;
int32_t total_target_wr_lock_cycles = 0;
hbool_t verbose = FALSE;
int32_t total_target_rd_lock_cycles = 0;
int32_t total_target_wr_lock_cycles = 0;
H5TS_rec_rwlock_stats_t stats;
H5TS_rec_rwlock_stats_t expected;
#endif
Expand Down Expand Up @@ -807,7 +807,7 @@ tts_rec_rwlock_smoke_check_3(void)
/* 2) Setup the user data to be passed to each writer test thread. */
for (i = 0; i < MAX_NUM_THREADS; i++) {
memset(&udata[i], 0, sizeof(udata[i]));
udata[i].lock = &lock;
udata[i].lock = &lock;
udata[i].target_wr_lock_cycles = lock_cycles;
udata[i].max_recursive_lock_depth = 10;
}
Expand Down Expand Up @@ -959,17 +959,17 @@ tts_rec_rwlock_smoke_check_3(void)
void
tts_rec_rwlock_smoke_check_4(void)
{
herr_t result;
int i;
int express_test;
int num_threads = MAX_NUM_THREADS;
int lock_cycles = MAX_LOCK_CYCLES;
H5TS_thread_t threads[MAX_NUM_THREADS];
herr_t result;
int i;
int express_test;
int num_threads = MAX_NUM_THREADS;
int lock_cycles = MAX_LOCK_CYCLES;
H5TS_thread_t threads[MAX_NUM_THREADS];
rec_rwlock_test_udata_t *udata = NULL;
#if H5TS_ENABLE_REC_RWLOCK_STATS
hbool_t verbose = FALSE;
int32_t total_target_rd_lock_cycles = 0;
int32_t total_target_wr_lock_cycles = 0;
hbool_t verbose = FALSE;
int32_t total_target_rd_lock_cycles = 0;
int32_t total_target_wr_lock_cycles = 0;
H5TS_rec_rwlock_stats_t stats;
H5TS_rec_rwlock_stats_t expected;
#endif
Expand Down Expand Up @@ -1013,7 +1013,7 @@ tts_rec_rwlock_smoke_check_4(void)
/* 2) Setup the user data to be passed to each writer test thread. */
for (i = 0; i < MAX_NUM_THREADS; i++) {
memset(&udata[i], 0, sizeof(udata[i]));
udata[i].lock = &lock;
udata[i].lock = &lock;
udata[i].target_rd_lock_cycles = lock_cycles;
udata[i].target_wr_lock_cycles = lock_cycles;
udata[i].max_recursive_lock_depth = 10;
Expand Down

0 comments on commit edec810

Please sign in to comment.