diff options
| author | xqyjlj <[email protected]> | 2023-12-19 11:04:03 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2023-12-21 01:00:59 +0800 |
| commit | 0541b39d61d4db7577037d51be70eb09d0a609e2 (patch) | |
| tree | e2aec6d6772a7abf70e42d5b71e60d9ddc88d397 | |
| parent | 833b43dbc7ea85001436c0932eb3e190fcb51b30 (diff) | |
✨ feat(rtdef.h): add rt_always_inline
| -rw-r--r-- | include/rtdef.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index 16f0163710..4c24cb0ae9 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -53,6 +53,7 @@ * 2023-10-10 Chushicheng change version number to v5.1.0 * 2023-10-11 zmshahaha move specific devices related and driver to components/drivers * 2023-11-21 Meco Man add RT_USING_NANO macro + * 2023-12-18 xqyjlj add rt_always_inline */ #ifndef __RT_DEF_H__ @@ -198,6 +199,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define rt_align(n) __attribute__((aligned(n))) #define rt_weak __attribute__((weak)) #define rt_inline static __inline +#define rt_always_inline rt_inline /* module compiling */ #ifdef RT_USING_MODULE #define RTT_API __declspec(dllimport) @@ -211,6 +213,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define rt_align(n) PRAGMA(data_alignment=n) #define rt_weak __weak #define rt_inline static inline +#define rt_always_inline rt_inline #define RTT_API #elif defined (__GNUC__) /* GNU GCC Compiler */ #ifndef RT_USING_LIBC @@ -229,6 +232,7 @@ typedef __gnuc_va_list va_list; #define rt_weak __attribute__((weak)) #define rt_noreturn __attribute__ ((noreturn)) #define rt_inline static __inline +#define rt_always_inline static inline __attribute__((always_inline)) #define RTT_API #elif defined (__ADSPBLACKFIN__) /* for VisualDSP++ Compiler */ #define rt_section(x) __attribute__((section(x))) @@ -236,6 +240,7 @@ typedef __gnuc_va_list va_list; #define rt_align(n) __attribute__((aligned(n))) #define rt_weak __attribute__((weak)) #define rt_inline static inline +#define rt_always_inline rt_inline #define RTT_API #elif defined (_MSC_VER) #define rt_section(x) @@ -243,6 +248,7 @@ typedef __gnuc_va_list va_list; #define rt_align(n) __declspec(align(n)) #define rt_weak #define rt_inline static __inline +#define rt_always_inline rt_inline #define RTT_API #elif defined (__TI_COMPILER_VERSION__) /* The way that TI compiler set section is different from other(at least @@ -262,6 +268,7 @@ typedef __gnuc_va_list va_list; #define rt_weak #endif #define rt_inline static inline +#define rt_always_inline rt_inline #define RTT_API #elif defined (__TASKING__) #define rt_section(x) __attribute__((section(x))) @@ -270,6 +277,7 @@ typedef __gnuc_va_list va_list; #define rt_align(n) __attribute__((__align(n))) #define rt_weak __attribute__((weak)) #define rt_inline static inline +#define rt_always_inline rt_inline #define RTT_API #else #error not supported tool chain |
