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.

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

k_fatal Aborts and enters fatal error handling mode.<br />

#include <br />

void k_fatal(<br />

unsigned long err_code, /* user's error code */<br />

unsigned long flags /* fatal condition attributes */<br />

)<br />

Description<br />

Arguments<br />

Return Value<br />

This system call allows the user application to pass control to the user-defined fatal<br />

error handler in the event of a nonrecoverable failure. k_fatal() forces a<br />

nonrecoverable shutdown of the pSOS+ environment and never returns to the<br />

caller.<br />

err_code Specifies a user-defined failure code that is passed to the fatal<br />

error handler. The failure code must be at least 0x20000000.<br />

flags The flags argument is ignored in the single-processor version<br />

of the pSOS+ kernel. In a multiprocessor system, the flags<br />

argument is used to determine whether the local node should be<br />

shut down or a system-wide shutdown should occur. flags is<br />

formed by selecting one of the following symbolic constants,<br />

which are defined in (see “Multiprocessor<br />

Considerations”).<br />

K_GLOBAL /<br />

K_LOCAL<br />

If the value of flags is K_GLOBAL, a global shutdown packet is sent to the master,<br />

which then sends a shutdown packet to every other node in the system.<br />

This call never returns to the caller.<br />

k_fatal() invocation causes global system<br />

shutdown / local node shutdown.<br />

1-40 <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!