59#define OS_INT_ACTIVE ({ \
61 UINT32 intSave_ = LOS_IntLock(); \
62 intCount = g_intCount[ArchCurrCpuid()]; \
63 LOS_IntRestore(intSave_); \
71#define OS_INT_INACTIVE (!(OS_INT_ACTIVE))
77#define OS_HWI_PRIO_HIGHEST 0
83#define OS_HWI_PRIO_LOWEST 31
89#define OS_HWI_MAX_NAMELEN 10
99#define OS_ERRNO_HWI_NUM_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
109#define OS_ERRNO_HWI_PROC_FUNC_NULL LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
119#define OS_ERRNO_HWI_CB_UNAVAILABLE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
129#define OS_ERRNO_HWI_NO_MEMORY LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
139#define OS_ERRNO_HWI_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
149#define OS_ERRNO_HWI_PRIO_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
160#define OS_ERRNO_HWI_MODE_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
170#define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
180#define OS_ERRNO_HWI_INTERR LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x08)
191#define OS_ERRNO_HWI_SHARED_ERROR LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x09)
201#define OS_ERRNO_HWI_ARG_INVALID LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x0a)
211#define OS_ERRNO_HWI_HWINUM_UNCREATE LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x0b)
250#define IRQF_SHARED 0x8000U
size_t g_intCount[]
中断次数,每个CPU都会记录响应中断的次数
VOID(* HWI_PROC_FUNC)(VOID)
STATIC INLINE UINT32 LOS_IntUnLock(VOID)
Enable all interrupts. | 打开当前处理器所有中断响应
UINT32 LOS_HwiDelete(HWI_HANDLE_T hwiNum, HwiIrqParam *irqParam)
delete a hardware interrupt.
UINT32 LOS_GetSystemHwiMaximum(VOID)
Gets the maximum number of interrupts supported by the system.
STATIC INLINE VOID LOS_IntRestore(UINT32 intSave)
Restore interrupts. | 恢复到使用LOS_IntLock关闭所有中断之前的状态
UINT32 LOS_HwiCreate(HWI_HANDLE_T hwiNum, HWI_PRIOR_T hwiPrio, HWI_MODE_T hwiMode, HWI_PROC_FUNC hwiHandler, HwiIrqParam *irqParam)
Create a hardware interrupt.
STATIC INLINE UINT32 LOS_IntLock(VOID)
Disable all interrupts. | 关闭当前处理器所有中断响应
STATIC INLINE UINT32 ArchIntUnlock(VOID)
打开当前处理器所有中断响应
STATIC INLINE VOID ArchIntRestore(UINT32 intSave)
恢复到使用LOS_IntLock关闭所有中断之前的状态
STATIC INLINE UINT32 ArchIntLock(VOID)
禁止中断
struct tagIrqParam HwiIrqParam
HwiHandleForm g_hwiForm[OS_HWI_MAX_NUM]
中断注册表 @note_why 用 form 来表示?有种写 HTML的感觉
struct tagHwiHandleForm HwiHandleForm