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

4.104.114.84.95
Last change on this file since 7945944 was 7945944, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/28/05 at 08:04:27

New header guards.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/**
2 * @file rtems/error.h
3 */
4
5/*
6 *  Defines and externs for rtems error reporting
7 *
8 *  $Id$
9 */
10
11#ifndef _RTEMS_RTEMS_ERROR_H
12#define _RTEMS_RTEMS_ERROR_H
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
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
29const char *rtems_status_text(rtems_status_code);
30int   rtems_error(int error_code, const char *printf_format, ...);
31#ifdef __GNUC__
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 */
39#else
40void  rtems_panic(const char *printf_format, ...);
41#endif
42
43extern int rtems_panic_in_progress;
44
45#ifdef __cplusplus
46}
47#endif
48
49
50#endif
51/* end of include file */
Note: See TracBrowser for help on using the repository browser.