dma_get_buf(D3) dma_get_buf(D3)
NAME
dma_get_buf - allocate a DMA buffer descriptor
SYNOPSIS
#include <sys/types.h>
#include <sys/dma.h>
#include <sys/ddi.h>
struct dma_buf *dma_get_buf(uchar_t mode);
Arguments
mode Specifies whether the caller is willing to sleep
waiting for memory.
DESCRIPTION
dma_get_buf allocates memory for a DMA command block structure
[see dma_buf(D4)], zeroes it out, and returns a pointer to the
structure.
Return Values
dma_get_buf returns a pointer to the allocated DMA control
block. If DMA_NOSLEEP is specified and memory for a dma_buf
is not immediately available, dma_get_buf returns a NULL
pointer.
USAGE
If mode is set to DMA_SLEEP, the caller will sleep if
necessary until the memory for a dma_buf is available. If
mode is set to DMA_NOSLEEP, the caller will not sleep, but
dma_get_buf will return NULL if memory for a dma_buf is not
immediately available.
Level
Base only if mode is set to DMA_SLEEP.
Initialization, Base or Interrupt if mode is set to
DMA_NOSLEEP.
Synchronization Constraints
May sleep if mode is set to DMA_SLEEP.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
REFERENCES
dma_free_buf(D3), dma_buf(D4)
Copyright 1994 Novell, Inc. Page 1
dma_get_buf(D3) dma_get_buf(D3)
NOTICES
Portability
AT-compatible architectures
Applicability
ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp
Future Directions
This interface is expected to be replaced or modified in a
future release.
Copyright 1994 Novell, Inc. Page 2