⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interrupts.c

📁 KaOS is a real-time operating system that has been implemented with the basic real-time constraints
💻 C
字号:
interrupt [TIM0_COMP] void os_timer0_comp(void)
{
    if (g_threadcount > 1)
    {
        os_schedule();        
    }
}
/*
interrupt [TIM2_COMP] void os_timer2_comp(void)
{
    // for each timer, see if it's time is up
    os_thread *temp_thread;
    os_timer2 *temp_timer;
    
    temp_thread = g_usedthreads;
    
    while (temp_thread != NULL)
    {
        //temp_timer->progress -= g_timer2_gcd; // subtract the greatest common denominator
        temp_timer = temp_thread->event_timer2;
        if (temp_timer != NULL && temp_timer->ready != 1 && temp_timer->progress <= 0)
        {
            temp_timer->ready = 1;
            temp_timer->progress = temp_timer->delay;
        }
        temp_thread = temp_thread->next;
    }
}
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -