OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libc/] [error.h] - Blame information for rev 507

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  Defines and externs for rtems error reporting
3
 *
4
 *  $Id: error.h,v 1.2 2001-09-27 12:01:15 chris Exp $
5
 */
6
 
7
#ifndef __RTEMS_ERROR_h
8
#define __RTEMS_ERROR_h
9
 
10
#ifdef __cplusplus
11
extern "C" {
12
#endif
13
 
14
/*
15
 * rtems_error() and rtems_panic() support
16
 */
17
 
18
#define RTEMS_ERROR_ERRNO  (1<<((sizeof(int) * 8) - 2)) /* hi bit; use 'errno' */
19
#define RTEMS_ERROR_PANIC  (RTEMS_ERROR_ERRNO / 2)       /* err fatal; no return */
20
#define RTEMS_ERROR_ABORT  (RTEMS_ERROR_ERRNO / 4)       /* err is fatal; panic */
21
 
22
#define RTEMS_ERROR_MASK  (RTEMS_ERROR_ERRNO | RTEMS_ERROR_ABORT | \
23
                             RTEMS_ERROR_PANIC) /* all */
24
 
25
const char *rtems_status_text(rtems_status_code);
26
int   rtems_error(int error_code, const char *printf_format, ...);
27
#ifdef __GNUC__
28
void  rtems_panic(const char *printf_format, ...);
29
/*
30
 *  We should be able to use this attribute but gcc complains that
31
 *  rtems_panic does in fact return. :(
32
 *
33
 *      __attribute__ ((__noreturn__));
34
 */
35
#else
36
void  rtems_panic(const char *printf_format, ...);
37
#endif
38
 
39
extern int rtems_panic_in_progress;
40
 
41
#ifdef __cplusplus
42
}
43
#endif
44
 
45
 
46
#endif
47
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.