Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ureadc(D3DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ureadc(D3DK)  —  

NAME

ureadc − copy a character to space described by uio(D4DK) structure .IX \f4ureadc\fP(D3DK)

SYNOPSIS

#include <sys/uio.h>
int ureadc(int c, uio_t ∗uiop);

ARGUMENTS

cThe character to be copied. 

uiopPointer to the uio structure. 

DESCRIPTION

ureadc copies the character c into the space described by the uio structure pointed to by uiop. 

The uio_segflg member of the uio structure specifies the type of space to which the copy is made.  If uio_segflg is set to UIO_SYSSPACE the character is copied to a kernel address.  If uio_segflg is set to UIO_USERSPACE the character is copied to a user address. 

If the character is successfully copied, ureadc updates the appropriate members of the uio and iovec(D4DK) structures to reflect the copy (uio_offset and iov_base are incremented and uio_resid and iov_len are decremented). 

RETURN VALUE

ureadc returns 0 on success or an error number on failure. 

LEVEL

Base only if uio_segflg is set to UIO_USERSPACE.  Base or interrupt if uio_segflg is set to UIO_SYSSPACE. 

NOTES

May sleep if uio_segflg is set to UIO_USERSPACE. 

Driver-defined basic locks and read/write locks may be held across calls to this function if uio_segflg is UIO_SYSSPACE but may not be held if uio_segflg is UIO_USERSPACE. 

Driver-defined sleep locks may be held across calls to this function regardless of the value of uio_segflg. 

When holding locks across calls to this function, drivers must be careful to avoid creating a deadlock.  During the data transfer, page fault resolution might result in another I/O to the same device.  For example, this could occur if the driver controls the disk drive used as the swap device. 

SEE ALSO

uiomove(D3DK), uwritec(D3DK), iovec(D4DK), uio(D4DK)

DDI/DKI

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