diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2021-03-03 20:15:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 20:15:55 (GMT) |
commit | e65814bf8eda709b27a60fe3e396a22e4bc34864 (patch) | |
tree | c9f9cc67a4dd93453cc4bf7054b5a8192e663337 /src/H5TSprivate.h | |
parent | c14fa9cebf58213bc4e2c0ac87e520c473e14071 (diff) | |
download | hdf5-e65814bf8eda709b27a60fe3e396a22e4bc34864.zip hdf5-e65814bf8eda709b27a60fe3e396a22e4bc34864.tar.gz hdf5-e65814bf8eda709b27a60fe3e396a22e4bc34864.tar.bz2 |
1 10 merges from develop (#419)
* HDFFV-10865 - merge from dev, HDFArray perf fix.
* Remove duplicate setting
* Whitespace changes after clang format
* Undo version 11 clang format changes
* Merge CMake changes from develop
* test testing script merge from develop
* Update supported platforms
* PR#3 merge from develop
* Merge gcc 10 diagnostics option from develop
* Merge #318 OSX changes from develop
* Merge small changes from develop
* Minor non-space formatting changes
* #386 copyright corrections for java folder
* Merges from develop
#358 patches from vtk
#361 fix header guard spelling
* Merge updates
#358 patches from vtk
#361 fix header guard spelling
* format fix
* Fix missing underscore and make H5public.h closer to dev
Diffstat (limited to 'src/H5TSprivate.h')
-rw-r--r-- | src/H5TSprivate.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index a0cb353..3c81f26 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -27,7 +27,7 @@ #ifdef H5_HAVE_THREADSAFE /* Public headers needed by this file */ #ifdef LATER -#include "H5TSpublic.h" /*Public API prototypes */ +#include "H5TSpublic.h" /* Public API prototypes */ #endif /* LATER */ #ifdef H5_HAVE_WIN_THREADS @@ -38,6 +38,8 @@ typedef struct H5TS_mutex_struct { CRITICAL_SECTION CriticalSection; } H5TS_mutex_t; + +/* Portability wrappers around Windows Threads types */ typedef CRITICAL_SECTION H5TS_mutex_simple_t; typedef HANDLE H5TS_thread_t; typedef HANDLE H5TS_attr_t; @@ -50,7 +52,7 @@ typedef INIT_ONCE H5TS_once_t; #define H5TS_SCOPE_PROCESS 0 #define H5TS_CALL_CONV WINAPI -/* Functions */ +/* Portability function aliases */ #define H5TS_get_thread_local_value(key) TlsGetValue(key) #define H5TS_set_thread_local_value(key, value) TlsSetValue(key, value) #define H5TS_attr_init(attr_ptr) 0 @@ -80,6 +82,8 @@ typedef struct H5TS_mutex_struct { pthread_cond_t cond_var; /* condition variable */ unsigned int lock_count; } H5TS_mutex_t; + +/* Portability wrappers around pthread types */ typedef pthread_t H5TS_thread_t; typedef pthread_attr_t H5TS_attr_t; typedef pthread_mutex_t H5TS_mutex_simple_t; @@ -91,7 +95,7 @@ typedef pthread_once_t H5TS_once_t; #define H5TS_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS #define H5TS_CALL_CONV /* unused - Windows only */ -/* Functions */ +/* Portability function aliases */ #define H5TS_get_thread_local_value(key) pthread_getspecific(key) #define H5TS_set_thread_local_value(key, value) pthread_setspecific(key, value) #define H5TS_attr_init(attr_ptr) pthread_attr_init((attr_ptr)) @@ -101,6 +105,8 @@ typedef pthread_once_t H5TS_once_t; #define H5TS_mutex_init(mutex) pthread_mutex_init(mutex, NULL) #define H5TS_mutex_lock_simple(mutex) pthread_mutex_lock(mutex) #define H5TS_mutex_unlock_simple(mutex) pthread_mutex_unlock(mutex) + +/* Pthread-only routines */ H5_DLL uint64_t H5TS_thread_id(void); #endif /* H5_HAVE_WIN_THREADS */ |