VirtualBox

Ignore:
Timestamp:
Mar 16, 2009 7:02:29 PM (16 years ago)
Author:
vboxsync
Message:

APIC: locking refined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevAPIC.cpp

    r13832 r17968  
    352352DECLINLINE(void) cpuSetInterrupt(APICDeviceInfo* dev, APICState *s)
    353353{
     354    Log2(("apic: setting interrupt flag\n"));
    354355    dev->CTX_SUFF(pApicHlp)->pfnSetInterruptFF(dev->CTX_SUFF(pDevIns),
    355356                                               getCpuFromLapic(dev, s));
     
    358359DECLINLINE(void) cpuClearInterrupt(APICDeviceInfo* dev, APICState *s)
    359360{
     361    Log2(("apic: clear interrupt flag\n"));
    360362    dev->CTX_SUFF(pApicHlp)->pfnClearInterruptFF(dev->CTX_SUFF(pDevIns),
    361363                                                 getCpuFromLapic(dev, s));
     
    11831185    if (!(s->spurious_vec & APIC_SV_ENABLE)) {
    11841186        Log(("apic_get_interrupt: returns -1 (APIC_SV_ENABLE)\n"));
    1185         return -1;
     1187        intno = -1;
     1188        goto done;
    11861189    }
    11871190
     
    11901193    if (intno < 0) {
    11911194        Log(("apic_get_interrupt: returns -1 (irr)\n"));
    1192         return -1;
     1195        intno = -1;
     1196        goto done;
    11931197    }
    11941198    if (s->tpr && (uint32_t)intno <= s->tpr) {
    11951199        Log(("apic_get_interrupt: returns %d (sp)\n", s->spurious_vec & 0xff));
    1196         return s->spurious_vec & 0xff;
     1200        intno = s->spurious_vec & 0xff;
     1201        goto done;
    11971202    }
    11981203    reset_bit(s->irr, intno);
     
    12001205    apic_update_irq(dev, s);
    12011206    LogFlow(("apic_get_interrupt: returns %d\n", intno));
     1207 done:
    12021208    APIC_UNLOCK(dev);
    12031209    return intno;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette