[libc] add more APIs of cmgxchg variants by SchrodingerZhu · Pull Request #91208 · llvm/llvm-project (original) (raw)

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

Changes

Such APIs are useful in lock implementations


Full diff: https://github.com/llvm/llvm-project/pull/91208.diff

1 Files Affected:

diff --git a/libc/src/__support/CPP/atomic.h b/libc/src/__support/CPP/atomic.h index 5e428940565b99..e273d998c07029 100644 --- a/libc/src/__support/CPP/atomic.h +++ b/libc/src/__support/CPP/atomic.h @@ -101,6 +101,36 @@ template struct Atomic { int(mem_ord), int(mem_ord)); }