source: rtems/cpukit/libcsupport/include/rtems/error.h @ d2b4fcd

4.104.114.84.95
Last change on this file since d2b4fcd was 4d3017a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/02/04 at 18:04:55

Add doxygen preamble.

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[4d3017a]1/**
2 * @file rtems/error.h
3 */
4
[b06e68ef]5/*
6 *  Defines and externs for rtems error reporting
7 *
8 *  $Id$
9 */
10
[c64e4ed4]11#ifndef __RTEMS_ERROR_h
12#define __RTEMS_ERROR_h
13
[df49c60]14#ifdef __cplusplus
15extern "C" {
16#endif
17
[b06e68ef]18/*
19 * rtems_error() and rtems_panic() support
20 */
21
22#define RTEMS_ERROR_ERRNO  (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */
23#define RTEMS_ERROR_PANIC  (RTEMS_ERROR_ERRNO / 2)       /* err fatal; no return */
24#define RTEMS_ERROR_ABORT  (RTEMS_ERROR_ERRNO / 4)       /* err is fatal; panic */
25
26#define RTEMS_ERROR_MASK  (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \
27                             RTEMS_ERROR_PANIC) /* all */
28
[c64e4ed4]29const char *rtems_status_text(rtems_status_code);
30int   rtems_error(int error_code, const char *printf_format, ...);
[8389628]31#ifdef __GNUC__
[bd71da7]32void  rtems_panic(const char *printf_format, ...);
33/*
34 *  We should be able to use this attribute but gcc complains that
35 *  rtems_panic does in fact return. :(
36 *
37 *      __attribute__ ((__noreturn__));
38 */
[8389628]39#else
[c64e4ed4]40void  rtems_panic(const char *printf_format, ...);
[8389628]41#endif
[b06e68ef]42
43extern int rtems_panic_in_progress;
44
[df49c60]45#ifdef __cplusplus
46}
47#endif
48
49
[c64e4ed4]50#endif
51/* end of include file */
Note: See TracBrowser for help on using the repository browser.