HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

IOWAIT

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM and CM callable.

Initiates completion operations for an I/O request.

Syntax

    I16          I16V   UDS  I16   U16

   fnum:=IOWAIT(filenum,buffer,length,cstation);

Functional Return

fnum

16-bit signed integer (assigned functional return)

The file number for which the completion occurred. If no completion occurred, zero is returned.

Parameters

filenum

16-bit signed integer by value (required)

The file number for which there is a pending I/O request. If you specify 0, the IOWAIT intrinsic waits for the first I/O completion.

buffer

user-defined structure (optional)

Passes an input buffer. This buffer must be large enough to contain the input record. It should be the same buffer specified in the original I/O request if that was a read request. This allows for proper recognition of EOF where applicable. The buffer parameter is required if not in priviledged mode, or the buffer parameter can be ommitted if the GETPRIVMODE intrinsic is called first.

length

16-bit signed integer by reference (optional)

Returns the length of the received or transmitted record. If the original request specified a byte count, the integer represents bytes; if the request specified half words, the integer represents half words. This parameter is pertinent only if the original I/O request was a read request. The FREAD intrinsic always returns zero as its functional return if you specify nowait I/O. In this case, the actual record length is returned in the length parameter of IOWAIT.

cstation

16-bit unsigned integer by reference (optional)

Returns the number of the calling station when completed (used for distributed systems).

(ASC) Not used for asynchronous devices.

Operation Notes

The IOWAIT intrinsic initiates completion operations for an I/O request. If you opened a file with the nowait I/O mode aoption of the FOPEN/HPFOPEN intrinsic (aoption bit (4:1) = 1), calls to either the IOWAIT or IODONTWAIT intrinsic must follow all read and write requests. This intrinsic initiates completion operations for the associated I/O request, including data transfer into your buffer area if necessary.

The IOWAIT intrinsic call must precede any subsequent I/O request against the file. Within this restriction, you can delay the IOWAIT intrinsic call as long as desired to allow effective I/O and processing overlap.

Condition Codes

CCE (2)

Request granted. I/O completion occurred with no errors.

CCG (0)

An end-of-file was encountered.

CCL (1)

Request denied. Normal I/O completion did not occur, because there were no I/O requests pending, a parameter error occurred, or an abnormal I/O completion occurred.

Related Information

Intrinsics

None

Commands

None

Manuals

Interprocess Communication Programmer's Guide (32650-90019)

Feedback to webmaster