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

Function __libcpp_contention_state

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

Source from the content-addressed store, hash-verified

129static hash<void const volatile*> __libcpp_contention_hasher;
130
131static __libcpp_contention_table_entry* __libcpp_contention_state(void const volatile* p) {
132 return &__libcpp_contention_table[__libcpp_contention_hasher(p) & (__libcpp_contention_table_size - 1)];
133}
134
135/* Given an atomic to track contention and an atomic to actually wait on, which may be
136 the same atomic, we try to detect contention to avoid spuriously calling the platform. */

Calls

no outgoing calls

Tested by

no test coverage detected