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.

pRPC+ Error Codes Error Codes<br />

B.5 pRPC+ Error Codes<br />

When a pRPC+ system call generates an error, an error code is loaded into an internal<br />

variable that can be read through the macro errno(). One errno variable exists<br />

for each task. If the return value of a pRPC+ system call indicates an error, your<br />

application should examine the errno variable to determine the cause of the error.<br />

See the description of errno() on page 3-27 for more information.<br />

Table B-9 lists the error codes of the pRPC+ subcomponent. Each listing includes<br />

the error code’s hexadecimal number, its mnemonic and description, and the system<br />

calls that can return it. The error code mnemonics are also defined in<br />

.<br />

TABLE B-9 pRPC+ Error Codes<br />

Hex Mnemonic and Description <strong>System</strong> Call(s)<br />

0x5101 FAT_PRPC_CHKSUM: Corrupted ROM. This error originates in pRPC+<br />

initialization.<br />

0x5102 FAT_PRPC_MEM: Insufficient memory to<br />

hold pRPC+ data.<br />

0x5104 FAT_PRPC_TASKCREATE: Cannot start<br />

pmap.<br />

B.6 Driver Error Codes<br />

The tables below list the error codes returned by <strong>pSO<strong>System</strong></strong> drivers. Each driver’s<br />

table lists all the error codes returned by that driver. Error code information includes<br />

hexadecimal numbers, mnemonics and descriptions.<br />

Drivers return error codes through the pSOS+ Kernel-to-Driver Interface using the<br />

out_retval element of the ioparms structure. The contents of out_retval are<br />

copied to the variable pointed to by the service call input parameter retval. The<br />

parameter retval is part of the Application-to-pSOS+ Interface. For example, any<br />

driver errors resulting from a de_read() service call to a driver are returned at the<br />

address pointed to by the retval argument using the following syntax:<br />

err_code = de_read(dev, iopb, &retval);<br />

This error originates in pRPC+<br />

initialization.<br />

This error originates in pRPC+<br />

initialization.<br />

See the chapter “I/O <strong>System</strong>” in <strong>pSO<strong>System</strong></strong> <strong>System</strong> Concepts for more information<br />

on the pSOS+ Kernel-to-Driver Interface and the Application-to-pSOS+ Interface.<br />

B-44 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

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

Saved successfully!

Ooh no, something went wrong!