[libcxx-commits] [libcxx] [libc++] Allows any types of size 4 and 8 to use native platform ulock_wait (PR #161086)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Nov 2 05:45:32 PST 2025


================
@@ -70,42 +77,97 @@ __libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
 _LIBCPP_EXPORTED_FROM_ABI void
 __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) _NOEXCEPT;
 
+// new dylib interface
+_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t
+__libcpp_atomic_monitor_global(void const volatile* __address) _NOEXCEPT;
----------------
huixie90 wrote:

I added `volatile` in the new API simply because the old API also has `volatile`. Thinking it a bit more, perhaps the reason why we had `volatile` in the old API perhaps because it wanted to allow the inputs to be a `volatile` object?

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


More information about the libcxx-commits mailing list