SVR5
dma_get_buf(D3)
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);
Description
dma_get_buf allocates memory for
a DMA
dma_buf(D4)
command block structure,
zeroes it out, and returns a pointer to
the structure used for DMA
ISA, EISA, or MCA
DMA channels.
Arguments
mode-
Specifies whether the caller is willing to sleep waiting for memory.
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.
Context and synchronization
If mode is set to DMA_NOSLEEP,
non-blockable, initialization, or interrupt
context.
If mode is set to DMA_SLEEP,
user
context.
Hardware applicability
PC-AT compatible platforms
with ISA, EISA, or MCA buses
Version applicability
ddi:
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
Future directions
This interface is expected to be replaced or modified in a future release.
References
dma_free_buf(D3),
dma_buf(D4)
``DMA'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005