FreeBSD/sys/kern/subr_bus.c
/**
 * @brief Add a resource entry.
 *
 * This function adds a resource entry using the given @p type, @p
 * start, @p end and @p count values. A rid value is chosen by
 * searching sequentially for the first unused rid starting at zero.
 *
 * @param rl		the resource list to edit
 * @param type		the resource entry type (e.g. SYS_RES_MEMORY)
 * @param start		the start address of the resource
 * @param end		the end address of the resource
 * @param count		XXX end-start+1
 */
@brief Add a resource entry.
This function adds a resource entry using the given @p type, @p
start, @p end and @p count values. A rid value is chosen by
searching sequentially for the first unused rid starting at zero.


@brief Add a resource entry . This function adds a resource entry using the given @p type @p start @p end and @p count values . A rid value is chosen by searching sequentially for the first unused rid starting at zero .
int
resource_list_add_next(struct resource_list *rl, int type, rman_res_t start,
    rman_res_t end, rman_res_t count)
{
	int rid;
	rid = 0;
	while (resource_list_find(rl, type, rid) != NULL)
		rid++;
	resource_list_add(rl, type, rid, start, end, count);
	return (rid);
}
int resource_list_add_next ( struct resource_list * rl , int type , rman_res_t start , rman_res_t end , rman_res_t count ) { int rid ; rid = 0 ; while ( resource_list_find ( rl , type , rid ) != NULL ) rid ++ ; resource_list_add ( rl , type , rid , start , end , count ) ; return ( rid ) ; }
@brief Add a resource entry.
@brief Add a resource entry .