~ubuntu-branches/ubuntu/vivid/virtualbox-ose/vivid

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-10-13 23:06:00 UTC
  • mfrom: (0.3.2 upstream) (0.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20091013230600-xhu2pwizq0wo63l9
Tags: 3.0.8-dfsg-1ubuntu1
* Merge from debian unstable (LP: #444812), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
* Try to remove existing dkms modules before adding the new modules
  (LP: #434503)
  - debian/virtualbox-ose-source.postinst
  - debian/virtualbox-ose-guest-source.postinst
* Don't fail if dkms modules have already been removed
  - debian/virtualbox-ose-source.prerm
  - debian/virtualbox-ose-guest-source.prerm

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#include <iprt/asm.h>
41
41
#include "r0drv/mp-r0drv.h"
42
42
#include "internal-r0drv-nt.h"
 
43
#include "internal/mp.h"
43
44
 
44
45
 
45
46
/*******************************************************************************
228
229
    AssertMsg(KeGetCurrentIrql() == PASSIVE_LEVEL, ("%d != %d (PASSIVE_LEVEL)\n", KeGetCurrentIrql(), PASSIVE_LEVEL));
229
230
#endif
230
231
 
 
232
#ifdef IPRT_TARGET_NT4
 
233
    KAFFINITY Mask;
 
234
    /* g_pfnrtNt* are not present on NT anyway. */
 
235
    return VERR_NOT_SUPPORTED;
 
236
#else
231
237
    KAFFINITY Mask = KeQueryActiveProcessors();
 
238
#endif
232
239
 
233
240
    /* KeFlushQueuedDpcs is not present in Windows 2000; import it dynamically so we can just fail this call. */
234
241
    if (!g_pfnrtNtKeFlushQueuedDpcs)
368
375
    /* Assuming here that high importance DPCs will be delivered immediately; or at least an IPI will be sent immediately.
369
376
     * Todo: verify!
370
377
     */
371
 
    KeInsertQueueDpc(&aPokeDpcs[idCpu], 0, 0);
 
378
    BOOLEAN bRet = KeInsertQueueDpc(&aPokeDpcs[idCpu], 0, 0);
372
379
 
373
380
    KeLowerIrql(oldIrql);
374
 
    return VINF_SUCCESS;
 
381
    return (bRet == TRUE) ? VINF_SUCCESS : VERR_ACCESS_DENIED /* already queued */;
 
382
}
 
383
 
 
384
void rtMpPokeCpuClear()
 
385
{
 
386
    RTCPUID idCpu = RTMpCpuId();
 
387
 
 
388
    /* Remove any pending poke DPC from the queue, so another call to RTMpPokeCpu will send an IPI */
 
389
    /* Note: assuming this is a cheap operation. */
 
390
    KeRemoveQueueDpc(&aPokeDpcs[idCpu]);
375
391
}