[libcxx-commits] [libcxx] [libc++] fix `counting_semaphore` lost wakeups (PR #79265)

Jan Kokemüller via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 4 05:48:26 PST 2024


jiixyj wrote:


> I would then greatly encourage refactorings both in the implementation of `barrier`, `latch` & al, and also in the implementation of `__cxx_atomic_wait`, which is really brittle right now. But I would suggest tackling those as separate patches that would aim not to change the functionality in major ways.
> 
> I am fine with having the code in an intermediate state that we're not happy refactoring-wise, since these issues are complex enough that it's worth compartmenting how we tackle them (functional change + follow-up refactor).

Sounds good! For `__cxx_atomic_wait`, I just opened a follow up PR: https://github.com/llvm/llvm-project/pull/80596

Even though the `__cxx_atomic_wait` function might lose its importance after the refactorings to `semaphore` and `latch` suggested by @huixie90 , I think it's still valueable to have its semantics made clearer and its implementation made more correct.

https://github.com/llvm/llvm-project/pull/79265


More information about the libcxx-commits mailing list