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

Details

Provenance
andrewAuthored on Wed, Jun 12, 1:04 PM
Reviewer
imp
Differential Revision
D45561: cdefs: Add __writeonly to mark write only vars
Parents
rG62cb671705eb: riscv: include ahci device to GENERIC.
Branches
Unknown
Tags
Unknown