Merge pull request #2575 in HDFFV/hdf5 from ~DYOUNG/werror:fix-thread_id-1_12 to hdf5_1_12
* commit 'f0485413e02ebf1117e5b1725f32534e7e26b622':
Complete the comment on thread_main(), explaining why the barrier is used.
The first implementation seemed to allow for the possibility that a thread could block at the barrier, wake and exit the barrier, re-acquire the barrier lock and increase `nentered` before the other blocked threads woke and checked `nentered % count == 0`. Then the other blocked threads would check `nentered % count == 0` and, finding it false, go back to sleep in the barrier. This new implementation waits for a looser condition to obtain so that threads don't go back to sleep in the barrier.
Test the right condition for the EBUSY return in pthread_barrier_destroy().
s/exit_failure/EXIT_FAILURE/g
Implement pthread_barrier(3) for Darwin using a counter, condition variable, and mutex. Untested.
Use HD prefix.
Provide local copies of err(3)- and errx(3)-alike functions for Visual Studio compatibility.
Oops, the test has to return success in the unimplemented case.
src/H5Eint.c: #include H5TSprivate.h for H5TS_thread_id() definitions.
Remove tongue-in-cheek credit for Rusty Shackleford and Dale Alvin Gribble.
Follow HDF5 conventions.
Make sure that H5TS_thread_id() is available as either a function or a macro in all configurations.
Use a naked pthread_self() call in the HDF5 thread wrappers.
If H5_HAVE_THREADSAFE is not #defined, define nothing but a stub implementation of H5TS_thread_id().