VirtualBox

Changeset 52996 in vbox for trunk


Ignore:
Timestamp:
Oct 8, 2014 3:58:55 PM (10 years ago)
Author:
vboxsync
Message:

Runtime/r0drv/solaris: Fix timeouts to work for semevents when using non-highres callbacks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/semeventwait-r0drv-solaris.h

    r44528 r52996  
    55
    66/*
    7  * Copyright (C) 2006-2012 Oracle Corporation
     7 * Copyright (C) 2006-2014 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5757    union
    5858    {
    59         /** The timeout (abs lbolt) when fHighRes is false.  */
     59        /** The timeout (in ticks) when fHighRes is false.  */
    6060        clock_t     lTimeout;
    6161    } u;
     
    108108    {
    109109        if (fFlags & RTSEMWAIT_FLAGS_MILLISECS)
    110             uTimeout = uTimeout < UINT64_MAX / UINT32_C(1000000) * UINT32_C(1000000)
    111                      ? uTimeout * UINT32_C(1000000)
     110            uTimeout = uTimeout < UINT64_MAX / RT_NS_1MS
     111                     ? uTimeout * RT_NS_1MS
    112112                     : UINT64_MAX;
    113113        if (uTimeout == UINT64_MAX)
     
    156156            else
    157157            {
    158                 pWait->u.lTimeout = ddi_get_lbolt() + cTicks;
     158                pWait->u.lTimeout = drv_usectohz(uTimeout / RT_NS_1US_64);
    159159                pWait->fHighRes = false;
    160160            }
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