Page MenuHomeFreeBSD

LinuxKPI: Use negative bit field size to trigger BUILD_BUG_ON_ZERO
ClosedPublic

Authored by wulf on Dec 27 2021, 11:02 PM.
Tags
None
Referenced Files
F106165792: D33674.diff
Thu, Dec 26, 11:34 AM
Unknown Object (File)
Mon, Dec 9, 6:11 AM
Unknown Object (File)
Nov 16 2024, 2:00 PM
Unknown Object (File)
Nov 8 2024, 6:41 AM
Unknown Object (File)
Nov 8 2024, 6:36 AM
Unknown Object (File)
Nov 8 2024, 4:40 AM
Unknown Object (File)
Nov 4 2024, 11:18 PM
Unknown Object (File)
Oct 31 2024, 10:05 AM

Details

Summary

compile time assertion on non-NULL pointers. Tests conducted show that
_Static_assert, negative array size method and current code does not
handle pointers well enough. Bit field method solves this problem.

This change is derrived from Linux implementation of BUILD_BUG_ON_ZERO.

MFC after: 1 week

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 43618
Build 40506: arc lint + arc unit