summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-01-14 19:44:28 (GMT)
committerGitHub <noreply@github.com>2021-01-14 19:44:28 (GMT)
commita1091585ad897ee93ffcb0ba435fa4930a1e8572 (patch)
tree0050b92cfc42a9965b944c6a159bc5bdf84e3c9e /src
parent0d8529055da9ab23162e698309cc6da1dd93f99e (diff)
downloadhdf5-a1091585ad897ee93ffcb0ba435fa4930a1e8572.zip
hdf5-a1091585ad897ee93ffcb0ba435fa4930a1e8572.tar.gz
hdf5-a1091585ad897ee93ffcb0ba435fa4930a1e8572.tar.bz2
Fixes naked pthread usage in H5TS code added for async (#260)
Diffstat (limited to 'src')
-rw-r--r--src/H5TS.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5TS.c b/src/H5TS.c
index 09caf51..732f41c 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -472,9 +472,9 @@ herr_t H5TS_mutex_lock(H5TS_mutex_t *mutex)
/* Release the library lock */
ret_value = HDpthread_mutex_unlock(&mutex->atomic_lock);
-#endif /* H5_HAVE_WIN_THREADS */
done:
+#endif /* H5_HAVE_WIN_THREADS */
FUNC_LEAVE_NOAPI_NAMECHECK_ONLY(ret_value)
} /* end H5TS_mutex_lock() */
@@ -527,9 +527,9 @@ H5TS__mutex_unlock(H5TS_mutex_t *mutex, unsigned int *lock_count)
if (err != 0)
ret_value = err;
} /* end if */
-#endif /* H5_HAVE_WIN_THREADS */
done:
+#endif /* H5_HAVE_WIN_THREADS */
FUNC_LEAVE_NOAPI_NAMECHECK_ONLY(ret_value)
} /* H5TS__mutex_unlock */
@@ -582,9 +582,9 @@ H5TS_mutex_unlock(H5TS_mutex_t *mutex)
if (err != 0)
ret_value = err;
} /* end if */
-#endif /* H5_HAVE_WIN_THREADS */
done:
+#endif /* H5_HAVE_WIN_THREADS */
FUNC_LEAVE_NOAPI_NAMECHECK_ONLY(ret_value)
} /* H5TS_mutex_unlock */
@@ -608,6 +608,9 @@ H5TSmutex_get_attempt_count(unsigned int *count)
FUNC_ENTER_API_NAMECHECK_ONLY
/*NO TRACE*/
+#ifdef H5_HAVE_WIN_THREADS
+ /* Add Win32 equivalent here when async is supported */
+#else /* H5_HAVE_WIN_THREADS */
ret_value = HDpthread_mutex_lock(&H5_g.init_lock.atomic_lock2);
if (ret_value)
HGOTO_DONE(ret_value);
@@ -619,6 +622,7 @@ H5TSmutex_get_attempt_count(unsigned int *count)
HGOTO_DONE(ret_value);
done:
+#endif /* H5_HAVE_WIN_THREADS */
FUNC_LEAVE_API_NAMECHECK_ONLY(ret_value)
} /* end H5TSmutex_get_attempt_count() */
@@ -719,9 +723,9 @@ H5TS_cancel_count_inc(void)
* previous cancellation state until the final API routine is returning.
*/
++cancel_counter->cancel_count;
-#endif /* H5_HAVE_WIN_THREADS */
done:
+#endif /* H5_HAVE_WIN_THREADS */
FUNC_LEAVE_NOAPI_NAMECHECK_ONLY(ret_value)
} /* end H5TS_cancel_count_inc() */