1 /**
2  * @file softirq.h
3  * @author fslongjin (longjin@RinGoTek.cn)
4  * @brief 软中断
5  * @version 0.1
6  * @date 2022-04-08
7  *
8  * @copyright Copyright (c) 2022
9  *
10  */
11 #pragma once
12 
13 #include <common/glib.h>
14 
15 // ==================implementation with rust===================
16 extern void softirq_init();
17 extern void raise_softirq(uint32_t sirq_num);
18 extern int register_softirq(uint32_t irq_num, void (*action)(void *data), void *data);
19 extern int unregister_softirq(uint32_t irq_num);
20 extern void do_softirq();
21 
22 // for temporary
23 #define MAX_SOFTIRQ_NUM 64
24 #define TIMER_SIRQ 0         // 时钟软中断号
25 #define VIDEO_REFRESH_SIRQ 1 // 帧缓冲区刷新软中断
26