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_cntrl<br />

de_cntrl Requests a special I/O device service.<br />

#include <br />

unsigned long de_cntrl(<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_cntrl() call invokes the device control routine of a pSOS+ device driver<br />

specified by the dev argument. The functionality of a device control routine depends<br />

entirely on the device driver implementation. It can include anything that cannot be<br />

categorized under the other five I/O services. de_cntrl() for a device can be used<br />

to perform multiple input and output subfunctions. In such cases, extra parameters<br />

in the I/O parameter block can designate the subfunction.<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.<br />

This call returns 0 on success or an error code on failure. Beside the error codes<br />

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

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

1

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

Saved successfully!

Ooh no, something went wrong!