MCPcopy Create free account
hub / github.com/F-Stack/f-stack / resource_list_purge

Function resource_list_purge

freebsd/kern/subr_bus.c:3653–3665  ·  view source on GitHub ↗

* @brief Releases all the resources in a list. * * @param rl The resource list to purge. * * @returns nothing */

Source from the content-addressed store, hash-verified

3651 * @returns nothing
3652 */
3653void
3654resource_list_purge(struct resource_list *rl)
3655{
3656 struct resource_list_entry *rle;
3657
3658 while ((rle = STAILQ_FIRST(rl)) != NULL) {
3659 if (rle->res)
3660 bus_release_resource(rman_get_device(rle->res),
3661 rle->type, rle->rid, rle->res);
3662 STAILQ_REMOVE_HEAD(rl, link);
3663 free(rle, M_BUS);
3664 }
3665}
3666
3667device_t
3668bus_generic_add_child(device_t dev, u_int order, const char *name, int unit)

Callers

nothing calls this directly

Calls 3

bus_release_resourceFunction · 0.85
rman_get_deviceFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected