MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / __libcpp_contention_notify

Function __libcpp_contention_notify

system/lib/libcxx/src/atomic.cpp:138–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136 the same atomic, we try to detect contention to avoid spuriously calling the platform. */
137
138static void __libcpp_contention_notify(__cxx_atomic_contention_t volatile* __contention_state,
139 __cxx_atomic_contention_t const volatile* __platform_state,
140 bool __notify_one) {
141 if (0 != __cxx_atomic_load(__contention_state, memory_order_seq_cst))
142 // We only call 'wake' if we consumed a contention bit here.
143 __libcpp_platform_wake_by_address(__platform_state, __notify_one);
144}
145static __cxx_contention_t
146__libcpp_contention_monitor_for_wait(__cxx_atomic_contention_t volatile* /*__contention_state*/,
147 __cxx_atomic_contention_t const volatile* __platform_state) {

Callers 3

__libcpp_atomic_notifyFunction · 0.85
__cxx_atomic_notify_oneFunction · 0.85
__cxx_atomic_notify_allFunction · 0.85

Calls 2

__cxx_atomic_loadFunction · 0.85

Tested by

no test coverage detected