summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-03-05 17:06:39 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-03-05 17:06:39 (GMT)
commit9abbdeaa66c70a00b6a7bedee9c76d2493a8e947 (patch)
tree4412536a98ccd371aba07260d173629ad84942a5 /src
parent7350db497be1c67102ffe5ac30e621720919dc38 (diff)
parent224cb4a03406ed72e02d026efeab47fdf7f6b33b (diff)
downloadhdf5-9abbdeaa66c70a00b6a7bedee9c76d2493a8e947.zip
hdf5-9abbdeaa66c70a00b6a7bedee9c76d2493a8e947.tar.gz
hdf5-9abbdeaa66c70a00b6a7bedee9c76d2493a8e947.tar.bz2
Merge pull request #2351 in HDFFV/hdf5 from ~DYOUNG/werror:b-bye-HDpthread_self to develop
* commit '224cb4a03406ed72e02d026efeab47fdf7f6b33b': Use a naked pthread_self() call in the HDF5 thread wrappers.
Diffstat (limited to 'src')
-rw-r--r--src/H5TS.c4
-rw-r--r--src/H5private.h4
2 files changed, 2 insertions, 6 deletions
diff --git a/src/H5TS.c b/src/H5TS.c
index 9503e05..b0cef7f 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -262,7 +262,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex)
if (ret_value)
return ret_value;
- if(mutex->lock_count && pthread_equal(HDpthread_self(), mutex->owner_thread)) {
+ if(mutex->lock_count && pthread_equal(pthread_self(), mutex->owner_thread)) {
/* already owned by self - increment count */
mutex->lock_count++;
} else {
@@ -271,7 +271,7 @@ H5TS_mutex_lock(H5TS_mutex_t *mutex)
pthread_cond_wait(&mutex->cond_var, &mutex->atomic_lock);
/* After we've received the signal, take ownership of the mutex */
- mutex->owner_thread = HDpthread_self();
+ mutex->owner_thread = pthread_self();
mutex->lock_count = 1;
}
diff --git a/src/H5private.h b/src/H5private.h
index 3759446..f570723 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1570,10 +1570,6 @@ extern char *strdup(const char *s);
#define HDstrdup(S) strdup(S)
#endif /* HDstrdup */
-#ifndef HDpthread_self
- #define HDpthread_self() pthread_self()
-#endif /* HDpthread_self */
-
/* Macro for "stringizing" an integer in the C preprocessor (use H5_TOSTRING) */
/* (use H5_TOSTRING, H5_STRINGIZE is just part of the implementation) */
#define H5_STRINGIZE(x) #x