projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Build system: use SPDX identifiers
[urcu.git]
/
doc
/
uatomic-api.md
diff --git
a/doc/uatomic-api.md
b/doc/uatomic-api.md
index 9dd0c1c18ee5d1bd2e5c80f95b9b66edc3cf800e..84b97166cef4c2ec81cdf61734eb6f2d1d5fe6b1 100644
(file)
--- a/
doc/uatomic-api.md
+++ b/
doc/uatomic-api.md
@@
-1,3
+1,9
@@
+<!--
+SPDX-FileCopyrightText: 2023 EfficiOS Inc.
+
+SPDX-License-Identifier: CC-BY-4.0
+-->
+
Userspace RCU Atomic Operations API
===================================
Userspace RCU Atomic Operations API
===================================
@@
-27,7
+33,7
@@
API
---
```c
---
```c
-void uatomic_set(type *addr, type v)
+void uatomic_set(type *addr, type v)
;
```
Atomically write `v` into `addr`. By "atomically", we mean that no
```
Atomically write `v` into `addr`. By "atomically", we mean that no
@@
-36,7
+42,7
@@
effects of `uatomic_set()`.
```c
```c
-type uatomic_read(type *addr)
+type uatomic_read(type *addr)
;
```
Atomically read `v` from `addr`. By "atomically", we mean that
```
Atomically read `v` from `addr`. By "atomically", we mean that
@@
-45,7
+51,7
@@
uatomic update.
```c
```c
-type uatomic_cmpxchg(type *addr, type old, type new)
+type uatomic_cmpxchg(type *addr, type old, type new)
;
```
An atomic read-modify-write operation that performs this
```
An atomic read-modify-write operation that performs this
@@
-56,7
+62,7
@@
memory barrier before and after the atomic operation.
```c
```c
-type uatomic_xchg(type *addr, type new)
+type uatomic_xchg(type *addr, type new)
;
```
An atomic read-modify-write operation that performs this sequence
```
An atomic read-modify-write operation that performs this sequence
@@
-67,8
+73,8
@@
operation.
```c
```c
-type uatomic_add_return(type *addr, type v)
-type uatomic_sub_return(type *addr, type v)
+type uatomic_add_return(type *addr, type v)
;
+type uatomic_sub_return(type *addr, type v)
;
```
An atomic read-modify-write operation that performs this
```
An atomic read-modify-write operation that performs this
@@
-79,8
+85,8
@@
operation.
```c
```c
-void uatomic_and(type *addr, type mask)
-void uatomic_or(type *addr, type mask)
+void uatomic_and(type *addr, type mask)
;
+void uatomic_or(type *addr, type mask)
;
```
Atomically write the result of bitwise "and"/"or" between the
```
Atomically write the result of bitwise "and"/"or" between the
@@
-95,8
+101,8
@@
atomic instructions implicitly supply the needed memory barriers.
```c
```c
-void uatomic_add(type *addr, type v)
-void uatomic_sub(type *addr, type v)
+void uatomic_add(type *addr, type v)
;
+void uatomic_sub(type *addr, type v)
;
```
Atomically increment/decrement the content of `addr` by `v`.
```
Atomically increment/decrement the content of `addr` by `v`.
@@
-110,8
+116,8
@@
instructions implicitly supply the needed memory barriers.
```c
```c
-void uatomic_inc(type *addr)
-void uatomic_dec(type *addr)
+void uatomic_inc(type *addr)
;
+void uatomic_dec(type *addr)
;
```
Atomically increment/decrement the content of `addr` by 1.
```
Atomically increment/decrement the content of `addr` by 1.
This page took
0.02436 seconds
and
4
git commands to generate.