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 Mar 20, 2024
1 parent 6d9e35d commit 2a5a831
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
struct hg_thread_pool_private {
struct hg_thread_pool pool;
unsigned int thread_count;
H5TS_thread_t *threads;
H5TS_thread_t *threads;
};

/********************/
Expand Down
4 changes: 2 additions & 2 deletions src/H5FDsubfiling/mercury/src/util/mercury_thread_pool.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ typedef struct hg_thread_pool hg_thread_pool_t;
struct hg_thread_pool {
unsigned int sleeping_worker_count;
HG_QUEUE_HEAD(hg_thread_work) queue;
int shutdown;
int shutdown;
H5TS_mutex_t mutex;
H5TS_cond_t cond;
};

struct hg_thread_work {
H5TS_thread_start_func_t func;
void *args;
void *args;
HG_QUEUE_ENTRY(hg_thread_work) entry; /* Internal */
};

Expand Down
2 changes: 1 addition & 1 deletion src/H5FDsubfiling/mercury/src/util/mercury_util_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#ifdef _WIN32
#define _WINSOCKAPI_
#include <windows.h>
typedef DWORD hg_thread_ret_t;
typedef DWORD hg_thread_ret_t;
#define HG_THREAD_RETURN_TYPE hg_thread_ret_t WINAPI
#else
#include <pthread.h>
Expand Down
4 changes: 2 additions & 2 deletions src/H5TSint.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ H5TS_key_t H5TS_thrd_info_key_g;
/*******************/

/* Has threadsafety code been initialized? */
static H5TS_once_t H5TS_first_init_s = H5TS_ONCE_INITIALIZER;
static H5TS_once_t H5TS_first_init_s = H5TS_ONCE_INITIALIZER;

/* Pointer to first free thread info record or NULL. */
static H5TS_tinfo_node_t *H5TS_tinfo_next_free_s = NULL;
static uint64_t H5TS_next_thrd_id_s = 0;

/* Mutex for access to H5TS_tinfo_next_free_s and H5TS_next_thrd_id_s */
static H5TS_mutex_t H5TS_tinfo_mtx_s = H5TS_MUTEX_INITIALIZER;
static H5TS_mutex_t H5TS_tinfo_mtx_s = H5TS_MUTEX_INITIALIZER;

/*-------------------------------------------------------------------------
* Function: H5TS_term_package
Expand Down
1 change: 0 additions & 1 deletion src/H5TSpkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
/* Package Private Macros */
/**************************/


/****************************/
/* Package Private Typedefs */
/****************************/
Expand Down
13 changes: 6 additions & 7 deletions src/H5TSprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ typedef void (*H5TS_key_destructor_func_t)(void *);

/* Portability aliases */
#ifdef H5_HAVE_WIN_THREADS
typedef HANDLE H5TS_thread_t;
typedef HANDLE H5TS_thread_t;
typedef LPTHREAD_START_ROUTINE H5TS_thread_start_func_t;
typedef DWORD H5TS_key_t;
typedef CRITICAL_SECTION H5TS_CAPABILITY("mutex") H5TS_mutex_t;
typedef CONDITION_VARIABLE H5TS_cond_t;
typedef PINIT_ONCE H5TS_once_t;
typedef DWORD H5TS_key_t;
typedef CRITICAL_SECTION H5TS_CAPABILITY("mutex") H5TS_mutex_t;
typedef CONDITION_VARIABLE H5TS_cond_t;
typedef PINIT_ONCE H5TS_once_t;
#else
typedef pthread_t H5TS_thread_t;
typedef pthread_t H5TS_thread_t;
typedef void *(*H5TS_thread_start_func_t)(void *);
typedef pthread_key_t H5TS_key_t;
typedef pthread_mutex_t H5TS_CAPABILITY("mutex") H5TS_mutex_t;
Expand Down Expand Up @@ -138,7 +138,6 @@ H5_DLL herr_t H5TS_key_delete(H5TS_key_t key);
H5_DLL herr_t H5TS_thread_create(H5TS_thread_t *thread, H5TS_thread_start_func_t func, void *udata);
H5_DLL herr_t H5TS_thread_join(H5TS_thread_t thread);


#else /* H5_HAVE_THREADSAFE */

/* Non-threadsafe code needs this */
Expand Down
2 changes: 1 addition & 1 deletion test/ttsafe_develop.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ tts_develop_api(void)

/* Create the threads */
udata.barrier = &barrier;
result = H5TS_thread_create(&thread_1, tts_develop_api_thr_1, &udata);
result = H5TS_thread_create(&thread_1, tts_develop_api_thr_1, &udata);
CHECK_I(result, "H5TS_thread_create");
result = H5TS_thread_create(&thread_2, tts_develop_api_thr_2, &udata);
CHECK_I(result, "H5TS_thread_create");
Expand Down

0 comments on commit 2a5a831

Please sign in to comment.