FreeBSD/sys/mips/mips/busdma_machdep.c
/*
 * This is the ctor function passed to uma_zcreate() for the pool of dma maps.
 * It'll need platform-specific changes if this code is copied.
 */
This is the ctor function passed to uma_zcreate() for the pool of dma maps.
It'll need platform-specific changes if this code is copied.
This is the ctor function passed to uma_zcreate () for the pool of dma maps . It ' ll need platform - specific changes if this code is copied .
static int
dmamap_ctor(void *mem, int size, void *arg, int flags)
{
	bus_dmamap_t map;
	bus_dma_tag_t dmat;
	map = (bus_dmamap_t)mem;
	dmat = (bus_dma_tag_t)arg;
	dmat->map_count++;
	map->dmat = dmat;
	map->flags = 0;
	map->slist = NULL;
	map->allocbuffer = NULL;
	map->sync_count = 0;
	STAILQ_INIT(&map->bpages);
	return (0);
}
static int dmamap_ctor ( void * mem , int size , void * arg , int flags ) { bus_dmamap_t map ; bus_dma_tag_t dmat ; map = ( bus_dmamap_t ) mem ; dmat = ( bus_dma_tag_t ) arg ; dmat -> map_count ++ ; map -> dmat = dmat ; map -> flags = 0 ; map -> slist = NULL ; map -> allocbuffer = NULL ; map -> sync_count = 0 ; STAILQ_INIT ( & map -> bpages ) ; return ( 0 ) ; }
This is the ctor function passed to uma_zcreate() for the pool of dma maps.
This is the ctor function passed to uma_zcreate () for the pool of dma maps .