diff options
author | jake <jake@FreeBSD.org> | 2001-12-15 21:28:02 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2001-12-15 21:28:02 +0000 |
commit | 0235ad48e8294ec959e6eba1346995acdcd0c170 (patch) | |
tree | 7c8b49dd3d459ea06bbaefdd967c3e17a791f9f9 /share/man/man9/atomic.9 | |
parent | 31b4f6dd65d2fe290c0c0e4c521145b9a957352b (diff) | |
download | FreeBSD-src-0235ad48e8294ec959e6eba1346995acdcd0c170.zip FreeBSD-src-0235ad48e8294ec959e6eba1346995acdcd0c170.tar.gz |
Note that the atomic ops on char and short data types may not be available
on all architectures. Sparc64 does not implement them.
Diffstat (limited to 'share/man/man9/atomic.9')
-rw-r--r-- | share/man/man9/atomic.9 | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/share/man/man9/atomic.9 b/share/man/man9/atomic.9 index b521bb4..54be4b9 100644 --- a/share/man/man9/atomic.9 +++ b/share/man/man9/atomic.9 @@ -69,20 +69,12 @@ Each atomic operation operates on a specific type. The type to use is indicated in the function name. The available types that can be used are: .Bl -tag -offset indent -width short -.It char -unsigned character -.It short -unsigned short integer .It int unsigned integer .It long unsigned long integer .It ptr unsigned integer the size of a pointer -.It 8 -unsigned 8-bit integer -.It 16 -unsigned 16-bit integer .It 32 unsigned 32-bit integer .It 64 @@ -91,6 +83,21 @@ unsigned 64-bit integer .Pp For example, the function to atomically add two integers is called .Fn atomic_add_int . +.Pp +Certain architectures also provide operations for types smaller than int. +.Bl -tag -offset indent -width short +.It char +unsigned character +.It short +unsigned short integer +.It 8 +unsigned 8-bit integer +.It 16 +unsigned 16-bit integer +.El +.Pp +These must not be used in MI code because the instructions to implement them +efficiently may not be available. .Ss Memory Barriers Memory barriers are used to guarantee the order the order of data accesses in two ways. |