MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / atomic_add32

Function atomic_add32

vm/ByteCodeTranslator/src/rpmalloc.c:167–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167static FORCEINLINE int32_t
168atomic_add32(atomic32_t* val, int32_t add) {
169#ifdef _MSC_VER
170 int32_t old = (int32_t)_InterlockedExchangeAdd((volatile long*)&val->nonatomic, add);
171 return (old + add);
172#else
173 return __sync_add_and_fetch(&val->nonatomic, add);
174#endif
175}
176
177static FORCEINLINE void*
178atomic_load_ptr(atomicptr_t* src) {

Callers 3

rpmalloc_thread_finalizeFunction · 0.85
_memory_mapFunction · 0.85
_memory_unmapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected