06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pREPC+ <strong>System</strong> <strong>Calls</strong> errno<br />

errno The error number returned by the last failing system call.<br />

#include <br />

int errno;<br />

Description<br />

Return Value<br />

Error Codes<br />

Notes<br />

The errno is a macro which expands to a modifiable lvalue that has type int. Its<br />

value can be set to a positive number by several library or system calls. The macro<br />

is defined in the header file errno.h. It returns the error number from the last<br />

failing system call or library function.<br />

If the macro definition is suppressed (by using #undef pre-processor directive), or<br />

an application defines an identifier with the name errno, the behavior is undefined.<br />

The value of errno is zero at task startup, but is never set to zero by any library<br />

function or system service.<br />

This macro returns the current value of errno for the calling task.<br />

Refer to Appendix B.<br />

errno generates a call to the pSOS+ errno_addr() system service.<br />

Callable From<br />

■ Task<br />

<strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong> 3-27<br />

3

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

Saved successfully!

Ooh no, something went wrong!