source: rtems/cpukit/libcsupport/include/rtems/error.h @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/**
2 * @file rtems/error.h
3 *
4 * Defines and externs for rtems error reporting
5 */
6
7
8#ifndef _RTEMS_RTEMS_ERROR_H
9#define _RTEMS_RTEMS_ERROR_H
10
11#include <rtems/rtems/status.h>
12#include <rtems/score/interr.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18typedef Internal_errors_t rtems_error_code_t;
19
20/*
21 * rtems_error() and rtems_panic() support
22 */
23
24#if 0
25/* not 16bit-int host clean */
26#define RTEMS_ERROR_ERRNO  (1<<((sizeof(rtems_error_code_t) * CHAR_BIT) - 2)) /* hi bit; use 'errno' */
27#define RTEMS_ERROR_PANIC  (RTEMS_ERROR_ERRNO / 2)       /* err fatal; no return */
28#define RTEMS_ERROR_ABORT  (RTEMS_ERROR_ERRNO / 4)       /* err is fatal; panic */
29#else
30#define RTEMS_ERROR_ERRNO  (0x40000000) /* hi bit; use 'errno' */
31#define RTEMS_ERROR_PANIC  (0x20000000) /* err fatal; no return */
32#define RTEMS_ERROR_ABORT  (0x10000000) /* err is fatal; panic */
33#endif
34
35#define RTEMS_ERROR_MASK \
36  (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | RTEMS_ERROR_PANIC) /* all */
37
38const char *rtems_status_text(rtems_status_code sc);
39int   rtems_error(
40  rtems_error_code_t error_code,
41  const char *printf_format,
42  ...
43);
44void rtems_panic(
45  const char *printf_format,
46  ...
47) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
48
49extern int rtems_panic_in_progress;
50
51#ifdef __cplusplus
52}
53#endif
54
55
56#endif
57/* end of include file */
Note: See TracBrowser for help on using the repository browser.