FreeBSD/sys/dev/bhnd/bhndb/bhndb_private.h
/**
 * Find the next free dynamic window region in @p br.
 * 
 * @param br The resource state to search.
 */
Find the next free dynamic window region in @p br.

@param br The resource state to search.
Find the next free dynamic window region in @p br . @param br The resource state to search .
static inline struct bhndb_dw_alloc *
bhndb_dw_next_free(struct bhndb_resources *br)
{
	struct bhndb_dw_alloc *dw_free;
	if (bhndb_dw_exhausted(br))
		return (NULL);
	dw_free = &br->dw_alloc[__builtin_ctz(br->dwa_freelist)];
	KASSERT(LIST_EMPTY(&dw_free->refs),
	    ("free list out of sync with refs"));
	return (dw_free);
}
static inline struct bhndb_dw_alloc * bhndb_dw_next_free ( struct bhndb_resources * br ) { struct bhndb_dw_alloc * dw_free ; if ( bhndb_dw_exhausted ( br ) ) return ( NULL ) ; dw_free = & br -> dw_alloc [ __builtin_ctz ( br -> dwa_freelist ) ] ; KASSERT ( LIST_EMPTY ( & dw_free -> refs ) , ( " " ) ) ; return ( dw_free ) ; }
Find the next free dynamic window region in @p br.
Find the next free dynamic window region in @p br .