Page MenuHomeFreeBSD

atomic_common.h: Fix the volatile qualifier placement in atomic_load_ptr
ClosedPublic

Authored by jrtc27 on Sep 20 2020, 10:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 25, 10:21 PM
Unknown Object (File)
Wed, Dec 24, 3:18 AM
Unknown Object (File)
Dec 11 2025, 12:31 PM
Unknown Object (File)
Nov 27 2025, 4:36 AM
Unknown Object (File)
Nov 16 2025, 12:10 AM
Unknown Object (File)
Nov 5 2025, 9:23 AM
Unknown Object (File)
Nov 5 2025, 9:18 AM
Unknown Object (File)
Nov 5 2025, 9:15 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable