On platforms with _LIBCPP_NO_NATIVE_SEMAPHORES, try_acquire blocks instead of returning false.
This is because libcpp_thread_poll_with_backoff interprets zero as meaning infinite, causing try_acquire to wait indefinitely when atomic_semaphore_base is used.
So __libcpp_thread_poll_with_backoff treats 0=infinite, but __libcpp_semaphore_wait_timed (line 167) treats 0=0? That sounds like a recipe for bugs. Is there any appetite to just make libc++ treat 0=0 uniformly across the board?
(Then, if someone wants to wait for a billion seconds, they just pass 1000000000 as the timeout — I don't see any practical need to overload 0 with that extra meaning.)