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

Function emscripten_atomic_add_u8

system/include/emscripten/atomic.h:113–115  ·  view source on GitHub ↗

Each of the functions below (add, sub, and, or, xor) return the value that was in the memory location before the operation occurred.

Source from the content-addressed store, hash-verified

111// Each of the functions below (add, sub, and, or, xor) return the value that
112// was in the memory location before the operation occurred.
113_EM_INLINE uint8_t emscripten_atomic_add_u8(void /*uint8_t*/* _Nonnull addr, uint8_t val) {
114 return __c11_atomic_fetch_add((_Atomic uint8_t*)addr, val, __ATOMIC_SEQ_CST);
115}
116_EM_INLINE uint16_t emscripten_atomic_add_u16(void /*uint16_t*/* _Nonnull addr, uint16_t val) {
117 return __c11_atomic_fetch_add((_Atomic uint16_t*)addr, val, __ATOMIC_SEQ_CST);
118}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68