Skip to contentSkip to conversation

question about irq update

Qemu-devel Zhi Hui Li 2 participants 3 messages Jun 15, 2012

lore
Share & tools
lore

Zhi Hui Li

author
#0 lore raw

In the code of libqtest.c have a function :

bool qtest_get_irq(QTestState *s, int num)

{
    /* dummy operation in order to make sure irq is up to date */
    qtest_inb(s, 0);

    return s->irq_level[num];
}

but I don't know how it can make the irq up to date and why we will read from the address of 0 ?

can anybody explain for me?
Thank you very much!

#1 lore raw

Il 15/06/2012 10:42, Zhi Hui Li ha scritto:

Quoted 11 lines

bool qtest_get_irq(QTestState *s, int num)

{
    /* dummy operation in order to make sure irq is up to date */
    qtest_inb(s, 0);

    return s->irq_level[num];
}

but I don't know how it can make the irq up to date and why we will read from the address of 0 ?

It just forces libqtest to read any pending events.

Paolo

author
#2 lore raw
Quoted 1 line · Paolo Bonzini

It just forces libqtest to read any pending events.

Ok, Thank you very much! :)