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, Jan 30, 7:44 AM
Unknown Object (File)
Wed, Jan 29, 2:58 AM
Unknown Object (File)
Tue, Jan 28, 5:28 AM
Unknown Object (File)
Mon, Jan 27, 3:46 PM
Unknown Object (File)
Fri, Jan 24, 5:46 PM
Unknown Object (File)
Mon, Jan 13, 10:57 PM
Unknown Object (File)
Mon, Jan 6, 4:44 PM
Unknown Object (File)
Dec 5 2024, 5:50 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