FreeBSD/sys/kern/subr_bus.c
/**
 * @brief Find a resource entry by type and rid.
 *
 * @param rl		the resource list to search
 * @param type		the resource entry type (e.g. SYS_RES_MEMORY)
 * @param rid		the resource identifier
 *
 * @returns the resource entry pointer or NULL if there is no such
 * entry.
 */
@brief Find a resource entry by type and rid.
@param rl            the resource list to search
@param type          the resource entry type
@param rid           the resource identifier

@returns the resource entry pointer or NULL if there is no such
entry.
@brief Find a resource entry by type and rid . @param rl the resource list to search @param type the resource entry type @param rid the resource identifier @returns the resource entry pointer or NULL if there is no such entry .
struct resource_list_entry *
resource_list_find(struct resource_list *rl, int type, int rid)
{
	struct resource_list_entry *rle;
	STAILQ_FOREACH(rle, rl, link) {
		if (rle->type == type && rle->rid == rid)
			return (rle);
	}
	return (NULL);
}
struct resource_list_entry * resource_list_find ( struct resource_list * rl , int type , int rid ) { struct resource_list_entry * rle ; STAILQ_FOREACH ( rle , rl , link ) { if ( rle -> type == type && rle -> rid == rid ) return ( rle ) ; } return ( NULL ) ; }
@brief Find a resource entry by type and rid.
@brief Find a resource entry by type and rid .