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, Dec 6, 6:44 AM
Unknown Object (File)
Thu, Nov 27, 12:56 AM
Unknown Object (File)
Tue, Nov 25, 10:30 PM
Unknown Object (File)
Tue, Nov 25, 8:37 AM
Unknown Object (File)
Tue, Nov 25, 8:37 AM
Unknown Object (File)
Tue, Nov 25, 8:37 AM
Unknown Object (File)
Tue, Nov 25, 8:36 AM
Unknown Object (File)
Mon, Nov 24, 12:14 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 58138
Build 55026: arc lint + arc unit