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

Function resource_list_free

freebsd/kern/subr_bus.c:3139–3150  ·  view source on GitHub ↗

* @brief Reclaim memory used by a resource list. * * This function frees the memory for all resource entries on the list * (if any). * * @param rl the resource list to free */

Source from the content-addressed store, hash-verified

3137 * @param rl the resource list to free
3138 */
3139void
3140resource_list_free(struct resource_list *rl)
3141{
3142 struct resource_list_entry *rle;
3143
3144 while ((rle = STAILQ_FIRST(rl)) != NULL) {
3145 if (rle->res)
3146 panic("resource_list_free: resource entry is busy");
3147 STAILQ_REMOVE_HEAD(rl, link);
3148 free(rle, M_BUS);
3149 }
3150}
3151
3152/**
3153 * @brief Add a resource entry.

Callers 6

gic_v3_ofw_bus_attachFunction · 0.85
brcm_iproc_mdio_attachFunction · 0.85
arm_gic_add_childrenFunction · 0.85
fdt_localbus_reg_decodeFunction · 0.85
localbus_attachFunction · 0.85

Calls 2

panicFunction · 0.70
freeFunction · 0.70

Tested by

no test coverage detected