Support for thread sanitizer builds on macOS
Thread sanitizer builds normally use pthread_barrier instead of uv_barrier in order to get a sanitized implementation. However, macOS lacks pthread_barrier, so now tsan builds on macOS use uv_barrier like normal builds, assuming that libuv has been built with tsan support so that thread sanitizer can see inside it.
Edited by Tony Finch