Dana Robinson
30678596f2
Windows thread-safe fixes from develop
2020-08-14 08:42:39 -07:00
Allen Byrne
2c78a1930b
Whitespace updates
2020-05-13 09:15:29 -05:00
David Young
f0485413e0
Complete the comment on thread_main(), explaining why the barrier is used.
2020-05-11 15:34:44 -05:00
David Young
c149f4ca16
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.
2020-05-11 15:34:31 -05:00
David Young
e5f459d86d
Test the right condition for the EBUSY return in pthread_barrier_destroy().
2020-05-11 15:34:22 -05:00
David Young
99034ad9ad
s/exit_failure/EXIT_FAILURE/g
2020-05-11 15:34:05 -05:00
David Young
4d6c96bdf5
Implement pthread_barrier(3) for Darwin using a counter, condition variable,
...
and mutex. Untested.
2020-05-11 15:34:05 -05:00
David Young
0952346c79
Use HD prefix.
2020-05-11 15:33:40 -05:00
David Young
d7412b7e88
Provide local copies of err(3)- and errx(3)-alike functions
...
for Visual Studio compatibility.
2020-05-11 15:33:33 -05:00
David Young
efca0c7f56
Oops, the test has to return success in the unimplemented case.
2020-05-11 15:33:22 -05:00
David Young
c0fa07fd9f
src/H5Eint.c: #include H5TSprivate.h for H5TS_thread_id() definitions.
...
test/thread_id.c: move threads_failure() inside #ifdefs.
2020-05-11 15:32:40 -05:00
David Young
524af38af8
Change thread IDs to uint64_t from unsigned long, per Quincey's suggestion.
...
Fix a typo in the H5TS_thread_init() comment and reword some ID
properties.
2020-05-06 15:37:42 -05:00
David Young
763d7a778e
Replace pthread_self_ulong() with H5TS_thread_id(). The POSIX Threads
...
implementation ought to be portable to any system that has POSIX
Threads. On Windows, I use the same API call as before.
2020-05-06 15:37:14 -05:00