diff --git a/libc/src/__support/CPP/atomic.h b/libc/src/__support/CPP/atomic.h index 5514062525cce1..495d492a0b7c61 100644 --- a/libc/src/__support/CPP/atomic.h +++ b/libc/src/__support/CPP/atomic.h @@ -86,6 +86,10 @@ template struct Atomic { return __atomic_fetch_add(&val, increment, int(mem_ord)); } + T fetch_or(T mask, MemoryOrder mem_ord = MemoryOrder::SEQ_CST) { + return __atomic_fetch_or(&val, mask, int(mem_ord)); + } + T fetch_sub(T decrement, MemoryOrder mem_ord = MemoryOrder::SEQ_CST) { return __atomic_fetch_sub(&val, decrement, int(mem_ord)); }