HomeFreeBSD

cdefs: Add __writeonly to mark write only vars

Description

cdefs: Add __writeonly to mark write only vars

When a variable in write only and can't be removed, e.g. for API
reasons, it is useful to document this fact similar to diagused
and
witness_used.

Add __writeonly to tell the compiler and anyone looking at the code
that this variable is expected to only be written to, and to not
raise and error.

Reviewed by: imp, kib
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45561

(cherry picked from commit a7ae78caaa17ff840da844c1dcaa780d194c9e20)

Details

Provenance
andrewAuthored on Jun 12 2024, 1:04 PM
Parents
rG258672fe62af: arm64: Fix indentation to be consistent
Branches
Unknown
Tags
Unknown