RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
RT-Thread Kernel API
+ RT-Thread Kernel API 的协作图:

专题

 Thread Management
 
 Clock and Timer Management
 
 Kernel Object Management
 
 Inter-Thread Communication
 
 Signal
 
 Memory Management
 
 Device System
 
 Runtime Trace and Record
 
 Other useful kernel service
 
 Error Code
 

函数

rt_weak void rt_interrupt_enter (void)
 
 RTM_EXPORT (rt_interrupt_enter)
 
rt_weak void rt_interrupt_leave (void)
 
 RTM_EXPORT (rt_interrupt_leave)
 
rt_weak rt_uint8_t rt_interrupt_get_nest (void)
 
 RTM_EXPORT (rt_interrupt_get_nest)
 
 RTM_EXPORT (rt_hw_interrupt_disable)
 
 RTM_EXPORT (rt_hw_interrupt_enable)
 
rt_weak rt_bool_t rt_hw_interrupt_is_disabled (void)
 
 RTM_EXPORT (rt_hw_interrupt_is_disabled)
 

变量

volatile rt_atomic_t rt_interrupt_nest = 0
 

详细描述

The Kernel APIs are the core APIs of RT-Thread, which supports the following features:

函数说明

◆ rt_interrupt_enter()

rt_weak void rt_interrupt_enter ( void )

This function will be invoked by BSP, when enter interrupt service routine

注解
Please don't invoke this routine in application
参见
rt_interrupt_leave

在文件 irq.c100 行定义.

101{
103 RT_OBJECT_HOOK_CALL(rt_interrupt_enter_hook,());
104 LOG_D("irq has come..., irq current nest:%d",
106}
volatile rt_atomic_t rt_interrupt_nest
定义 irq.c:70
#define RT_OBJECT_HOOK_CALL(func, argv)
#define rt_atomic_add(ptr, v)
#define rt_atomic_load(ptr)
#define LOG_D(...)
signed int rt_int32_t

引用了 LOG_D, rt_atomic_add, rt_atomic_load, rt_interrupt_nest , 以及 RT_OBJECT_HOOK_CALL.

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

◆ RTM_EXPORT() [1/6]

RTM_EXPORT ( rt_interrupt_enter )

引用了 rt_interrupt_enter().

+ 函数调用图:

◆ rt_interrupt_leave()

rt_weak void rt_interrupt_leave ( void )

This function will be invoked by BSP, when leave interrupt service routine

注解
Please don't invoke this routine in application
参见
rt_interrupt_enter

在文件 irq.c117 行定义.

118{
119 LOG_D("irq is going to leave, irq current nest:%d",
121 RT_OBJECT_HOOK_CALL(rt_interrupt_leave_hook,());
123
124}
#define rt_atomic_sub(ptr, v)

引用了 LOG_D, rt_atomic_load, rt_atomic_sub, rt_interrupt_nest , 以及 RT_OBJECT_HOOK_CALL.

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

◆ RTM_EXPORT() [2/6]

RTM_EXPORT ( rt_interrupt_leave )

引用了 rt_interrupt_leave().

+ 函数调用图:

◆ rt_interrupt_get_nest()

rt_weak rt_uint8_t rt_interrupt_get_nest ( void )

This function will return the nest of interrupt.

User application can invoke this function to get whether current context is interrupt context.

返回
the number of nested interrupts.

在文件 irq.c136 行定义.

137{
138 rt_uint8_t ret;
139 rt_base_t level;
140
141 level = rt_hw_local_irq_disable();
144 return ret;
145}
#define rt_hw_local_irq_disable
定义 rthw.h:152
#define rt_hw_local_irq_enable
定义 rthw.h:153
rt_int32_t rt_base_t
unsigned char rt_uint8_t

引用了 rt_atomic_load, rt_hw_local_irq_disable, rt_hw_local_irq_enable , 以及 rt_interrupt_nest.

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

◆ RTM_EXPORT() [3/6]

RTM_EXPORT ( rt_interrupt_get_nest )

引用了 rt_interrupt_get_nest().

+ 函数调用图:

◆ RTM_EXPORT() [4/6]

RTM_EXPORT ( rt_hw_interrupt_disable )

引用了 rt_hw_interrupt_disable().

+ 函数调用图:

◆ RTM_EXPORT() [5/6]

RTM_EXPORT ( rt_hw_interrupt_enable )

引用了 rt_hw_interrupt_enable().

+ 函数调用图:

◆ rt_hw_interrupt_is_disabled()

rt_weak rt_bool_t rt_hw_interrupt_is_disabled ( void )

在文件 irq.c151 行定义.

152{
153 return RT_FALSE;
154}
#define RT_FALSE

引用了 RT_FALSE.

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

◆ RTM_EXPORT() [6/6]

引用了 rt_hw_interrupt_is_disabled().

+ 函数调用图:

变量说明

◆ rt_interrupt_nest

volatile rt_atomic_t rt_interrupt_nest = 0

在文件 irq.c70 行定义.