Revision tags: release/14.2.0, release/13.4.0 |
|
#
5e9a82e8 |
| 19-Jul-2024 |
Olivier Certner <olce@FreeBSD.org> |
atomics: Constify loads
In order to match reality, allow using these functions with pointers on const objects, and bring us closer to C11.
Remove the '+' modifier in the atomic_load_acq_64_i586()'s
atomics: Constify loads
In order to match reality, allow using these functions with pointers on const objects, and bring us closer to C11.
Remove the '+' modifier in the atomic_load_acq_64_i586()'s inline asm statement's constraint for '*p' (the value to load). CMPXCHG8B always writes back some value, even when the value exchange does not happen in which case what was read is written back. atomic_load_acq_64_i586() further takes care of the operation atomically writing back the same value that was read in any case. All in all, this makes the inline asm's write back undetectable by any other code, whether executing on other CPUs or code on the same CPU before and after the call to atomic_load_acq_64_i586(), except for the fact that CMPXCHG8B will trigger a #GP(0) if the memory address is part of a read-only mapping. This unfortunate property is however out of scope of the C abstract machine, and in particular independent of whether the 'uint64_t' pointed to is declared 'const' or not.
Approved by: markj (mentor) MFC after: 5 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46887
show more ...
|
Revision tags: release/14.1.0, release/13.3.0, release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
f7e2f98b |
| 16-Jan-2023 |
Mark Johnston <markj@FreeBSD.org> |
atomic: Remove cdefs.h includes from atomic_*.h
Avoid including cdefs.h in system headers. Both headers now include types.h, and we can assume that that pulls in cdefs.h (required for __typeof usag
atomic: Remove cdefs.h includes from atomic_*.h
Avoid including cdefs.h in system headers. Both headers now include types.h, and we can assume that that pulls in cdefs.h (required for __typeof usage in some of the atomic macro expansions).
No functional change intended.
Reviewed by: imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D38039
show more ...
|
Revision tags: release/12.4.0 |
|
#
301a27dc |
| 11-Oct-2022 |
Mark Johnston <markj@FreeBSD.org> |
atomic: Style
Fixes: 30253da1a982 ("atomic: Add some type checking to plain atomic_load/store helpers") MFC after: 1 week
|
#
2bed7373 |
| 09-Aug-2022 |
Mark Johnston <markj@FreeBSD.org> |
atomic: Add plain atomic_load/store_bool()
Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36078
|
#
30253da1 |
| 25-Jul-2022 |
Mark Johnston <markj@FreeBSD.org> |
atomic: Add some type checking to plain atomic_load/store helpers
Reviewed by: rpokala, mjg, imp, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.f
atomic: Add some type checking to plain atomic_load/store helpers
Reviewed by: rpokala, mjg, imp, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35828
show more ...
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
9feff969 |
| 08-Aug-2021 |
Ed Maste <emaste@FreeBSD.org> |
Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights
These ones were unambiguous cases where the Foundation was the only listed copyright holder (in the associated license block).
S
Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights
These ones were unambiguous cases where the Foundation was the only listed copyright holder (in the associated license block).
Sponsored by: The FreeBSD Foundation
show more ...
|
Revision tags: release/13.0.0 |
|
#
e2494f75 |
| 23-Feb-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
atomic: add atomic_interrupt_fence()
with the semantic following C11 signal_fence, that is, it establishes ordering between its place and any interrupt handler executing on the same CPU.
Reviewed b
atomic: add atomic_interrupt_fence()
with the semantic following C11 signal_fence, that is, it establishes ordering between its place and any interrupt handler executing on the same CPU.
Reviewed by: markj, mjg, rlibby Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28909
show more ...
|
#
054ce2b0 |
| 25-Jan-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
atomic: add stub atomic_load_consume_ptr
|
#
cc96f92a |
| 25-Jan-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
atomic: make atomic_store_ptr type-aware
|
Revision tags: release/12.2.0 |
|
#
7d54cc91 |
| 21-Sep-2020 |
Jessica Clarke <jrtc27@FreeBSD.org> |
atomic_common.h: Fix the volatile qualifier placement in atomic_load_ptr
This was broken in r357940 which introduced the __typeof use. We need the volatile qualifier to be on the pointee not the poi
atomic_common.h: Fix the volatile qualifier placement in atomic_load_ptr
This was broken in r357940 which introduced the __typeof use. We need the volatile qualifier to be on the pointee not the pointer otherwise it does nothing. This was found by mhorne in D26498, noticing there was a problem (a spin loop condition was hoisted for RISC-V boot code) but not the root cause of it.
Reported by: mhorne Reviewed by: mhorne, mjg Approved by: mhorne, mjg Differential Revision: https://reviews.freebsd.org/D26500
show more ...
|
Revision tags: release/11.4.0 |
|
#
dca7f66f |
| 15-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357931 through r357965.
|
#
082a6b2a |
| 15-Feb-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
Make atomic_load_ptr type-aware
Returned value has type based on the argument, meaning consumers no longer have to cast in the commmon case.
This commit keeps the kernel compilable without patching
Make atomic_load_ptr type-aware
Returned value has type based on the argument, meaning consumers no longer have to cast in the commmon case.
This commit keeps the kernel compilable without patching the rest.
show more ...
|
#
542c56ea |
| 07-Nov-2019 |
Andrew Turner <andrew@FreeBSD.org> |
Add the missing volatile qualifier in atomic_store_ptr
MFC after: 1 week Sponsored by: DARPA, AFRL
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0 |
|
#
54b4b13c |
| 24-Dec-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r326936 through r327149.
|
#
30d4f9e8 |
| 19-Dec-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
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 a
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
show more ...
|