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
F163058952: D44124.id135113.diff
Sun, Jul 19, 5:18 PM
Unknown Object (File)
Sat, Jul 18, 3:42 AM
Unknown Object (File)
Tue, Jun 30, 5:19 AM
Unknown Object (File)
Mon, Jun 29, 10:39 PM
Unknown Object (File)
Fri, Jun 26, 4:01 AM
Unknown Object (File)
Thu, Jun 25, 12:33 PM
Unknown Object (File)
Mon, Jun 22, 1:20 AM
Unknown Object (File)
Sat, Jun 20, 10:01 AM
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