RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
scheduler_up.c 文件参考
#include <rtthread.h>
#include <rthw.h>
#include <rtdbg.h>
+ scheduler_up.c 的引用(Include)关系图:

浏览该文件的源代码.

宏定义

#define DBG_TAG   "kernel.scheduler"
 
#define DBG_LVL   DBG_INFO
 

函数

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)
 
void rt_system_scheduler_init (void)
 
void rt_system_scheduler_start (void)
 

变量

rt_list_t rt_thread_priority_table [RT_THREAD_PRIORITY_MAX]
 
rt_uint32_t rt_thread_ready_priority_group
 
volatile rt_atomic_t rt_interrupt_nest
 
rt_uint8_t rt_current_priority
 

宏定义说明

◆ DBG_TAG

#define DBG_TAG   "kernel.scheduler"

在文件 scheduler_up.c38 行定义.

◆ DBG_LVL

#define DBG_LVL   DBG_INFO

在文件 scheduler_up.c39 行定义.

函数说明

◆ 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_thread_priority_table

rt_list_t rt_thread_priority_table[RT_THREAD_PRIORITY_MAX]

在文件 scheduler_up.c42 行定义.

◆ rt_thread_ready_priority_group

rt_uint32_t rt_thread_ready_priority_group

在文件 scheduler_up.c43 行定义.

◆ rt_current_priority

rt_uint8_t rt_current_priority

在文件 scheduler_up.c51 行定义.