release previously allocated DMA channel
void dma_relse(unsigned chan);
The dma_relse function releases
a DMA channel that was previously allocated with
DMA channel to be released.
Possible values are:
DMA_CH0, DMA_CH1, DMA_CH2, DMA_CH3
DMA_CH5, DMA_CH6, DMA_CH7
Channel 4 is not available.
Other channels may be permanently allocated by system drivers.
Consult the /usr/adm/messages file
for a list of channels that are in use.
function in your driver initialization routine to
display the DMA channel that you select.
This function should be called during the interrupt signaling
completion of the DMA transfer or as
soon as completion is detected (if polling is being used).
If you intend to share DMA channels,
you should use this routine.
Sharing DMA channels is highly recommended.
If no dmareq structures are in the pending-request queue,
dma_relse releases the channel,
wakes up any processes sleeping on the channel,
Otherwise it performs the next request on the queue
by calling the routine defined in the
xxd_proc member of the dmareq structure,
with a pointer to the dmareq structure as a parameter.
Because xxd_proc may be called
during another driver's interrupt,
the xxd_proc routine
should be as minimal as possible to accomplish its task.
Context and synchronization
Non-blockable, interrupt, user, or blockable
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
SVR5 DDI compatibility
This function is not supported for DDI drivers.
``DMA'' in HDK Technical Reference
for information about doing DMA operations
in DDI drivers.
The following example illustrates how to release a previously
/* finished with DMA for now, release channel */
dma_relse( DMA_CH1 );
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005