VirtualBox

Changeset 60143 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 22, 2016 10:49:27 PM (9 years ago)
Author:
vboxsync
Message:

RTTimerGetSystemGranularity/nt: Removed assertion on NtExSetTimerResolution return value as it was subject to a race with other threads in the system. Ran into it several times while playing music on W10/skylake.

File:
1 edited

Legend:

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

    r57358 r60143  
    55
    66/*
    7  * Copyright (C) 2006-2015 Oracle Corporation
     7 * Copyright (C) 2006-2016 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5555     * count of these calls, we have to do two calls that cancel each other out.
    5656     */
    57     ULONG ulResolution1 = g_pfnrtNtExSetTimerResolution(ulTimeInc, TRUE);
    58     ULONG ulResolution2 = g_pfnrtNtExSetTimerResolution(0 /*ignored*/, FALSE);
    59     AssertMsg(ulResolution1 == ulResolution2, ("%ld, %ld\n", ulResolution1, ulResolution2)); /* not supposed to change it! */
    60     return ulResolution2 * 100; /* NT -> ns */
     57    g_pfnrtNtExSetTimerResolution(ulTimeInc, TRUE);
     58    ULONG ulResolution = g_pfnrtNtExSetTimerResolution(0 /*ignored*/, FALSE);
     59    return ulResolution * 100; /* NT -> ns */
    6160}
    6261
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