[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

d_clear Kernel Service

Purpose

Frees a direct memory access (DMA) channel.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/dma.h>
void d_clear (channel_id)
int channel_id;

Parameter

channel_id DMA channel identifier returned by the d_init service.

Description

The d_clear kernel service cleans up a DMA channel. To clean up the DMA channel:

  1. Mark the DMA channel specified by the channel_id parameter as free.
  2. Reset the DMA channel.

The d_clear service is typically called by a device driver in its close routine. It has no return values.

Attention: The d_clear service, as with all DMA services, should not be called unless the DMA channel has been successfully allocated with the d_init service. The d_complete service must have been called to clean up after any DMA transfers. Otherwise, data will be lost and the system integrity will be compromised.

Execution Environment

The d_clear kernel service can be called from either the process or interrupt environment.

Return Values

The d_clear kernel service has no return values.

Implementation Specifics

The d_clear kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The d_complete kernel service, d_init kernel service.

I/O Kernel Services and Understanding Direct Memory Access (DMA) Transfers in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]