$darkmode
RuiChing API 参考手册
V0.9.1
中断管理

提供中断初始化、使能、屏蔽、嵌套计数接口 更多...

函数

rt_base_t rt_hw_local_irq_disable (void)
 禁用当前 CPU 的中断 更多...
 
void rt_hw_local_irq_enable (rt_base_t level)
 恢复当前 CPU 的中断状态 更多...
 
rt_base_t rt_hw_interrupt_disable (void)
 禁用当前 CPU 中断,并锁住所有 CPU 调度器 更多...
 
void rt_hw_interrupt_enable (rt_base_t level)
 恢复当前 CPU 的中断状态,并解锁所有 CPU 调度器 更多...
 

详细描述

提供中断初始化、使能、屏蔽、嵌套计数接口

函数说明

◆ rt_hw_local_irq_disable()

rt_base_t rt_hw_local_irq_disable ( void  )

禁用当前 CPU 的中断

关闭当前处理器核心的中断响应,返回操作前的中断状态该函数仅影响 当前 CPU 核心的中断状态,不涉及其他核心

返回值
flag操作前的中断状态(平台相关值)
警告

◆ rt_hw_local_irq_enable()

void rt_hw_local_irq_enable ( rt_base_t  level)

恢复当前 CPU 的中断状态

根据参数恢复当前处理器核心的中断状态

参数
[in]level之前保存的中断状态
警告

◆ rt_hw_interrupt_disable()

rt_base_t rt_hw_interrupt_disable ( void  )

禁用当前 CPU 中断,并锁住所有 CPU 调度器

关闭当前处理器核心的中断响应,返回操作前的中断状态该函数仅影响 当前 CPU 核心的中断状态,不涉及其他核心,但同时会锁住所有 CPU 的调度器

返回
操作前的中断状态(平台相关值)
警告

◆ rt_hw_interrupt_enable()

void rt_hw_interrupt_enable ( rt_base_t  level)

恢复当前 CPU 的中断状态,并解锁所有 CPU 调度器

根据参数恢复当前处理器核心的中断状态,并同时解锁所有 CPU 调度器

参数
[in]level先前保存的中断状态