VirtualBox

Changeset 23173 in vbox for trunk/src/VBox/Runtime/r0drv


Ignore:
Timestamp:
Sep 21, 2009 9:53:51 AM (15 years ago)
Author:
vboxsync
Message:

Remove the poke DPC from the queue if RTThreadPreemptIsPending is not working properly.

Location:
trunk/src/VBox/Runtime/r0drv/nt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp

    r23065 r23173  
    380380    return VINF_SUCCESS;
    381381}
     382
     383void rtMpPokeCpuClear()
     384{
     385    RTCPUID idCpu = RTMpCpuId();
     386
     387    /* Remove any pending poke DPC from the queue, so another call to RTMpPokeCpu will send an IPI */
     388    /* Note: assuming this is a cheap operation. */
     389    KeRemoveQueueDpc(&aPokeDpcs[idCpu]);
     390}
  • trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp

    r22151 r23173  
    3434#include "the-nt-kernel.h"
    3535#include "internal/iprt.h"
     36#include "internal/mp.h"
    3637#include <iprt/thread.h>
    3738
     
    101102    uint32_t const offDpcQueueDepth  = g_offrtNtPbDpcQueueDepth;
    102103    if (!offQuantumEnd && !cbQuantumEnd && !offDpcQueueDepth)
     104    {
     105        rtMpPokeCpuClear();
    103106        return false;
     107    }
    104108    Assert((offQuantumEnd && cbQuantumEnd) || (!offQuantumEnd && !cbQuantumEnd));
    105109
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