Changeset 8ed3d52e in rtems


Ignore:
Timestamp:
Oct 12, 2009, 4:17:19 PM (10 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
68b0a2a8
Parents:
bff419ff
Message:

Introduce rtems_error_code_t.
Minor portability code-massaging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/include/rtems/error.h

    rbff419ff r8ed3d52e  
    1212#define _RTEMS_RTEMS_ERROR_H
    1313
     14#include <rtems/score/interr.h>
     15
    1416#ifdef __cplusplus
    1517extern "C" {
    1618#endif
     19
     20typedef Internal_errors_t rtems_error_code_t;
    1721
    1822/*
     
    2024 */
    2125
    22 #define RTEMS_ERROR_ERRNO  (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */
     26#define RTEMS_ERROR_ERRNO  (1<<((sizeof(rtems_error_code_t) * CHAR_BIT) - 2)) /* hi bit; use 'errno' */
    2327#define RTEMS_ERROR_PANIC  (RTEMS_ERROR_ERRNO / 2)       /* err fatal; no return */
    2428#define RTEMS_ERROR_ABORT  (RTEMS_ERROR_ERRNO / 4)       /* err is fatal; panic */
     
    2832
    2933const char *rtems_status_text(rtems_status_code);
    30 int   rtems_error(int error_code, const char *printf_format, ...);
     34int   rtems_error(rtems_error_code_t error_code, const char *printf_format, ...);
    3135#ifdef __GNUC__
    3236void  rtems_panic(const char *printf_format, ...);
Note: See TracChangeset for help on using the changeset viewer.