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

@returns             nothing
@brief Releases all the resources in a list . @param rl The resource list to purge . @returns nothing
void
resource_list_purge(struct resource_list *rl)
{
	struct resource_list_entry *rle;
	while ((rle = STAILQ_FIRST(rl)) != NULL) {
		if (rle->res)
			bus_release_resource(rman_get_device(rle->res),
			    rle->type, rle->rid, rle->res);
		STAILQ_REMOVE_HEAD(rl, link);
		free(rle, M_BUS);
	}
}
void resource_list_purge ( struct resource_list * rl ) { struct resource_list_entry * rle ; while ( ( rle = STAILQ_FIRST ( rl ) ) != NULL ) { if ( rle -> res ) bus_release_resource ( rman_get_device ( rle -> res ) , rle -> type , rle -> rid , rle -> res ) ; STAILQ_REMOVE_HEAD ( rl , link ) ; free ( rle , M_BUS ) ; } }
@brief Releases all the resources in a list.
@brief Releases all the resources in a list .