06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

pSOS+ <strong>System</strong> <strong>Calls</strong> de_read<br />

de_read <strong>Read</strong>s from an I/O device.<br />

#include <br />

unsigned long de_read(<br />

unsigned long dev, /* major/minor device number */<br />

void *iopb, /* I/O parameter block address */<br />

void *retval /* return value */<br />

)<br />

Description<br />

Arguments<br />

Return Code<br />

The de_read() call is used to read data from a device. It invokes the device read<br />

routine of a pSOS+ device driver specified by the dev argument. This service<br />

normally requires additional parameters contained in the I/O parameter block,<br />

such as the address of a data area to hold the data and the number of data units to<br />

read.<br />

dev Specifies the major and minor device numbers, which are stored in<br />

the upper and lower 16 bits, respectively.<br />

iopb Points to an I/O parameter block, the contents of which are driverspecific.<br />

retval Points to a variable that receives a driver-specific value returned by<br />

the driver. For example, it can hold the actual number of data units<br />

read.<br />

This call returns 0 on success, or an error code on failure. In addition to the error<br />

codes listed below, other driver-specific errors may be returned.<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 1-19<br />

1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!