I would prefer design when we have a platform_semaphore_base
that is defined only if _GLIBCXX_HAVE_PLATFORM_WAIT,
and semaphore_base.
For the platform_semaphore, this could you binary_semaphore code, with two
modification:
static constexpr ptrdiff_t _S_max = _Binary ? 1 :
numeric_limits::Max;
When the semaphore counter is __platform_wait_t we can use the simpler
atomic waiting functions that just take a value and wait for it to
change, instead of using an accessor function and a predicate to fetch
and compare the value.
Because the simpler value-based waiting functions don't return the