2 /* ユーザープロセスから使っても良いAPIを一括読み込み */
4 #ifndef __HOS__hosaplfw_h__
5 #define __HOS__hosaplfw_h__
8 #include "system/system/system.h"
9 #include "system/handle/handle.h"
10 #include "system/memory/memory.h"
11 #include "system/event/event.h"
12 /* #include "system/mutex/mutex.h" */
13 #include "system/time/time.h"
14 #include "system/process/process.h"
15 #include "system/command/command.h"
16 #include "system/file/file.h"
17 #include "system/file/volume.h"
18 #include "system/file/stdfile.h"
20 #include "library/algorithm/stringformat/stringformat.h"
21 #include "library/utility/memutil/memutil.h"
25 #define _DEBUG_PRINTF StdIo_PrintFormat
28 #define _ASSERT(x) do { if (!(x)) { for(;;) ; } } while (0)
29 #define _DEBUG_PRINT0(x) do { _DEBUG_PRINTF((x)); } while (0)
30 #define _DEBUG_PRINT1(x, p1) do { _DEBUG_PRINTF((x), (p1)); } while (0)
31 #define _DEBUG_PRINT2(x, p1, p2) do { _DEBUG_PRINTF((x), (p1), (p2)); } while (0)
32 #define _DEBUG_PRINT3(x, p1, p2, p3) do { _DEBUG_PRINTF((x), (p1), (p2), (p3)); } while (0)
33 #define _DEBUG_PRINT4(x, p1, p2, p3, p4) do { _DEBUG_PRINTF((x), (p1), (p2), (p3), (p4)); } while (0)
34 #define _DEBUG_PRINT5(x, p1, p2, p3, p4, p5) do { _DEBUG_PRINTF((x), (p1), (p2), (p3), (p4), (p5)); } while (0)
35 #define _DEBUG_PRINT6(x, p1, p2, p3, p4, p5, p6) do { _DEBUG_PRINTF((x), (p1), (p2), (p3), (p4), (p5), (p6)); } while (0)
37 #define _ASSERT(x) do {} while (0)
38 #define _DEBUG_PRINT0(x) do {} while (0)
39 #define _DEBUG_PRINT1(x, p1) do {} while (0)
40 #define _DEBUG_PRINT2(x, p1, p2) do {} while (0)
41 #define _DEBUG_PRINT3(x, p1, p2, p3) do {} while (0)
42 #define _DEBUG_PRINT4(x, p1, p2, p3, p4) do {} while (0)
43 #define _DEBUG_PRINT5(x, p1, p2, p3, p4, p5) do {} while (0)
44 #define _DEBUG_PRINT6(x, p1, p2, p3, p4, p5, p6) do {} while (0)
48 /* InternetProtocol バイトオーダー変換マクロ */
50 #define IP_SET_HALFWORD(p, h) \
52 ((unsigned char *)(p))[0] = (unsigned char)(((h) >> 8) & 0xff); \
53 ((unsigned char *)(p))[1] = (unsigned char)(((h) >> 0) & 0xff); \
56 #define IP_GET_HALFWORD(p) \
58 (((unsigned char *)(p))[0] << 8) \
59 + (((unsigned char *)(p))[1] << 0) \
62 #define IP_SET_WORD(p, w) \
64 ((unsigned char *)(p))[0] = (unsigned char)(((w) >> 24) & 0xff); \
65 ((unsigned char *)(p))[1] = (unsigned char)(((w) >> 16) & 0xff); \
66 ((unsigned char *)(p))[2] = (unsigned char)(((w) >> 8) & 0xff); \
67 ((unsigned char *)(p))[3] = (unsigned char)(((w) >> 0) & 0xff); \
70 #define IP_GET_WORD(p) \
72 (((unsigned char *)(p))[0] << 24) \
73 + (((unsigned char *)(p))[1] << 16) \
74 + (((unsigned char *)(p))[2] << 8) \
75 + (((unsigned char *)(p))[3] << 0) \
80 #endif /* __HOS__hosaplfw_h__ */