示例#1
0
文件: domain.c 项目: Marshalzxy/xen
void idle_loop(void)
{
    for ( ; ; )
    {
        if ( cpu_is_offline(smp_processor_id()) )
            stop_cpu();

        local_irq_disable();
        if ( cpu_is_haltable(smp_processor_id()) )
        {
            dsb(sy);
            wfi();
        }
        local_irq_enable();

        do_tasklet();
        do_softirq();
    }
}
示例#2
0
文件: domain.c 项目: Xilinx/xen
void idle_loop(void)
{
    for ( ; ; )
    {
        if ( cpu_is_offline(smp_processor_id()) )
            stop_cpu();

        local_irq_disable();
        if ( cpu_is_haltable(smp_processor_id()) )
        {
            dsb(sy);
            wfi();
        }
        local_irq_enable();

        do_tasklet();
        do_softirq();
        /*
         * We MUST be last (or before dsb, wfi). Otherwise after we get the
         * softirq we would execute dsb,wfi (and sleep) and not patch.
         */
        check_for_livepatch_work();
    }
}