source: svn/trunk/newcon3bcm2_21bu/dta/src/sim/bstd.h @ 23

Last change on this file since 23 was 2, checked in by phkim, 11 years ago

1.phkim

  1. revision copy newcon3sk r27
  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#ifndef BSTD_DEFS_H__
2#define BSTD_DEFS_H__
3
4#include <iso646.h>
5#include <limits.h>
6#include <stdarg.h>
7#include <stdint.h>
8#include <stddef.h>
9#include <stdbool.h>
10#include <unistd.h>
11#include <assert.h>
12#include <stdio.h>
13
14#define BSTD_UNUSED(x) ((void)x)
15
16typedef int BERR_Code;
17#define BDBG_MODULE(x)
18#define BDBG_ASSERT(x)  assert(x)
19
20#if BDBG_DEBUG_BUILD
21#define BDBG_MSG(x)     printf("%15s@%5d,", strrchr(__FILE__,'/')? strrchr(__FILE__,'/')+1 : __FILE__,__LINE__);printf x;
22#define BDBG_WRN(x)     printf("%15s@%5d,", strrchr(__FILE__,'/')? strrchr(__FILE__,'/')+1 : __FILE__,__LINE__);printf x;
23#define BDBG_ERR(x)     printf("%15s@%5d,", strrchr(__FILE__,'/')? strrchr(__FILE__,'/')+1 : __FILE__,__LINE__);printf x;
24#else
25#define BDBG_MSG(x)     printf x
26#define BDBG_WRN(x)     printf x
27#define BDBG_ERR(x)     printf x
28#endif
29
30#define BDBG_SetModuleLevel(x,y)
31#define BERR_TRACE(x)   x
32
33/* standard error codes */
34
35#define BERR_SUCCESS              0  /* success (always zero) */
36#define BERR_NOT_INITIALIZED      1  /* parameter not initialized */
37#define BERR_INVALID_PARAMETER    2  /* parameter is invalid */
38#define BERR_OUT_OF_SYSTEM_MEMORY 3  /* out of KNI module memory */
39#define BERR_OUT_OF_DEVICE_MEMORY 4  /* out of MEM module memory */
40#define BERR_TIMEOUT              5  /* reached timeout limit */
41#define BERR_OS_ERROR             6  /* generic OS error */
42#define BERR_LEAKED_RESOURCE      7  /* resource being freed has attached
43                                        resources that haven't been freed */
44#define BERR_NOT_SUPPORTED                8  /* requested feature is not supported */
45#define BERR_UNKNOWN              9  /* unknown */
46
47#endif /* BSTD_DEFS_H__ */
48
Note: See TracBrowser for help on using the repository browser.