MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / atomic_exchange_ptr

Function atomic_exchange_ptr

3rd/mimalloc-2.0.9/test/test-stress.c:303–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303static void* atomic_exchange_ptr(volatile void** p, void* newval) {
304#if (INTPTR_MAX == INT32_MAX)
305 return (void*)InterlockedExchange((volatile LONG*)p, (LONG)newval);
306#else
307 return (void*)InterlockedExchange64((volatile LONG64*)p, (LONG64)newval);
308#endif
309}
310#else
311
312#include <pthread.h>

Callers 3

stressFunction · 0.85
test_stressFunction · 0.85
leakFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected