Page MenuHomeFreeBSD

cdefs: Add __writeonly to mark write only vars
ClosedPublic

Authored by andrew on Jun 11 2024, 11:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 5:50 PM
Unknown Object (File)
Nov 24 2024, 5:21 AM
Unknown Object (File)
Nov 24 2024, 5:17 AM
Unknown Object (File)
Nov 24 2024, 5:17 AM
Unknown Object (File)
Nov 24 2024, 5:03 AM
Unknown Object (File)
Nov 21 2024, 4:18 AM
Unknown Object (File)
Nov 21 2024, 4:17 AM
Unknown Object (File)
Oct 30 2024, 2:20 AM
Subscribers
None

Details

Summary

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.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable