Subject: bus_dmamap_load: struct proc *p: finding process p
To: None <tech-kern@NetBSD.org>
From: Sam Thigpen <sthigpen@sdf.lonestar.org>
List: tech-kern
Date: 10/04/2004 02:37:55
old question:
bus_dmamap_load __P((bus_dma_tag_t tag, bus_dma_handle_t dmah,
caddr_t va, size_t size, struct proc *p, int flags));
^^^^^^^^^^^^^^
Accepted way getting for getting struct proc *p?
ath.c has :
error = bus_dmamap_load(sc->sc_dmat, sc->sc_ddmamap,
sc->sc_desc, sc->sc_desc_len,
ath_load_cb, &sc->sc_desc_paddr,
BUS_DMA_NOWAIT);
...
#ifdef __FreeBSD__
static void ath_load_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
{
bus_addr_t *paddr = (bus_addr_t*) arg;
*paddr = segs->ds_addr;
}
#endif
Sam.
sthigpen@freeshell.org
http://sthigpen.freeshell.org/code/acx/netbsd