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)
Mon, May 11, 11:54 PM
Unknown Object (File)
Mon, May 11, 11:39 PM
Unknown Object (File)
Mon, May 11, 11:26 PM
Unknown Object (File)
Wed, May 6, 11:15 PM
Unknown Object (File)
Wed, May 6, 8:09 AM
Unknown Object (File)
Wed, May 6, 4:07 AM
Unknown Object (File)
Sun, May 3, 8:53 PM
Unknown Object (File)
Mon, Apr 27, 12:24 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 Not Applicable
Unit
Tests Not Applicable