include/atomic_support.h already handles case for _LIBCPP_HAS_NO_THREADS.
This patch reverts r307595, changes sync_* to libcpp_atomic_*, and adds a wrapper function for __atomic_exchange.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Why the additional inclusion of the support in the files which are not modified to use functions? (e.g. src/stdexcept.cpp). LG otherwise.
src/include/atomic_support.h | ||
---|---|---|
150 ↗ | (On Diff #110041) | Really annoying that you can't immediately tell that this is in the _LIBCPP_NO_THREADS case, and thus the atomicity is not required. |
Comment Actions
Moved the inclusion from stdexcept.cpp into refstring.h
For exception.cpp and new.cpp, I think it's better to keep the inclusion there. Those files include new_handler_fallback.ipp, exception_fallback.ipp, which need the header file. Including it in those .ipp requires relative path as "../../include/atomic_support.h" and I tried to avoid that.
src/include/atomic_support.h | ||
---|---|---|
153 ↗ | (On Diff #115891) | Initialize old on the same line it's declared on. |