XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
standard.h
浏览该文件的文档.
1
13#ifndef __xwos_standard_h__
14#define __xwos_standard_h__
15
16#include <cfg/project.h>
17#include <xwos/lib/rule.h>
18#include <xwos/lib/compiler.h>
19#include <xwos/version.h>
20#include <xwos/lib/type.h>
21#include <xwos/lib/error.h>
22#include <xwos/ospl/isa.h>
23#include <xwos/lib/mb.h>
24
41#define interface struct
42
43#ifndef xw_array_size
48# define xw_array_size(ay) (sizeof(ay) / sizeof((ay)[0]))
49#endif
50
51#if defined(XWOSCFG_BUG) && (1 == XWOSCFG_BUG)
52# if defined(SOCCFG_BUG) && (1 == SOCCFG_BUG)
53# define XWOS_BUG() soc_bug()
54# else
55# define XWOS_BUG() do {} while (1)
56# endif
57# define XWOS_BUG_ON(x) if (x) XWOS_BUG()
58#else
59# define XWOS_BUG()
60# define XWOS_BUG_ON(x)
61#endif
62#define XWOS_LOOP_ON(x) do {} while (x)
64#define XWOS_UNUSED_ARGUMENT 0
66#define XWOS_UNUSED(x) ((void)(x))
75#if defined(XWOSCFG_CHECK_PARAMETERS) && (1 == XWOSCFG_CHECK_PARAMETERS)
76# define XWOS_VALIDATE(exp, errstr, ...) \
77 if ((!(exp))) { \
78 return __VA_ARGS__; \
79 }
80#else
81# define XWOS_VALIDATE(exp, errstr, ...)
82#endif
83
84#if defined(ARCHCFG_PTRSIZE)
85# define XWOS_PTRSIZE (ARCHCFG_PTRSIZE)
86#else
87# if (1 == ARCHCFG_16BIT)
88# define XWOS_PTRSIZE 4
89# elif (1 == ARCHCFG_32BIT)
90# define XWOS_PTRSIZE 4
91# elif (1 == ARCHCFG_64BIT)
92# define XWOS_PTRSIZE 8
93# else
94# error "Unkown CPU bits!"
95# endif
96#endif
97
98#if defined(XWOSCFG_LOGO) && (1 == XWOSCFG_LOGO)
99extern const char xwos_logo[];
100extern const xwsz_t xwos_logo_size;
101void xwos_show_logo(void);
102#endif
103
108#endif /* xwos/standard.h */
XWOS通用库:编译器宏定义
XWOS通用库:错误
unsigned long xwsz_t
Definition type.h:339
void xwos_show_logo(void)
const char xwos_logo[]
const xwsz_t xwos_logo_size
XWOS通用库:内存屏障
XWOS通用库:编译规则
XWOS通用库:基本类型定义
XWOS版本号