RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
rtsched.h 文件参考
#include "rttypes.h"
#include "rtcompiler.h"
+ rtsched.h 的引用(Include)关系图:
+ 此图展示该文件被哪些文件直接或间接地引用了:

浏览该文件的源代码.

结构体

struct  rt_sched_thread_priv
 
struct  rt_sched_thread_ctx
 

宏定义

#define RT_SCHED_THREAD_CTX   struct rt_sched_thread_ctx sched_thread_ctx;
 
#define RT_SCHED_PRIV(thread)
 
#define RT_SCHED_CTX(thread)
 
#define RT_THREAD_LIST_NODE_ENTRY(node)
 
#define RT_THREAD_LIST_NODE(thread)
 
#define RT_SCHED_DEBUG_IS_LOCKED
 
#define RT_SCHED_DEBUG_IS_UNLOCKED
 

类型定义

typedef rt_uint8_t rt_sched_thread_status_t
 
typedef rt_ubase_t rt_sched_lock_level_t
 

函数

rt_err_t rt_sched_lock (rt_sched_lock_level_t *plvl)
 
rt_err_t rt_sched_unlock (rt_sched_lock_level_t level)
 
rt_err_t rt_sched_unlock_n_resched (rt_sched_lock_level_t level)
 
rt_bool_t rt_sched_is_locked (void)
 

宏定义说明

◆ RT_SCHED_THREAD_CTX

#define RT_SCHED_THREAD_CTX   struct rt_sched_thread_ctx sched_thread_ctx;

在文件 rtsched.h71 行定义.

◆ RT_SCHED_PRIV

#define RT_SCHED_PRIV ( thread)
值:
((thread)->sched_thread_ctx.sched_thread_priv)

在文件 rtsched.h73 行定义.

◆ RT_SCHED_CTX

#define RT_SCHED_CTX ( thread)
值:
((thread)->sched_thread_ctx)

在文件 rtsched.h74 行定义.

◆ RT_THREAD_LIST_NODE_ENTRY

#define RT_THREAD_LIST_NODE_ENTRY ( node)
值:
rt_list_entry((node), struct rt_sched_thread_ctx, thread_list_node), \
struct rt_thread, sched_thread_ctx)
#define rt_list_entry(node, type, member)
get the struct for this entry
#define rt_container_of(ptr, type, member)

Convert a list node in container RT_SCHED_CTX(thread)->thread_list_node to a thread pointer.

在文件 rtsched.h80 行定义.

80#define RT_THREAD_LIST_NODE_ENTRY(node) \
81 rt_container_of( \
82 rt_list_entry((node), struct rt_sched_thread_ctx, thread_list_node), \
83 struct rt_thread, sched_thread_ctx)

◆ RT_THREAD_LIST_NODE

#define RT_THREAD_LIST_NODE ( thread)
值:
(RT_SCHED_CTX(thread).thread_list_node)
#define RT_SCHED_CTX(thread)

在文件 rtsched.h84 行定义.

◆ RT_SCHED_DEBUG_IS_LOCKED

#define RT_SCHED_DEBUG_IS_LOCKED

在文件 rtsched.h104 行定义.

◆ RT_SCHED_DEBUG_IS_UNLOCKED

#define RT_SCHED_DEBUG_IS_UNLOCKED

在文件 rtsched.h105 行定义.

类型定义说明

◆ rt_sched_thread_status_t

在文件 rtsched.h23 行定义.

◆ rt_sched_lock_level_t

System Scheduler Locking

在文件 rtsched.h90 行定义.

函数说明

◆ rt_sched_lock()

rt_err_t rt_sched_lock ( rt_sched_lock_level_t * plvl)

在文件 scheduler_up.c110 行定义.

111{
112 rt_base_t level;
113 if (!plvl)
114 return -RT_EINVAL;
115
116 level = rt_hw_interrupt_disable();
117 *plvl = level;
118
119 return RT_EOK;
120}
rt_base_t rt_hw_interrupt_disable(void)
rt_int32_t rt_base_t

引用了 rt_hw_interrupt_disable().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ rt_sched_unlock()

rt_err_t rt_sched_unlock ( rt_sched_lock_level_t level)

在文件 scheduler_up.c122 行定义.

123{
125
126 return RT_EOK;
127}
void rt_hw_interrupt_enable(rt_base_t level)

引用了 rt_hw_interrupt_enable().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ rt_sched_unlock_n_resched()

rt_err_t rt_sched_unlock_n_resched ( rt_sched_lock_level_t level)

在文件 scheduler_up.c129 行定义.

130{
131 if (rt_thread_self())
132 {
133 /* if scheduler is available */
134 rt_schedule();
135 }
137
138 return RT_EOK;
139}
rt_thread_t rt_thread_self(void)
This function will return self thread object.
void rt_schedule(void)
This function will perform one scheduling. It will select one thread with the highest priority level ...

引用了 rt_hw_interrupt_enable(), rt_schedule() , 以及 rt_thread_self().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ rt_sched_is_locked()

rt_bool_t rt_sched_is_locked ( void )