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(uint64_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 set_softirq_pending(uint64_t status); 21 extern void clear_softirq_pending(uint32_t irq_num); 22 extern void do_softirq(); 23 24 // for temporary 25 #define MAX_SOFTIRQ_NUM 64 26 #define TIMER_SIRQ 0 // 时钟软中断号 27 #define VIDEO_REFRESH_SIRQ 1 // 帧缓冲区刷新软中断 28