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, Sep 24, 4:11 PM
Unknown Object (File)
Sun, Sep 20, 6:21 AM
Unknown Object (File)
Fri, Sep 18, 8:28 PM
Unknown Object (File)
Fri, Sep 18, 7:28 PM
Unknown Object (File)
Fri, Sep 18, 5:11 PM
Unknown Object (File)
Thu, Sep 17, 11:23 AM
Unknown Object (File)
Wed, Sep 16, 10:36 AM
Unknown Object (File)
Wed, Sep 9, 10:44 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