freebsd-dev/sys/riscv
Konstantin Belousov 30d4f9e888 Add atomic_load(9) and atomic_store(9) operations.
They provide relaxed-ordered atomic access semantic.  Due to the
FreeBSD memory model, the operations are syntaxical wrappers around
the volatile accesses.  The volatile qualifier is used to ensure that
the access not optimized out and in turn depends on the volatile
semantic as implemented by supported compilers.

The motivation for adding the operation is to help people coming from
other systems or knowing the C11/C++ standards where atomics have
special type and require use of the special access operations.  It is
still the case that FreeBSD requires plain load and stores of aligned
integer types to be atomic.

Suggested by:	jhb
Reviewed by:	alc, jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D13534
2017-12-19 09:59:20 +00:00
..
conf Update several more URLs 2017-10-29 08:17:03 +00:00
include Add atomic_load(9) and atomic_store(9) operations. 2017-12-19 09:59:20 +00:00
riscv Move instantiation of msgbufp from 9 MD files to subr_prf.c. 2017-12-07 07:55:38 +00:00