Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ io_dma_ctl(3I) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dup(2)

creat(2)

fcntl(2)

open(2)

io_dma_ctl(3I)  —  Series 300, 400 Only

NAME

io_dma_ctl() − control DMA allocation for an interface

SYNOPSIS

#include <sys/dil.h>

int io_dma_ctl(int eid, int mode);

DESCRIPTION

io_dma_ctl() is used to control system DMA allocation for a specific interface.  eid is the entity identifier for an open HP-IB, Centronics-compatible parallel, or GPIO device file returned by a previous call to open(), dup(), creat(), or fcntl() with an FDUPD command option. 

The mode parameter describes what type of DMA allocation the system should use for the interface associated with eid. mode is determined by selecting one of flags from the following list in <sys/dil.h>:

One and only one of the following flags must be specified:

DMA_ACTIVE Inform the DMA subsystem that this interface intends to use DMA and requires higher priority than slow devices.  This is the level of DMA allocation used by CS/80, Amigo, and SCSI devices. 

DMA_UNACTIVE Remove the effect of a previous DMA_ACTIVE. 

DMA_RESERVE Guarantee that a DMA channel will remain unlocked for future requests for DMA by all devices on this interface. 

DMA_UNRESERVE Remove the effect of a previous DMA_RESERVE. 

DMA_LOCK Lock a DMA channel for exclusive use by all devices on this interface. 

DMA_UNLOCK Unlock a DMA channel locked by this interface. 

RETURN VALUE

io_dma_ctl() returns 0 (zero) if successful, or −1 if an error was encountered. 

ERRORS

io_dma_ctl() fails under the following circumstances, and sets errno (see errno(2)) to the value indicated:

[EBADF] eid does not refer to an open file. 

[ENOTTY] eid does not refer to a Device I/O Library-compatible device file. 

[EIO] A timeout occurred (Series 300/400 only). 

[EINTR] Request was interrupted by a signal. 

[EINVAL] Interface was unable to reserve or lock a DMA channel. 

WARNINGS

Series 300/400 systems have only two DMA channels.  Use of DMA_LOCK could limit access to DMA resources by system disks, resulting in lower system performance. 

AUTHOR

io_dma_ctl() was developed by HP. 

SEE ALSO

dup(2), creat(2), fcntl(2), open(2). 

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026