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)
Fri, Nov 21, 11:22 PM
Unknown Object (File)
Thu, Nov 20, 10:21 PM
Unknown Object (File)
Wed, Nov 19, 3:58 AM
Unknown Object (File)
Sun, Nov 16, 8:29 PM
Unknown Object (File)
Sat, Nov 15, 7:18 PM
Unknown Object (File)
Mon, Nov 10, 10:32 AM
Unknown Object (File)
Tue, Nov 4, 12:11 AM
Unknown Object (File)
Mon, Oct 27, 11:05 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