Home | History | Annotate | only in /src/common/lib/libc/atomic
History log of /src/common/lib/libc/atomic
RevisionDateAuthorComments
 1.4 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file atomic_add.3 was initially added on branch thorpej-atomic.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_add.3 was added on branch matt-armv6 on 2008-01-09 01:21:16 +0000
 1.3.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2;
Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_add_16_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_add routines built on atomic_cas.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_add_16_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_add_16_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_add routines built on atomic_cas.
 1.9 23-Jun-2014  joerg branches: 1.9.24;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.8 22-Feb-2014  martin branches: 1.8.2;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.7 29-Jan-2014  joerg Fix up the remaining __sync_* functions to build with Clang on ARM.
 1.6 27-Jan-2014  matt Rework so that __sync_fetch_and_<OP>_<N> actually returns a value.
 1.5 27-Jan-2014  matt Add __sync_fetch_and_add_4 alias
 1.4 28-Apr-2008  martin branches: 1.4.4; 1.4.26;
Remove clause 3 and 4 from TNF licenses
 1.3 28-Nov-2007  ad branches: 1.3.4; 1.3.8;
Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_add_32_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_add routines built on atomic_cas.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 28-Nov-2007  matt file atomic_add_32_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:17 +0000
 1.4.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.2.1 10-Aug-2014  tls Rebase.
 1.9.24.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.9.24.1 21-Apr-2020  martin Sync with HEAD
 1.7 27-Feb-2016  joerg branches: 1.7.16;
Include the C11 atomic builtin alias.
 1.6 22-Feb-2014  martin Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.5 27-Jan-2014  matt Add __sync_<OP>_and_fetch_<N> aliases
 1.4 28-Apr-2008  martin branches: 1.4.4; 1.4.26;
Remove clause 3 and 4 from TNF licenses
 1.3 28-Nov-2007  ad branches: 1.3.4; 1.3.8;
Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_add_32_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_add routines built on atomic_cas.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 28-Nov-2007  matt file atomic_add_32_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:17 +0000
 1.4.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.16.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.16.1 21-Apr-2020  martin Sync with HEAD
 1.9 23-Jun-2014  joerg branches: 1.9.24;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.8 28-Jan-2014  joerg branches: 1.8.2;
Allow building with clang.
XXX __RENAME is currently not allowed for the kernel, so use plain asm.
Clang rejects definitions of builtins, so it doesn't work without.
 1.7 27-Jan-2014  matt Rework so that __sync_fetch_and_<OP>_<N> actually returns a value.
 1.6 27-Jan-2014  matt Add __sync_fetch_and_add_8 alias
 1.5 28-Apr-2008  martin branches: 1.5.4; 1.5.26;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.4; 1.4.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.3 28-Nov-2007  ad Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_add_64_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_add routines built on atomic_cas.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.4.2 09-Jan-2008  matt sync with HEAD
 1.4.4.1 29-Nov-2007  matt file atomic_add_64_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:18 +0000
 1.5.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.2.1 10-Aug-2014  tls Rebase.
 1.9.24.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.9.24.1 21-Apr-2020  martin Sync with HEAD
 1.7 22-Feb-2014  martin branches: 1.7.26;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.6 27-Jan-2014  matt Add __sync_<OP>_and_fetch_<N> aliases
 1.5 28-Apr-2008  martin branches: 1.5.4; 1.5.26;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.4; 1.4.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.3 28-Nov-2007  ad Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_add_64_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_add routines built on atomic_cas.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.4.2 09-Jan-2008  matt sync with HEAD
 1.4.4.1 29-Nov-2007  matt file atomic_add_64_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:18 +0000
 1.5.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.26.1 21-Apr-2020  martin Sync with HEAD
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2;
Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_add_8_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_add routines built on atomic_cas.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_add_8_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_add_8_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_add routines built on atomic_cas.
 1.4 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file atomic_and.3 was initially added on branch thorpej-atomic.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_and.3 was added on branch matt-armv6 on 2008-01-09 01:21:19 +0000
 1.3.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2;
Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_and_16_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_and routines built on atomic_cas.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_and_16_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2 13-Oct-2014  martin branches: 1.2.2; 1.2.18;
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_and_16_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_and routines built on atomic_cas.
 1.2.18.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.18.1 21-Apr-2020  martin Sync with HEAD
 1.2.2.2 12-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #218):
common/lib/libc/arch/arm/atomic/Makefile.inc: revision 1.24-1.26
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.7
common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.18
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.7
common/lib/libc/atomic/atomic_and_16_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_and_8_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_cas_by_cas32.c: revision 1.4
common/lib/libc/atomic/atomic_op_namespace.h: revision 1.7
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
--
Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
--
Hook __atomic_compare_exchange_N into vax libc.
--
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
--
Add C++ 2011 <atomic> support functions.
--
Move the and_{16,8}_nv sources into the right (libc only) block.
--
Provide <atomic> C++ 2011 support functions for mips and sh3.
--
Provide C++ 2011 <atomic> support functions for hppa and arm.
--
Provide prototypes to fix build with clang.
 1.2.2.1 13-Oct-2014  snj file atomic_and_16_nv_cas.c was added on branch netbsd-7 on 2014-11-12 19:20:06 +0000
 1.10 23-Jun-2014  joerg branches: 1.10.24;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.9 22-Feb-2014  martin branches: 1.9.2;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.8 29-Jan-2014  joerg Fix up the remaining __sync_* functions to build with Clang on ARM.
 1.7 27-Jan-2014  matt fix tpyos.
 1.6 27-Jan-2014  matt Rework so that __sync_fetch_and_<OP>_<N> actually returns a value.
 1.5 27-Jan-2014  matt Add __sync_fetch_and_<OP>_<N> aliases
 1.4 28-Apr-2008  martin branches: 1.4.4; 1.4.26;
Remove clause 3 and 4 from TNF licenses
 1.3 28-Nov-2007  ad branches: 1.3.4; 1.3.8;
Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_and_32_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_and routines built on atomic_cas.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 28-Nov-2007  matt file atomic_and_32_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:19 +0000
 1.4.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.2.1 10-Aug-2014  tls Rebase.
 1.10.24.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.10.24.1 21-Apr-2020  martin Sync with HEAD
 1.7 22-Feb-2014  martin branches: 1.7.26;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.6 27-Jan-2014  matt Fix tpyo (add->and)
 1.5 27-Jan-2014  matt Add __sync_<OP>_and_fetch_<N> aliases
 1.4 28-Apr-2008  martin branches: 1.4.4; 1.4.26;
Remove clause 3 and 4 from TNF licenses
 1.3 28-Nov-2007  ad branches: 1.3.4; 1.3.8;
Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_and_32_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_and routines built on atomic_cas.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 28-Nov-2007  matt file atomic_and_32_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:20 +0000
 1.4.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.26.1 21-Apr-2020  martin Sync with HEAD
 1.10 23-Jun-2014  joerg branches: 1.10.24;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.9 28-Jan-2014  joerg branches: 1.9.2;
