diff options
Diffstat (limited to 'src/H5TSprivate.h')
-rw-r--r-- | src/H5TSprivate.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/H5TSprivate.h b/src/H5TSprivate.h index a153425..700d879 100644 --- a/src/H5TSprivate.h +++ b/src/H5TSprivate.h @@ -24,6 +24,7 @@ #ifndef H5TSprivate_H_ #define H5TSprivate_H_ +#ifdef H5_HAVE_THREADSAFE /* Public headers needed by this file */ #ifdef LATER #include "H5TSpublic.h" /*Public API prototypes */ @@ -66,6 +67,8 @@ H5_DLL void H5TS_win32_process_exit(void); H5_DLL herr_t H5TS_win32_thread_enter(void); H5_DLL herr_t H5TS_win32_thread_exit(void); +#define H5TS_thread_id() ((uint64_t)GetCurrentThreadId()) + #else /* H5_HAVE_WIN_THREADS */ /* Library level data structures */ @@ -98,6 +101,7 @@ 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) +H5_DLL uint64_t H5TS_thread_id(void); #endif /* H5_HAVE_WIN_THREADS */ @@ -105,6 +109,7 @@ typedef pthread_once_t H5TS_once_t; extern H5TS_once_t H5TS_first_init_g; extern H5TS_key_t H5TS_errstk_key_g; extern H5TS_key_t H5TS_funcstk_key_g; +extern H5TS_key_t H5TS_apictx_key_g; #if defined c_plusplus || defined __cplusplus extern "C" { @@ -121,4 +126,10 @@ H5_DLL H5TS_thread_t H5TS_create_thread(void *(*func)(void *), H5TS_attr_t *attr } #endif /* c_plusplus || __cplusplus */ +#else /* H5_HAVE_THREADSAFE */ + +#define H5TS_thread_id() ((uint64_t)0) + +#endif /* H5_HAVE_THREADSAFE */ + #endif /* H5TSprivate_H_ */ |