diff options
| author | Meco Man <[email protected]> | 2024-03-06 03:57:19 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-03-06 16:57:19 +0800 |
| commit | e3a14a97a99b85c6ac356e34140c2f48dea05f57 (patch) | |
| tree | 5e63931ccce34041832617e7d68d8c33e98d2bb9 /include | |
| parent | d31c05a44c75a0b60b9e10f23bfeab35ef152719 (diff) | |
[kernel] fix warning of rt_thread_t struct (#8584)
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtdef.h | 21 | ||||
| -rw-r--r-- | include/rtsched.h | 4 |
2 files changed, 5 insertions, 20 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index c3cfd90346..47e02b3e9e 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -62,18 +62,8 @@ #ifndef __RT_DEF_H__ #define __RT_DEF_H__ -#include <rtconfig.h> - -#include <stdint.h> -#include <stddef.h> -#include <stdarg.h> -#ifndef RT_USING_NANO -#include <sys/types.h> -#include <sys/errno.h> -#if defined(RT_USING_SIGNALS) || defined(RT_USING_SMART) -#include <sys/signal.h> -#endif /* defined(RT_USING_SIGNALS) || defined(RT_USING_SMART) */ -#endif /* RT_USING_NANO */ +#include "rtsched.h" +#include "rttypes.h" #ifdef __cplusplus extern "C" { @@ -97,9 +87,6 @@ extern "C" { #define RTTHREAD_VERSION RT_VERSION_CHECK(RT_VERSION_MAJOR, RT_VERSION_MINOR, RT_VERSION_PATCH) -/* RT-Thread basic data type definitions */ -#include "rttypes.h" - /**@}*/ /* maximum value of base type */ @@ -846,8 +833,6 @@ typedef void (*rt_thread_cleanup_t)(struct rt_thread *tid); * Thread structure */ -#include "rtsched.h" /* for struct rt_sched_thread_ctx */ - struct rt_thread { struct rt_object parent; @@ -866,7 +851,7 @@ struct rt_thread rt_atomic_t cpus_lock_nest; /**< cpus lock count */ #endif - RT_SCHED_THREAD_CTX; + RT_SCHED_THREAD_CTX struct rt_timer thread_timer; /**< built-in thread timer */ rt_thread_cleanup_t cleanup; /**< cleanup function when thread exit */ diff --git a/include/rtsched.h b/include/rtsched.h index 809d03fb4e..d3c590230f 100644 --- a/include/rtsched.h +++ b/include/rtsched.h @@ -62,7 +62,7 @@ struct rt_sched_thread_ctx struct rt_sched_thread_priv sched_thread_priv; /**< private context of scheduler */ }; -#define RT_SCHED_THREAD_CTX struct rt_sched_thread_ctx sched_thread_ctx +#define RT_SCHED_THREAD_CTX struct rt_sched_thread_ctx sched_thread_ctx; #define RT_SCHED_PRIV(thread) ((thread)->sched_thread_ctx.sched_thread_priv) #define RT_SCHED_CTX(thread) ((thread)->sched_thread_ctx) @@ -100,7 +100,7 @@ struct rt_sched_thread_ctx rt_uint8_t current_priority; /**< current priority */ \ rt_uint8_t init_priority; /**< initialized priority */ \ _RT_SCHED_THREAD_CTX_PRIO_EXT \ - rt_uint32_t number_mask; /**< priority number mask */ + rt_uint32_t number_mask; /**< priority number mask */ #define RT_SCHED_PRIV(thread) (*thread) #define RT_SCHED_CTX(thread) (*thread) |
