Page MenuHomeFreeBSD

bus: Add __BUS_ACCESSOR_DEFAULT
ClosedPublic

Authored by jhb on Feb 18 2026, 3:48 PM.
Tags
None
Referenced Files
F164854457: D55353.id172628.diff
Tue, Aug 4, 8:15 AM
Unknown Object (File)
Tue, Aug 4, 5:06 AM
Unknown Object (File)
Tue, Aug 4, 1:51 AM
Unknown Object (File)
Mon, Aug 3, 11:40 PM
Unknown Object (File)
Mon, Aug 3, 7:30 AM
Unknown Object (File)
Sun, Aug 2, 12:29 AM
Unknown Object (File)
Fri, Jul 31, 12:03 AM
Unknown Object (File)
Thu, Jul 30, 3:18 PM
Subscribers
None

Details

Summary

This macro is similar to __BUS_ACCESSOR in that it creates three
helper routines for an ivar, but the "get" wrapper returns a default
value if BUS_READ_IVAR does not return a value.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Feb 18 2026, 3:48 PM
jhb created this revision.
imp added inline comments.
sys/sys/bus.h
1030

no problem with C having 'default' as a keyword? I know it's cpp, just read a little odd.

This revision is now accepted and ready to land.Feb 18 2026, 4:24 PM
sys/sys/bus.h
1030

I think it doesn't make it into what the compiler sees as it is only for cpp.

This revision was automatically updated to reflect the committed changes.