WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
cstl_public_inner.h
浏览该文件的文档.
1
16#ifndef CSTL_PUBLIC_INNER_H
17#define CSTL_PUBLIC_INNER_H
18
19#include <stdint.h>
20#include <stdbool.h>
21#include <sys/types.h>
22#include <stdio.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28#ifdef CSTL_DEBUG
29 #define CSTL_STATIC
30 #ifndef CSTL_PRINTF
31 #define CSTL_PRINTF printf
32 #endif
33#else
34 #define CSTL_STATIC static
35 #ifndef CSTL_PRINTF
36 #define CSTL_PRINTF(format, ...)
37 #endif
38#endif
39
40/* 后根遍历删除avl和rawavl时,栈容量的极值 */
41#define CSTL_AVL_STACK_SIZE 64U
42
43/* -0xC 内存不足。 */
44#define CSTL_ERRNO_NOMEM (-12)
45
46/* -0x16 入参无效。 */
47#define CSTL_ERRNO_INVAL (-22)
48
49typedef struct {
50 uintptr_t inputData; /* 用户实际输入的数据 */
51 size_t dataSize; /* 实际输入的大小 */
53
54/* 判断两数相乘在当前系统下会否溢出 */
55bool IsMultiOverflow(size_t x, size_t y);
56
57/* 判断两数相加在当前系统下会否溢出 */
58bool IsAddOverflow(size_t x, size_t y);
59
63int32_t CstlIntCmpFunc(uintptr_t data1, uintptr_t data2);
64
65#ifndef SIZE_MAX
66#define SIZE_MAX __SIZE_MAX__
67#endif
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* CSTL_PUBLIC_INNER_H */
74
int32_t CstlIntCmpFunc(uintptr_t data1, uintptr_t data2)
bool IsAddOverflow(size_t x, size_t y)
bool IsMultiOverflow(size_t x, size_t y)
Definition cstl_public_inner.h:49
size_t dataSize
Definition cstl_public_inner.h:51
uintptr_t inputData
Definition cstl_public_inner.h:50
unsigned int uintptr_t
Definition td_type.h:65