std1.0.0-beta-7 SafeC docs

std :: atomic

Function std::atomic_cas_int

#include <std/atomic.h> source ยท definition

int atomic_cas_int(&int addr, &int expected, int desired)

CAS: if *addr == expected, store desired and return 1; else update *expected to the current value and return 0.