20260829 Redesign

This commit is contained in:
2026-08-29 00:53:40 +08:00
parent f9345bdc0a
commit bf5fc3bda6
44 changed files with 2941 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
#ifndef INCLUDED_C_COMPILER_GCC_H
#define INCLUDED_C_COMPILER_GCC_H
#define C_INLINE inline __attribute__((always_inline))
#define C_NOINLINE __attribute__((noinline))
#define C_STATIC_FORCE_INLINE static C_INLINE
#define C_PACKED_STRUCT_START
#define C_PACKED_STRUCT_END
#define C_PACKED __attribute__((packed))
#define C_ALIGN(bytes) __attribute__((aligned(bytes)))
#define C_RESTRICT __restrict__
/* 用于 Search / Sort 等高频判断分支,提示 CPU 哪条分支概率更高 */
#define C_LIKELY(x) __builtin_expect(!!(x), 1)
#define C_UNLIKELY(x) __builtin_expect(!!(x), 0)
#endif /*INCLUDED_C_COMPILER_GCC_H*/