[kernel] fix warning of rt_thread_t struct (#8584)
This commit is contained in:
parent
d31c05a44c
commit
e3a14a97a9
|
@ -62,18 +62,8 @@
|
||||||
#ifndef __RT_DEF_H__
|
#ifndef __RT_DEF_H__
|
||||||
#define __RT_DEF_H__
|
#define __RT_DEF_H__
|
||||||
|
|
||||||
#include <rtconfig.h>
|
#include "rtsched.h"
|
||||||
|
#include "rttypes.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 */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -97,9 +87,6 @@ extern "C" {
|
||||||
#define RTTHREAD_VERSION RT_VERSION_CHECK(RT_VERSION_MAJOR, RT_VERSION_MINOR, RT_VERSION_PATCH)
|
#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 */
|
/* maximum value of base type */
|
||||||
|
@ -846,8 +833,6 @@ typedef void (*rt_thread_cleanup_t)(struct rt_thread *tid);
|
||||||
* Thread structure
|
* Thread structure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "rtsched.h" /* for struct rt_sched_thread_ctx */
|
|
||||||
|
|
||||||
struct rt_thread
|
struct rt_thread
|
||||||
{
|
{
|
||||||
struct rt_object parent;
|
struct rt_object parent;
|
||||||
|
@ -866,7 +851,7 @@ struct rt_thread
|
||||||
rt_atomic_t cpus_lock_nest; /**< cpus lock count */
|
rt_atomic_t cpus_lock_nest; /**< cpus lock count */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RT_SCHED_THREAD_CTX;
|
RT_SCHED_THREAD_CTX
|
||||||
struct rt_timer thread_timer; /**< built-in thread timer */
|
struct rt_timer thread_timer; /**< built-in thread timer */
|
||||||
rt_thread_cleanup_t cleanup; /**< cleanup function when thread exit */
|
rt_thread_cleanup_t cleanup; /**< cleanup function when thread exit */
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ struct rt_sched_thread_ctx
|
||||||
struct rt_sched_thread_priv sched_thread_priv; /**< private context of scheduler */
|
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_PRIV(thread) ((thread)->sched_thread_ctx.sched_thread_priv)
|
||||||
#define RT_SCHED_CTX(thread) ((thread)->sched_thread_ctx)
|
#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 current_priority; /**< current priority */ \
|
||||||
rt_uint8_t init_priority; /**< initialized priority */ \
|
rt_uint8_t init_priority; /**< initialized priority */ \
|
||||||
_RT_SCHED_THREAD_CTX_PRIO_EXT \
|
_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_PRIV(thread) (*thread)
|
||||||
#define RT_SCHED_CTX(thread) (*thread)
|
#define RT_SCHED_CTX(thread) (*thread)
|
||||||
|
|
Loading…
Reference in New Issue