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)
Sat, Apr 11, 4:26 AM
Unknown Object (File)
Sat, Apr 11, 4:24 AM
Unknown Object (File)
Tue, Apr 7, 3:38 AM
Unknown Object (File)
Fri, Apr 3, 12:31 PM
Unknown Object (File)
Thu, Apr 2, 10:20 PM
Unknown Object (File)
Thu, Apr 2, 11:50 AM
Unknown Object (File)
Thu, Mar 26, 8:31 PM
Unknown Object (File)
Sun, Mar 15, 4:26 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