Allow building with clang.
XXX __RENAME is currently not allowed for the kernel, so use plain asm.
Clang rejects definitions of builtins, so it doesn't work without.
 1.8 27-Jan-2014  matt Return old
 1.7 27-Jan-2014  matt Rework so that __sync_fetch_and_<OP>_<N> actually returns a value.
 1.6 27-Jan-2014  matt Add __sync_fetch_and_<OP>_<N> aliases
 1.5 28-Apr-2008  martin branches: 1.5.4; 1.5.26;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.4; 1.4.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.3 28-Nov-2007  ad Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_and_64_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_and routines built on atomic_cas.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.4.2 09-Jan-2008  matt sync with HEAD
 1.4.4.1 29-Nov-2007  matt file atomic_and_64_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:20 +0000
 1.5.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.2.1 10-Aug-2014  tls Rebase.
 1.10.24.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.10.24.1 21-Apr-2020  martin Sync with HEAD
 1.8 29-May-2022  rin Fix typo; this is "and", not "add".
 1.7 22-Feb-2014  martin branches: 1.7.26;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.6 27-Jan-2014  matt Add __sync_<OP>_and_fetch_<N> aliases
 1.5 28-Apr-2008  martin branches: 1.5.4; 1.5.26;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.4; 1.4.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.3 28-Nov-2007  ad Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_and_64_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_and routines built on atomic_cas.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.4.2 09-Jan-2008  matt sync with HEAD
 1.4.4.1 29-Nov-2007  matt file atomic_and_64_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:21 +0000
 1.5.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.26.1 21-Apr-2020  martin Sync with HEAD
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2;
Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_and_8_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_and routines built on atomic_cas.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_and_8_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2 13-Oct-2014  martin branches: 1.2.2; 1.2.18;
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_and_8_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_and routines built on atomic_cas.
 1.2.18.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.18.1 21-Apr-2020  martin Sync with HEAD
 1.2.2.2 12-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #218):
common/lib/libc/arch/arm/atomic/Makefile.inc: revision 1.24-1.26
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.7
common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.18
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.7
common/lib/libc/atomic/atomic_and_16_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_and_8_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_cas_by_cas32.c: revision 1.4
common/lib/libc/atomic/atomic_op_namespace.h: revision 1.7
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
--
Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
--
Hook __atomic_compare_exchange_N into vax libc.
--
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
--
Add C++ 2011 <atomic> support functions.
--
Move the and_{16,8}_nv sources into the right (libc only) block.
--
Provide <atomic> C++ 2011 support functions for mips and sh3.
--
Provide C++ 2011 <atomic> support functions for hppa and arm.
--
Provide prototypes to fix build with clang.
 1.2.2.1 13-Oct-2014  snj file atomic_and_8_nv_cas.c was added on branch netbsd-7 on 2014-11-12 19:20:06 +0000
 1.5 29-Jan-2024  christos sprinkle argsused
 1.4 14-May-2022  skrll *** empty log message ***
 1.3 07-Sep-2020  mrg make some prototypes match the builtin properly. GCC 9 complains
with the old version, GCC 8 is happy with this version.

tested on sparc.
 1.2 04-Nov-2014  joerg branches: 1.2.2; 1.2.18; 1.2.20;
Provide prototypes to fix build with clang.
 1.1 12-Oct-2014  martin Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
 1.2.20.1 15-May-2022  martin Pull up following revision(s) (requested by skrll in ticket #1451):

common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.4
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.4
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.4

PR 56832:
fix C implementations of __atomic_compare_exchange*
 1.2.18.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.18.1 21-Apr-2020  martin Sync with HEAD
 1.2.2.2 12-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #218):
common/lib/libc/arch/arm/atomic/Makefile.inc: revision 1.24-1.26
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.7
common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.18
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.7
common/lib/libc/atomic/atomic_and_16_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_and_8_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_cas_by_cas32.c: revision 1.4
common/lib/libc/atomic/atomic_op_namespace.h: revision 1.7
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
--
Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
--
Hook __atomic_compare_exchange_N into vax libc.
--
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
--
Add C++ 2011 <atomic> support functions.
--
Move the and_{16,8}_nv sources into the right (libc only) block.
--
Provide <atomic> C++ 2011 support functions for mips and sh3.
--
Provide C++ 2011 <atomic> support functions for hppa and arm.
--
Provide prototypes to fix build with clang.
 1.2.2.1 04-Nov-2014  snj file atomic_c11_compare_exchange_cas_16.c was added on branch netbsd-7 on 2014-11-12 19:20:06 +0000
 1.6 29-Jan-2024  christos sprinkle argsused
 1.5 16-May-2022  skrll Fix the copy&paste botch from previous. Spotted by Tom Lane.
 1.4 14-May-2022  skrll *** empty log message ***
 1.3 07-Sep-2020  mrg make some prototypes match the builtin properly. GCC 9 complains
with the old version, GCC 8 is happy with this version.

tested on sparc.
 1.2 04-Nov-2014  joerg branches: 1.2.2; 1.2.18; 1.2.20;
Provide prototypes to fix build with clang.
 1.1 12-Oct-2014  martin Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
 1.2.20.2 17-May-2022  martin Pull up following revision(s) (requested by skrll in ticket #1453):

common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.5

Fix the copy&paste botch from previous. Spotted by Tom Lane.
 1.2.20.1 15-May-2022  martin Pull up following revision(s) (requested by skrll in ticket #1451):

common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.4
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.4
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.4

PR 56832:
fix C implementations of __atomic_compare_exchange*
 1.2.18.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.18.1 21-Apr-2020  martin Sync with HEAD
 1.2.2.2 12-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #218):
common/lib/libc/arch/arm/atomic/Makefile.inc: revision 1.24-1.26
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.7
common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.18
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.7
common/lib/libc/atomic/atomic_and_16_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_and_8_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_cas_by_cas32.c: revision 1.4
common/lib/libc/atomic/atomic_op_namespace.h: revision 1.7
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
--
Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
--
Hook __atomic_compare_exchange_N into vax libc.
--
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
--
Add C++ 2011 <atomic> support functions.
--
Move the and_{16,8}_nv sources into the right (libc only) block.
--
Provide <atomic> C++ 2011 support functions for mips and sh3.
--
Provide C++ 2011 <atomic> support functions for hppa and arm.
--
Provide prototypes to fix build with clang.
 1.2.2.1 04-Nov-2014  snj file atomic_c11_compare_exchange_cas_32.c was added on branch netbsd-7 on 2014-11-12 19:20:06 +0000
 1.5 29-Jan-2024  christos sprinkle argsused
 1.4 14-May-2022  skrll *** empty log message ***
 1.3 07-Sep-2020  mrg make some prototypes match the builtin properly. GCC 9 complains
with the old version, GCC 8 is happy with this version.

tested on sparc.
 1.2 04-Nov-2014  joerg branches: 1.2.2; 1.2.18; 1.2.20;
Provide prototypes to fix build with clang.
 1.1 12-Oct-2014  martin Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
 1.2.20.1 15-May-2022  martin Pull up following revision(s) (requested by skrll in ticket #1451):

common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.4
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.4
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.4

PR 56832:
fix C implementations of __atomic_compare_exchange*
 1.2.18.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.18.1 21-Apr-2020  martin Sync with HEAD
 1.2.2.2 12-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #218):
common/lib/libc/arch/arm/atomic/Makefile.inc: revision 1.24-1.26
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.7
common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.18
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.7
common/lib/libc/atomic/atomic_and_16_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_and_8_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_cas_by_cas32.c: revision 1.4
common/lib/libc/atomic/atomic_op_namespace.h: revision 1.7
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
--
Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
--
Hook __atomic_compare_exchange_N into vax libc.
--
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
--
Add C++ 2011 <atomic> support functions.
--
Move the and_{16,8}_nv sources into the right (libc only) block.
--
Provide <atomic> C++ 2011 support functions for mips and sh3.
--
Provide C++ 2011 <atomic> support functions for hppa and arm.
--
Provide prototypes to fix build with clang.
 1.2.2.1 04-Nov-2014  snj file atomic_c11_compare_exchange_cas_8.c was added on branch netbsd-7 on 2014-11-12 19:20:06 +0000
 1.4 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file atomic_cas.3 was initially added on branch thorpej-atomic.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_cas.3 was added on branch matt-armv6 on 2008-01-09 01:21:21 +0000
 1.3.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.3 21-Feb-2014  martin branches: 1.3.6; 1.3.28;
Add a few missing namespace includes
 1.2 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_cas_16_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_cas_8() and atomic_cas_16() routines built on
atomic_cas_32().
 1.3.28.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.28.1 21-Apr-2020  martin Sync with HEAD
 1.3.6.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.1 21-Feb-2014  tls file atomic_cas_16_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1 21-Feb-2014  martin branches: 1.1.4; 1.1.8; 1.1.30;
Provide 32bit __sync ops based on atomic_cas_32.
 1.1.30.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.1.30.1 21-Apr-2020  martin Sync with HEAD
 1.1.8.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 21-Feb-2014  tls file atomic_cas_32_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 21-Feb-2014  yamt file atomic_cas_32_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2 18-Feb-2014  martin branches: 1.2.4; 1.2.8; 1.2.30;
Do not include <stdbool.h> in the kernel
 1.1 18-Feb-2014  martin Provide most missing __sync_*64 primitives for i386
 1.2.30.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.30.1 21-Apr-2020  martin Sync with HEAD
 1.2.8.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 18-Feb-2014  tls file atomic_cas_64_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 18-Feb-2014  yamt file atomic_cas_64_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.3 21-Feb-2014  martin branches: 1.3.6; 1.3.28;
Add a few missing namespace includes
 1.2 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_cas_8_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_cas_8() and atomic_cas_16() routines built on
atomic_cas_32().
 1.3.28.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.28.1 21-Apr-2020  martin Sync with HEAD
 1.3.6.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.1 21-Feb-2014  tls file atomic_cas_8_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.4 03-Sep-2014  matt branches: 1.4.16;
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
 1.3 09-Mar-2014  riastradh branches: 1.3.4; 1.3.6; 1.3.8;
Fix subword atomic_cas.

- Don't loop forever on failure.
- Don't shift away the result and return zero on success.

Evidently we lack automatic tests for these!
 1.2 07-Mar-2014  martin Fix return value (typo, noticed by Nick Hudson)
 1.1 24-Feb-2014  martin Provide cas_16 and cas_8 emulation via cas_32 and use that for mips64
 1.3.8.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.8.1 09-Mar-2014  tls file atomic_cas_by_cas32.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.3.6.1 12-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #218):
common/lib/libc/arch/arm/atomic/Makefile.inc: revision 1.24-1.26
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.7
common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.18
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.7
common/lib/libc/atomic/atomic_and_16_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_and_8_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_cas_by_cas32.c: revision 1.4
common/lib/libc/atomic/atomic_op_namespace.h: revision 1.7
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
--
Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
--
Hook __atomic_compare_exchange_N into vax libc.
--
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
--
Add C++ 2011 <atomic> support functions.
--
Move the and_{16,8}_nv sources into the right (libc only) block.
--
Provide <atomic> C++ 2011 support functions for mips and sh3.
--
Provide C++ 2011 <atomic> support functions for hppa and arm.
--
Provide prototypes to fix build with clang.
 1.3.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.1 09-Mar-2014  yamt file atomic_cas_by_cas32.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.4.16.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.16.1 21-Apr-2020  martin Sync with HEAD
 1.4 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec.3 was initially added on branch thorpej-atomic.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_dec.3 was added on branch matt-armv6 on 2008-01-09 01:21:21 +0000
 1.3.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec_16_add.c was initially added on branch thorpej-atomic.
 1.1.2.5 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.4 18-Apr-2007  thorpej Fix a typo.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec_16_nv_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec_32_add.c was initially added on branch thorpej-atomic.
 1.1.2.5 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.4 18-Apr-2007  thorpej Fix a typo.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_dec_32_add.c was added on branch matt-armv6 on 2008-01-09 01:21:22 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Nov-2007  ad branches: 1.2.4; 1.2.8;
atomic_add_* takes signed integers, the others take unsigned.
 1.1 29-Nov-2007  ad Add inc/dec variants that use atomic_cas in preference to atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Nov-2007  matt file atomic_dec_32_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:22 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec_32_nv_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_dec_32_nv_add.c was added on branch matt-armv6 on 2008-01-09 01:21:23 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Nov-2007  ad branches: 1.2.4; 1.2.8;
atomic_add_* takes signed integers, the others take unsigned.
 1.1 29-Nov-2007  ad Add inc/dec variants that use atomic_cas in preference to atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Nov-2007  matt file atomic_dec_32_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:23 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.4 28-Apr-2008  martin branches: 1.4.64;
Remove clause 3 and 4 from TNF licenses
 1.3 29-Nov-2007  ad branches: 1.3.4; 1.3.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec_64_add.c was initially added on branch thorpej-atomic.
 1.1.2.5 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.4 18-Apr-2007  thorpej Fix a typo.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 29-Nov-2007  matt file atomic_dec_64_add.c was added on branch matt-armv6 on 2008-01-09 01:21:24 +0000
 1.4.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Nov-2007  ad branches: 1.2.4; 1.2.8;
atomic_add_* takes signed integers, the others take unsigned.
 1.1 29-Nov-2007  ad Add inc/dec variants that use atomic_cas in preference to atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Nov-2007  matt file atomic_dec_64_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:24 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.4 28-Apr-2008  martin branches: 1.4.64;
Remove clause 3 and 4 from TNF licenses
 1.3 29-Nov-2007  ad branches: 1.3.4; 1.3.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec_64_nv_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 29-Nov-2007  matt file atomic_dec_64_nv_add.c was added on branch matt-armv6 on 2008-01-09 01:21:25 +0000
 1.4.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Nov-2007  ad branches: 1.2.4; 1.2.8;
atomic_add_* takes signed integers, the others take unsigned.
 1.1 29-Nov-2007  ad Add inc/dec variants that use atomic_cas in preference to atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Nov-2007  matt file atomic_dec_64_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:25 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec_8_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_dec_8_nv_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.4 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc.3 was initially added on branch thorpej-atomic.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_inc.3 was added on branch matt-armv6 on 2008-01-09 01:21:26 +0000
 1.3.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc_16_add.c was initially added on branch thorpej-atomic.
 1.1.2.5 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.4 18-Apr-2007  thorpej Fix a typo.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc_16_nv_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc_32_add.c was initially added on branch thorpej-atomic.
 1.1.2.5 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.4 18-Apr-2007  thorpej Fix a typo.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_inc_32_add.c was added on branch matt-armv6 on 2008-01-09 01:21:26 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Nov-2007  ad branches: 1.2.4; 1.2.8;
atomic_add_* takes signed integers, the others take unsigned.
 1.1 29-Nov-2007  ad Add inc/dec variants that use atomic_cas in preference to atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Nov-2007  matt file atomic_inc_32_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:27 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc_32_nv_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_inc_32_nv_add.c was added on branch matt-armv6 on 2008-01-09 01:21:27 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Nov-2007  ad branches: 1.2.4; 1.2.8;
atomic_add_* takes signed integers, the others take unsigned.
 1.1 29-Nov-2007  ad Add inc/dec variants that use atomic_cas in preference to atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Nov-2007  matt file atomic_inc_32_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:27 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.4 28-Apr-2008  martin branches: 1.4.64;
Remove clause 3 and 4 from TNF licenses
 1.3 29-Nov-2007  ad branches: 1.3.4; 1.3.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc_64_add.c was initially added on branch thorpej-atomic.
 1.1.2.5 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.4 18-Apr-2007  thorpej Fix a typo.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 29-Nov-2007  matt file atomic_inc_64_add.c was added on branch matt-armv6 on 2008-01-09 01:21:28 +0000
 1.4.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.64.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Apr-2008  martin branches: 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 29-Nov-2007  ad branches: 1.2.4; 1.2.8;
atomic_add_* takes signed integers, the others take unsigned.
 1.1 29-Nov-2007  ad Add inc/dec variants that use atomic_cas in preference to atomic_add.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 29-Nov-2007  matt file atomic_inc_64_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:28 +0000
 1.3.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.64.1 21-Apr-2020  martin Sync with HEAD
 1.4 28-Apr-2008  martin branches: 1.4.64;
Remove clause 3 and 4 from TNF licenses
 1.3 29-Nov-2007  ad branches: 1.3.4; 1.3.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc_64_nv_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 29-Nov-2007  matt file atomic_inc_64_nv_add.c was added on branch matt-armv6 on 2008-01-09 01:21:28 +0000
 1.4.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.64.1 21-Apr-2020  martin Sync with HEAD
 1.4 28-Apr-2008  martin branches: 1.4.64;
Remove clause 3 and 4 from TNF licenses
 1.3 04-Dec-2007  he branches: 1.3.4; 1.3.8;
Correct what must obviously be a cut+paste-induced set of typos.
 1.2 29-Nov-2007  ad atomic_add_* takes signed integers, the others take unsigned.
 1.1 29-Nov-2007  ad Add inc/dec variants that use atomic_cas in preference to atomic_add.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 04-Dec-2007  matt file atomic_inc_64_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:29 +0000
 1.4.64.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.64.1 21-Apr-2020  martin Sync with HEAD
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc_8_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_inc_8_nv_add.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_inc and atomic_dec routines built on atomic_add.
 1.5 19-Jan-2024  christos make decls consistent
 1.4 21-Aug-2013  matt branches: 1.4.26;
Use __section(".test.startup") for the init routines
 1.3 28-Apr-2008  martin branches: 1.3.4; 1.3.26;
Remove clause 3 and 4 from TNF licenses
 1.2 10-Feb-2008  ad branches: 1.2.4; 1.2.6;
Fix name of the init function.
 1.1 09-Feb-2008  ad Some glue for atomic ops in userspace.
 1.2.6.1 18-May-2008  yamt sync with head.
 1.2.4.2 23-Mar-2008  matt sync with HEAD
 1.2.4.1 10-Feb-2008  matt file atomic_init_cas.c was added on branch matt-armv6 on 2008-03-23 00:12:44 +0000
 1.3.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.4.26.1 21-Apr-2020  martin Sync with HEAD
 1.19 21-Jan-2024  thorpej Catch up with revision 1.5 of atomic_init_cas.c. Fixes building libc
on sun2, and probably others.
 1.18 19-Jan-2024  christos make decls consistent
 1.17 15-May-2020  martin PR 55239: initialize all RAS sections for non-MP configurations
 1.16 18-Feb-2019  martin Add some atomic_cas_64_ni aliases
 1.15 27-Feb-2014  matt branches: 1.15.26;
Add atomic_cas_64 support for ARM EABI on V5TE and V5TEJ cpus.
(strd is atomic).
 1.14 24-Feb-2014  martin Provide CAS variants for 16 and 8 bit when running with more that 1 cpu
 1.13 22-Feb-2014  martin Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.12 29-Jan-2014  martin Fix a few more copy&pastos - now it actually builds.
 1.11 29-Jan-2014  martin Fix copy&pasto
 1.10 27-Jan-2014  matt Add _atomic_cas_16 and _atomic_cas_8 and their aliases
__sync_val_compare_and_swap_2 & __sync_val_compare_and_swap_1
 1.9 21-Aug-2013  matt Use __section(".test.startup") for the init routines
 1.8 28-Feb-2012  joerg branches: 1.8.2;
Make sure to create the right aliases.
 1.7 14-Dec-2009  matt branches: 1.7.6;
Merge from matt-nb5-mips64
 1.6 30-Jan-2009  skrll Make sure _atomic_cas_fn is initialised for "weirdo environments" such
as ramdisks where the constructor doesn't get called.

Fixes ifconfig in hp700 sysinst.

OK'ed by ad.
 1.5 29-Apr-2008  scw branches: 1.5.10;
Implement _atomic_cas_up() in assembly code as the compiler cannot be
trusted to generate fully restartable code sequences.

Addresses lib/38482 for ARM and m68000.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 11-Feb-2008  ad branches: 1.3.4; 1.3.6;
Put back a __predict_false removed during testing and fix atomic_cas_mp().
 1.2 10-Feb-2008  ad Add atomic_cas_foo_ni().
 1.1 09-Feb-2008  ad Some glue for atomic ops in userspace.
 1.3.6.1 18-May-2008  yamt sync with head.
 1.3.4.2 23-Mar-2008  matt sync with HEAD
 1.3.4.1 11-Feb-2008  matt file atomic_init_testset.c was added on branch matt-armv6 on 2008-03-23 00:12:44 +0000
 1.5.10.1 05-Sep-2009  matt Don't cast a ptr to uint32_t, use uintptr_t instead.
 1.7.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.6.1 17-Apr-2012  yamt sync with head
 1.8.2.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.26.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.15.26.2 21-Apr-2020  martin Sync with HEAD
 1.15.26.1 10-Jun-2019  christos Sync with HEAD
 1.3 03-Apr-2023  riastradh branches: 1.3.2;
libc atomic: Make previous work a little less accidentally.
 1.2 03-Apr-2023  riastradh libc __atomic_is_lock_free: Fix clang build with symbol hacks.
 1.1 30-Mar-2023  riastradh libc: Define __atomic_is_lock_free.

Limited to architectures where it is actually needed by gcc for any
calls to stdatomic.h atomic_is_lock_free for now.

We should also add it to other architectures too, along with lockful
atomic r/m/w operations for sizes that can't be handled natively, but
that's a lot more work. It is also necessary for -fno-inline-atomics
but we're missing a lot of other symbols for that too, to be fixed.
For now, this should enable the OpenSSL build to complete on these
architectures again after I reverted a local change.

XXX pullup-10
 1.3.2.3 14-Dec-2023  martin Pull up following revision(s) (requested by rin in ticket #496):

common/lib/libc/atomic/atomic_is_lock_free.c: revision 1.2
common/lib/libc/atomic/atomic_is_lock_free.c: revision 1.3

libc __atomic_is_lock_free: Fix clang build with symbol hacks.

libc atomic: Make previous work a little less accidentally.
 1.3.2.2 31-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #275):

common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.24
common/lib/libc/arch/m68k/atomic/Makefile.inc: revision 1.16
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.16
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.15
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.9
common/lib/libc/atomic/atomic_is_lock_free.c: revision 1.1
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.9

libc: Define __atomic_is_lock_free.

Limited to architectures where it is actually needed by gcc for any
calls to stdatomic.h atomic_is_lock_free for now.

We should also add it to other architectures too, along with lockful
atomic r/m/w operations for sizes that can't be handled natively, but
that's a lot more work. It is also necessary for -fno-inline-atomics
but we're missing a lot of other symbols for that too, to be fixed.

For now, this should enable the OpenSSL build to complete on these
architectures again after I reverted a local change.
 1.3.2.1 03-Apr-2023  martin file atomic_is_lock_free.c was added on branch netbsd-10 on 2023-07-31 16:10:26 +0000
 1.5 14-Feb-2024  christos sprinkle unused.
 1.4 09-Apr-2022  riastradh libc/atomic: Fix membars in __atomic_load/store_* stubs.

- membar_enter/exit ordering was backwards.
- membar_enter doesn't make any sense for load anyway.
- Switch to membar_release for store and membar_acquire for load.

The only sensible orderings for a simple load or store are acquire or
release, respectively, or sequential consistency. This never
provided correct sequential consistency before -- we should really
make it conditional on memmodel but I don't know offhand what the
values of memmodel might be and this is at least better than before.
 1.3 07-Sep-2020  mrg make some prototypes match the builtin properly. GCC 9 complains
with the old version, GCC 8 is happy with this version.

tested on sparc.
 1.2 06-Jul-2014  joerg branches: 1.2.2; 1.2.6; 1.2.28;
Add unused memory model argument to make GCC happy.
 1.1 05-Jul-2014  joerg Provide a basic implementation of __atomic_load_* and __atomic_store_*,
used by GCC and LLVM as backing for C11/C++11 atomics, if the hardware
is not known to have corresponding features. Include it on ARM as LLVM
and libc++ hit it when compiled for ARMv4.
 1.2.28.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.28.1 21-Apr-2020  martin Sync with HEAD
 1.2.6.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 06-Jul-2014  tls file atomic_load.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2.2.2 10-Aug-2014  tls Rebase.
 1.2.2.1 06-Jul-2014  tls file atomic_load.c was added on branch tls-earlyentropy on 2014-08-10 06:47:06 +0000
 1.3 01-Mar-2019  isaki Add missing alias for __atomic_fetch_nand_N.
XXX I'm not sure why does llvm/sparc call __atomic instead of
__sync though.
XXX atomic_*_cas.c should be more symmetric...
 1.2 21-Feb-2014  martin branches: 1.2.4; 1.2.8; 1.2.30;
Add a few missing namespace includes
 1.1 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.2.30.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.30.2 21-Apr-2020  martin Sync with HEAD
 1.2.30.1 10-Jun-2019  christos Sync with HEAD
 1.2.8.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 21-Feb-2014  tls file atomic_nand_16_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 21-Feb-2014  yamt file atomic_nand_16_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2 01-Mar-2019  isaki Add missing alias for __atomic_fetch_nand_N.
XXX I'm not sure why does llvm/sparc call __atomic instead of
__sync though.
XXX atomic_*_cas.c should be more symmetric...
 1.1 21-Feb-2014  martin branches: 1.1.4; 1.1.8; 1.1.30;
Provide 32bit __sync ops based on atomic_cas_32.
 1.1.30.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.1.30.2 21-Apr-2020  martin Sync with HEAD
 1.1.30.1 10-Jun-2019  christos Sync with HEAD
 1.1.8.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.8.1 21-Feb-2014  tls file atomic_nand_32_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 21-Feb-2014  yamt file atomic_nand_32_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2 18-Feb-2014  martin branches: 1.2.4; 1.2.8; 1.2.30;
Make the _and_fetch_8 primitives return the new value they calculated
and set - not whatever is found in memory later.
 1.1 18-Feb-2014  martin Provide most missing __sync_*64 primitives for i386
 1.2.30.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.30.1 21-Apr-2020  martin Sync with HEAD
 1.2.8.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 18-Feb-2014  tls file atomic_nand_64_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 18-Feb-2014  yamt file atomic_nand_64_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.3 01-Mar-2019  isaki Add missing alias for __atomic_fetch_nand_N.
XXX I'm not sure why does llvm/sparc call __atomic instead of
__sync though.
XXX atomic_*_cas.c should be more symmetric...
 1.2 21-Feb-2014  martin branches: 1.2.4; 1.2.8; 1.2.30;
Add a few missing namespace includes
 1.1 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.2.30.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.30.2 21-Apr-2020  martin Sync with HEAD
 1.2.30.1 10-Jun-2019  christos Sync with HEAD
 1.2.8.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 21-Feb-2014  tls file atomic_nand_8_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 21-Feb-2014  yamt file atomic_nand_8_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_op_cas_impl.h was initially added on branch thorpej-atomic.
 1.1.2.3 20-Apr-2007  thorpej Use membar_enter() (W-RW) as the memory barrier in CAS-based atomic ops.
 1.1.2.2 13-Apr-2007  thorpej Make this work for big-endian with a trick provided by Matt Thomas.
 1.1.2.1 13-Apr-2007  thorpej Add a header file that contains convenience macros for implementing
other types of atomic operations in terms of atomic_cas_32() (including
sub-32-bit operations).

XXX Probably does not work on big-endian yet.
 1.8 04-Mar-2025  riastradh libc atomic_op_namespace.h: Add membar_release and membar_acquire.

These namespace macros will be needed so that libpthread can call
NetBSD's nonstandard membar_release/acquire functions even if linked
against an application that defines symbols of the same name.

Preparation for:

PR lib/59126: pthread_once(3): missing memory ordering
 1.7 13-Oct-2014  martin branches: 1.7.16; 1.7.36;
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
 1.6 22-Feb-2014  martin branches: 1.6.4;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.5 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.4 23-Jun-2008  ad branches: 1.4.2; 1.4.24;
+atomic_cas_*_ni
 1.3 28-Apr-2008  martin branches: 1.3.2;
Remove clause 3 and 4 from TNF licenses
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 16-Apr-2007  thorpej branches: 1.1.2;
file atomic_op_namespace.h was initially added on branch thorpej-atomic.
 1.1.2.1 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_op_namespace.h was added on branch matt-armv6 on 2008-01-09 01:21:29 +0000
 1.3.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.4.24.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.4.1 12-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #218):
common/lib/libc/arch/arm/atomic/Makefile.inc: revision 1.24-1.26
common/lib/libc/arch/hppa/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/mips/atomic/Makefile.inc: revision 1.13
common/lib/libc/arch/sh3/atomic/Makefile.inc: revision 1.7
common/lib/libc/arch/sparc/atomic/Makefile.inc: revision 1.18
common/lib/libc/arch/vax/atomic/Makefile.inc: revision 1.7
common/lib/libc/atomic/atomic_and_16_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_and_8_nv_cas.c: revision 1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_16.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_32.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_c11_compare_exchange_cas_8.c: revision 1.1-1.2
common/lib/libc/atomic/atomic_cas_by_cas32.c: revision 1.4
common/lib/libc/atomic/atomic_op_namespace.h: revision 1.7
Add __sync_val_compare_and_swap_{1,2} aliases for _atomic_cas_{8,16}
--
Provide __atomic_compare_exchange_N (as needed for the C11 2011 <atomic>
ops) via the corresponding CAS.
--
Hook __atomic_compare_exchange_N into vax libc.
--
Provide __sync_and_and_fetch_2 and __sync_and_and_fetch_1 for pre-ARMv6,
they are needed for the C++ 2011 <atomic> stuff.
--
Add C++ 2011 <atomic> support functions.
--
Move the and_{16,8}_nv sources into the right (libc only) block.
--
Provide <atomic> C++ 2011 support functions for mips and sh3.
--
Provide C++ 2011 <atomic> support functions for hppa and arm.
--
Provide prototypes to fix build with clang.
 1.7.36.1 02-Aug-2025  perseant Sync with HEAD
 1.7.16.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.16.1 21-Apr-2020  martin Sync with HEAD
 1.6 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.5 30-Apr-2008  martin branches: 1.5.2;
Convert TNF licenses to new 2 clause variant
 1.4 11-Feb-2008  ad branches: 1.4.4;
Note many of the restrictions, and clarify the section on global
visibility.
 1.3 02-Dec-2007  wiz branches: 1.3.4;
Typo fixes.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file atomic_ops.3 was initially added on branch thorpej-atomic.
 1.1.2.3 27-Apr-2007  thorpej Note that a given memory location should be modified either entirely
with atomic operations or entirely with some other synchronization
strategy, else the results are undefined.

This is critical for correctness on platforms that use interlocks
or restartable atomic sequences.
 1.1.2.2 26-Apr-2007  thorpej Make a note that sub-32-bit atomic ops are extremely expensive on some
architectures.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.3.4.3 23-Mar-2008  matt sync with HEAD
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 02-Dec-2007  matt file atomic_ops.3 was added on branch matt-armv6 on 2008-01-09 01:21:30 +0000
 1.4.4.1 18-May-2008  yamt sync with head.
 1.5.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.4 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file atomic_or.3 was initially added on branch thorpej-atomic.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_or.3 was added on branch matt-armv6 on 2008-01-09 01:21:30 +0000
 1.3.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.4 01-Mar-2019  isaki Fix return value. or_and_fetch should return new value.
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2;
Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_or_16_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_or routines built on atomic_cas.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.2 21-Apr-2020  martin Sync with HEAD
 1.3.26.1 10-Jun-2019  christos Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_or_16_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_or_16_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_or routines built on atomic_cas.
 1.10 23-Jun-2014  joerg branches: 1.10.24;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.9 22-Feb-2014  martin branches: 1.9.2;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.8 29-Jan-2014  joerg Fix up the remaining __sync_* functions to build with Clang on ARM.
 1.7 27-Jan-2014  matt fix tpyos.
 1.6 27-Jan-2014  matt Rework so that __sync_fetch_and_<OP>_<N> actually returns a value.
 1.5 27-Jan-2014  matt Add __sync_fetch_and_<OP>_<N> aliases
 1.4 28-Apr-2008  martin branches: 1.4.4; 1.4.26;
Remove clause 3 and 4 from TNF licenses
 1.3 28-Nov-2007  ad branches: 1.3.4; 1.3.8;
Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_or_32_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_or routines built on atomic_cas.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 28-Nov-2007  matt file atomic_or_32_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:30 +0000
 1.4.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.2.1 10-Aug-2014  tls Rebase.
 1.10.24.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.10.24.1 21-Apr-2020  martin Sync with HEAD
 1.6 22-Feb-2014  martin branches: 1.6.26;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.5 27-Jan-2014  matt Add __sync_<OP>_and_fetch_<N> aliases
 1.4 28-Apr-2008  martin branches: 1.4.4; 1.4.26;
Remove clause 3 and 4 from TNF licenses
 1.3 28-Nov-2007  ad branches: 1.3.4; 1.3.8;
Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_or_32_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_or routines built on atomic_cas.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 28-Nov-2007  matt file atomic_or_32_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:31 +0000
 1.4.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.6.26.1 21-Apr-2020  martin Sync with HEAD
 1.10 23-Jun-2014  joerg branches: 1.10.24;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.9 28-Jan-2014  joerg branches: 1.9.2;
Allow building with clang.
XXX __RENAME is currently not allowed for the kernel, so use plain asm.
Clang rejects definitions of builtins, so it doesn't work without.
 1.8 27-Jan-2014  matt fix c&p bug.
 1.7 27-Jan-2014  matt Rework so that __sync_fetch_and_<OP>_<N> actually returns a value.
 1.6 27-Jan-2014  matt Add __sync_fetch_and_<OP>_<N> aliases
 1.5 28-Apr-2008  martin branches: 1.5.4; 1.5.26;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.4; 1.4.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.3 28-Nov-2007  ad Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_or_64_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_or routines built on atomic_cas.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.4.2 09-Jan-2008  matt sync with HEAD
 1.4.4.1 29-Nov-2007  matt file atomic_or_64_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:31 +0000
 1.5.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.2.1 10-Aug-2014  tls Rebase.
 1.10.24.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.10.24.1 21-Apr-2020  martin Sync with HEAD
 1.7 22-Feb-2014  martin branches: 1.7.26;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.6 27-Jan-2014  matt Add __sync_<OP>_and_fetch_<N> aliases
 1.5 28-Apr-2008  martin branches: 1.5.4; 1.5.26;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.4; 1.4.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.3 28-Nov-2007  ad Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_or_64_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_or routines built on atomic_cas.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.4.2 09-Jan-2008  matt sync with HEAD
 1.4.4.1 29-Nov-2007  matt file atomic_or_64_nv_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:32 +0000
 1.5.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.26.1 21-Apr-2020  martin Sync with HEAD
 1.4 01-Mar-2019  isaki Fix return value. or_and_fetch should return new value.
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2;
Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_or_8_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_or routines built on atomic_cas.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.3 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.2 21-Apr-2020  martin Sync with HEAD
 1.3.26.1 10-Jun-2019  christos Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_or_8_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_or_8_nv_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_or routines built on atomic_cas.
 1.5 04-Feb-2024  christos mark unused argument
 1.4 09-Apr-2022  riastradh libc/atomic: Fix membars in __atomic_load/store_* stubs.

- membar_enter/exit ordering was backwards.
- membar_enter doesn't make any sense for load anyway.
- Switch to membar_release for store and membar_acquire for load.

The only sensible orderings for a simple load or store are acquire or
release, respectively, or sequential consistency. This never
provided correct sequential consistency before -- we should really
make it conditional on memmodel but I don't know offhand what the
values of memmodel might be and this is at least better than before.
 1.3 07-Sep-2020  mrg make some prototypes match the builtin properly. GCC 9 complains
with the old version, GCC 8 is happy with this version.

tested on sparc.
 1.2 06-Jul-2014  joerg branches: 1.2.2; 1.2.6; 1.2.28;
Add unused memory model argument to make GCC happy.
 1.1 05-Jul-2014  joerg Provide a basic implementation of __atomic_load_* and __atomic_store_*,
used by GCC and LLVM as backing for C11/C++11 atomics, if the hardware
is not known to have corresponding features. Include it on ARM as LLVM
and libc++ hit it when compiled for ARMv4.
 1.2.28.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.28.1 21-Apr-2020  martin Sync with HEAD
 1.2.6.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 06-Jul-2014  tls file atomic_store.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2.2.2 10-Aug-2014  tls Rebase.
 1.2.2.1 06-Jul-2014  tls file atomic_store.c was added on branch tls-earlyentropy on 2014-08-10 06:47:06 +0000
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2; 1.2.4;
Add a few missing namespace includes
 1.1 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 21-Feb-2014  yamt file atomic_sub_16_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_sub_16_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2 23-Jun-2014  joerg branches: 1.2.4; 1.2.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.1 21-Feb-2014  martin branches: 1.1.2; 1.1.4;
Provide 32bit __sync ops based on atomic_cas_32.
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 21-Feb-2014  yamt file atomic_sub_32_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.2.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.26.1 21-Apr-2020  martin Sync with HEAD
 1.2.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 23-Jun-2014  tls file atomic_sub_32_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 18-Feb-2014  martin branches: 1.2.2; 1.2.4;
Make the _and_fetch_8 primitives return the new value they calculated
and set - not whatever is found in memory later.
 1.1 18-Feb-2014  martin Provide most missing __sync_*64 primitives for i386
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 18-Feb-2014  yamt file atomic_sub_64_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_sub_64_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2; 1.2.4;
Add a few missing namespace includes
 1.1 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 21-Feb-2014  yamt file atomic_sub_8_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_sub_8_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.4 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 28-Nov-2007  ad branches: 1.2.4; 1.2.8;
Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file atomic_swap.3 was initially added on branch thorpej-atomic.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.2.8.1 18-May-2008  yamt sync with head.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 28-Nov-2007  matt file atomic_swap.3 was added on branch matt-armv6 on 2008-01-09 01:21:32 +0000
 1.3.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.3 28-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the C11/C++11 spelling of the CAS primitives.
 1.2 21-Feb-2014  martin branches: 1.2.2;
Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_swap_16_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_swap routines built on atomic_cas.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 28-Jun-2014  tls file atomic_swap_16_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.7 28-Jun-2014  joerg branches: 1.7.24;
Add aliases for the C11/C++11 spelling of the CAS primitives.
 1.6 22-Feb-2014  martin branches: 1.6.2;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.5 21-Feb-2014  martin Add missing __sync_lock_test_and_set_* aliases for PR lib/48601
 1.4 28-Apr-2008  martin branches: 1.4.4; 1.4.26;
Remove clause 3 and 4 from TNF licenses
 1.3 28-Nov-2007  ad branches: 1.3.4; 1.3.8;
Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_swap_32_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_swap routines built on atomic_cas.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 28-Nov-2007  matt file atomic_swap_32_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:32 +0000
 1.4.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.2.1 10-Aug-2014  tls Rebase.
 1.7.24.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.24.1 21-Apr-2020  martin Sync with HEAD
 1.10 29-May-2022  rin One more typo; this is called _atomic_swap_64, not _8.
 1.9 28-Jun-2014  joerg branches: 1.9.24;
Add aliases for the C11/C++11 spelling of the CAS primitives.
 1.8 22-Feb-2014  martin branches: 1.8.2;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.7 21-Feb-2014  martin Fix previous: move the alias declaration outside of a #ifdef _LP64
 1.6 21-Feb-2014  martin Add missing __sync_lock_test_and_set_* aliases for PR lib/48601
 1.5 28-Apr-2008  martin branches: 1.5.4; 1.5.26;
Remove clause 3 and 4 from TNF licenses
 1.4 29-Nov-2007  ad branches: 1.4.4; 1.4.8;
Only build the 64-bit versions if __HAVE_ATOMIC64_OPS.
 1.3 28-Nov-2007  ad Memory barrier in respect of the CAS isn't necessary.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 13-Apr-2007  thorpej branches: 1.1.2;
file atomic_swap_64_cas.c was initially added on branch thorpej-atomic.
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_swap routines built on atomic_cas.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.4.2 09-Jan-2008  matt sync with HEAD
 1.4.4.1 29-Nov-2007  matt file atomic_swap_64_cas.c was added on branch matt-armv6 on 2008-01-09 01:21:33 +0000
 1.5.26.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.2.1 10-Aug-2014  tls Rebase.
 1.9.24.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.9.24.1 21-Apr-2020  martin Sync with HEAD
 1.3 28-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the C11/C++11 spelling of the CAS primitives.
 1.2 21-Feb-2014  martin branches: 1.2.2;
Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.1 13-Apr-2007  thorpej branches: 1.1.2; 1.1.24;
file atomic_swap_8_cas.c was initially added on branch thorpej-atomic.
 1.1.24.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.2.4 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.3 17-Apr-2007  thorpej Work around pesky macro argument expansion rules.
 1.1.2.2 16-Apr-2007  thorpej Namespace protection for atomic operations.
 1.1.2.1 13-Apr-2007  thorpej Add generic atomic_swap routines built on atomic_cas.
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 28-Jun-2014  tls file atomic_swap_8_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2; 1.2.4;
Add a few missing namespace includes
 1.1 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 21-Feb-2014  yamt file atomic_xor_16_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_xor_16_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.2 23-Jun-2014  joerg branches: 1.2.4; 1.2.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.1 21-Feb-2014  martin branches: 1.1.2; 1.1.4;
Provide 32bit __sync ops based on atomic_cas_32.
 1.1.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1.4.1 21-Feb-2014  yamt file atomic_xor_32_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.2.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.2.26.1 21-Apr-2020  martin Sync with HEAD
 1.2.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.1 23-Jun-2014  tls file atomic_xor_32_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 18-Feb-2014  martin branches: 1.2.2; 1.2.4;
Make the _and_fetch_8 primitives return the new value they calculated
and set - not whatever is found in memory later.
 1.1 18-Feb-2014  martin Provide most missing __sync_*64 primitives for i386
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 18-Feb-2014  yamt file atomic_xor_64_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_xor_64_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.3 23-Jun-2014  joerg branches: 1.3.4; 1.3.26;
Add aliases for the builtins used to implement C11/C++11 atomics.
 1.2 21-Feb-2014  martin branches: 1.2.2; 1.2.4;
Add a few missing namespace includes
 1.1 21-Feb-2014  martin Provide 8 and 16 bit sync ops (using 16 bit and 8 bit cas)
 1.2.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.1 21-Feb-2014  yamt file atomic_xor_8_cas.c was added on branch yamt-pagecache on 2014-05-22 11:26:30 +0000
 1.2.2.1 10-Aug-2014  tls Rebase.
 1.3.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.3.26.1 21-Apr-2020  martin Sync with HEAD
 1.3.4.2 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 23-Jun-2014  tls file atomic_xor_8_cas.c was added on branch tls-maxphys on 2014-08-19 23:45:14 +0000
 1.6 23-Jun-2008  ad Install manual pages for the atomic ops.
 1.5 30-Apr-2008  martin branches: 1.5.2;
Convert TNF licenses to new 2 clause variant
 1.4 11-Feb-2008  ad branches: 1.4.4;
Clarify what membar_enter/membar_exit provide.
 1.3 02-Dec-2007  wiz branches: 1.3.4;
Typo fixes.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 12-Apr-2007  thorpej branches: 1.1.2;
file membar_ops.3 was initially added on branch thorpej-atomic.
 1.1.2.1 12-Apr-2007  thorpej Man pages for the atomic ops API.
 1.3.4.3 23-Mar-2008  matt sync with HEAD
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 02-Dec-2007  matt file membar_ops.3 was added on branch matt-armv6 on 2008-01-09 01:21:34 +0000
 1.4.4.1 18-May-2008  yamt sync with head.
 1.5.2.1 07-Sep-2008  wrstuden Delete a bunch of things that are now gone in head.
 1.8 09-Apr-2022  riastradh Introduce membar_acquire/release. Deprecate membar_enter/exit.

The names membar_enter/exit were unclear, and the documentation of
membar_enter has disagreed with the implementations on sparc,
powerpc, and even x86(!) for the entire time it has been in NetBSD.

The terms `acquire' and `release' are ubiquitous in the literature
today, and have been adopted in the C and C++ standards to mean
load-before-load/store and load/store-before-store, respectively,
which are exactly the orderings required by acquiring and releasing a
mutex, as well as other useful applications like decrementing a
reference count and then freeing the underlying object if it went to
zero.

Originally I proposed changing one word in the documentation for
membar_enter to make it load-before-load/store instead of
store-before-load/store, i.e., to make it an acquire barrier. I
proposed this on the grounds that

(a) all implementations guarantee load-before-load/store,
(b) some implementations fail to guarantee store-before-load/store,
and
(c) all uses in-tree assume load-before-load/store.

I verified parts (a) and (b) (except, for (a), powerpc didn't even
guarantee load-before-load/store -- isync isn't necessarily enough;
need lwsync in general -- but it _almost_ did, and it certainly didn't
guarantee store-before-load/store).

Part (c) might not be correct, however: under the mistaken assumption
that atomic-r/m/w then membar-w/rw is equivalent to atomic-r/m/w then
membar-r/rw, I only audited the cases of membar_enter that _aren't_
immediately after an atomic-r/m/w. All of those cases assume
load-before-load/store. But my assumption was wrong -- there are
cases of atomic-r/m/w then membar-w/rw that would be broken by
changing to atomic-r/m/w then membar-r/rw:

https://mail-index.netbsd.org/tech-kern/2022/03/29/msg028044.html

Furthermore, the name membar_enter has been adopted in other places
like OpenBSD where it actually does follow the documentation and
guarantee store-before-load/store, even if that order is not useful.
So the name membar_enter currently lives in a bad place where it
means either of two things -- r/rw or w/rw.

With this change, we deprecate membar_enter/exit, introduce
membar_acquire/release as better names for the useful pair (r/rw and
rw/w), and make sure the implementation of membar_enter guarantees
both what was documented _and_ what was implemented, making it an
alias for membar_sync.

While here, rework all of the membar_* definitions and aliases. The
new logic follows a rule to make it easier to audit:

membar_X is defined as an alias for membar_Y iff membar_X is
guaranteed by membar_Y.

The `no stronger than' relation is (the transitive closure of):

- membar_consumer (r/r) is guaranteed by membar_acquire (r/rw)
- membar_producer (w/w) is guaranteed by membar_release (rw/w)
- membar_acquire (r/rw) is guaranteed by membar_sync (rw/rw)
- membar_release (rw/w) is guaranteed by membar_sync (rw/rw)

And, for the deprecated membars:

- membar_enter (whether r/rw, w/rw, or rw/rw) is guaranteed by
membar_sync (rw/rw)
- membar_exit (rw/w) is guaranteed by membar_release (rw/w)

(membar_exit is identical to membar_release, but the name is
deprecated.)

Finally, while here, annotate some of the instructions with their
semantics. For powerpc, leave an essay with citations on the
unfortunate but -- as far as I can tell -- necessary decision to use
lwsync, not isync, for membar_acquire and membar_consumer.

Also add membar(3) and atomic(3) man page links.
 1.7 22-Feb-2014  martin branches: 1.7.26;
Try to hide the C runtime implementation specific __sync_* ops from librump,
to avoid duplicates.
 1.6 07-Dec-2013  skrll Add __sync_synchronize alias.
 1.5 21-Aug-2009  skrll branches: 1.5.6; 1.5.12;
__strong_alias(foo,foo) is... pointless.
 1.4 28-Apr-2008  martin branches: 1.4.12;
Remove clause 3 and 4 from TNF licenses
 1.3 29-Nov-2007  ad branches: 1.3.4; 1.3.8;
membar_read/write are gone.
 1.2 28-Nov-2007  ad Support files from the thorpej-atomic branch.
 1.1 18-Apr-2007  thorpej branches: 1.1.2;
file membar_ops_nop.c was initially added on branch thorpej-atomic.
 1.1.2.2 22-Apr-2007  thorpej Make sure namespace-cleansed aliases are avaialble for all atomic ops.
 1.1.2.1 18-Apr-2007  thorpej Generic membar_*() routines for platforms that don't require memory
barriers.
 1.3.8.1 18-May-2008  yamt sync with head.
 1.3.4.2 09-Jan-2008  matt sync with HEAD
 1.3.4.1 29-Nov-2007  matt file membar_ops_nop.c was added on branch matt-armv6 on 2008-01-09 01:21:34 +0000
 1.4.12.1 26-Aug-2009  matt Don't make a strong alias to the same name.
 1.5.12.1 19-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.26.2 21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.7.26.1 21-Apr-2020  martin Sync with HEAD

RSS XML Feed