diff options
| author | Ivan Maidanski <ivmai@mail.ru> | 2011-07-25 13:50:29 +0400 |
|---|---|---|
| committer | Ivan Maidanski <ivmai@mail.ru> | 2011-07-25 13:50:29 +0400 |
| commit | 8b263c956bffa5a42c166e96e4fe35218d7c64b3 (patch) | |
| tree | fed864df04740b8cde20227603ca4342aa862555 /doc | |
| parent | 473c26ce077fa4c4015234ea439f64f1a0fa1ea3 (diff) | |
| download | libatomic_ops-8b263c956bffa5a42c166e96e4fe35218d7c64b3.tar.gz | |
ao-0.4 tarball importlibatomic_ops-0_4
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/README_atomic_ops.txt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/README_atomic_ops.txt b/doc/README_atomic_ops.txt index 5e7a3ea..be45ae2 100644 --- a/doc/README_atomic_ops.txt +++ b/doc/README_atomic_ops.txt @@ -60,12 +60,14 @@ AO_T load(volatile AO_T * addr) Atomic load of *addr. void store(volatile AO_T * addr, AO_T new_val) Atomically store new_val to *addr. -void fetch_and_add(volatile AO_T *addr, incr) +AO_T fetch_and_add(volatile AO_T *addr, AO_T incr) Atomically add incr to *addr, and return the original value of *addr. -void fetch_and_add1(volatile AO_T *addr) +AO_T fetch_and_add1(volatile AO_T *addr) Equivalent to AO_fetch_and_add(addr, 1). -void fetch_and_sub1(volatile AO_T *addr) +AO_T fetch_and_sub1(volatile AO_T *addr) Equivalent to AO_fetch_and_add(addr, (AO_T)(-1)). +void or(volatile AO_T *addr, AO_T incr) + Atomically or incr into *addr. int compare_and_swap(volatile AO_T * addr, AO_T old_val, AO_T new_val) Atomically compare *addr to old_val, and replace *addr by new_val if the first comparison succeeds. Returns nonzero if the comparison |
