Page MenuHomeFreeBSD

new-bus: Introduce a simpler bus API for managing resources
ClosedPublic

Authored by jhb on Feb 27 2024, 7:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 27, 12:08 PM
Unknown Object (File)
Thu, Feb 27, 4:41 AM
Unknown Object (File)
Wed, Feb 26, 7:11 PM
Unknown Object (File)
Wed, Feb 26, 12:58 AM
Unknown Object (File)
Tue, Feb 25, 10:11 PM
Unknown Object (File)
Jan 25 2025, 5:41 PM
Unknown Object (File)
Jan 10 2025, 10:53 PM
Unknown Object (File)
Jan 10 2025, 8:02 PM
Subscribers

Details

Summary

Remove the 'type' and 'rid' arguments from the wrapper bus API
functions (e.g. bus_release_resource) that accept a struct resource.
The "new" versions extract the 'type' and/or 'rid' from the passed in
resource object via rman_get_type and rman_get_rid.

This commit adds the new API as functions with a _new suffix. Wrapper
macros choose between the old and new functions based on the number of
arguments provided to the macro. This commit does not change the API
but can be safely MFCd to older branches so long as older kernels use
rman_set_type when allocating resources.

Future commits will push the removal of these extraneous arguments
through the bus implementation.

Diff Detail

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