Nut/OS  5.0.5
API Reference
fatal.c File Reference

Fatal error handler. More...

#include <stdio.h>
#include <sys/atom.h>
#include <sys/nutdebug.h>
Include dependency graph for fatal.c:

Functions

void NUTFATAL (const char *func, const char *file, int line, const char *expected)
 This function is called on fatal errors.

Detailed Description

Fatal error handler.

 * $Id: fatal.c 4473 2012-08-20 15:12:45Z haraldkipp $
 * 

Function Documentation

void NUTFATAL ( const char *  func,
const char *  file,
int  line,
const char *  expected 
)

This function is called on fatal errors.

The function will enter a critical section and print a description of the problem to stdout. It is assumed, that stdout is available and has been assigned to a debug output device, such as devDebug or similar. Then the function will enter an endless loop, which freezes the system.

If this is not, what the application is expected to do on fatal errors or if no debug device has been assigned to stdout, the application must define its own version of this routine.

Parameters:
funcName of the function or thread, where the error has been detected.
fileName of the source file, that contains the function.
lineLine number within the source file.
expectedAssertion which should have been true, but is not.

References NUTPANIC().

Referenced by NutTimerIntr().

Here is the call graph for this function: