VirtualBox

Changeset 33381 in vbox


Ignore:
Timestamp:
Oct 24, 2010 1:48:39 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
66967
Message:

FreeBSD: Fix absolut timeouts. The sleepq_* KPI takes uses only relative timeouts. Fixes the hanging tstSupSem testcase and SMP guests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/freebsd/sleepqueue-r0drv-freebsd.h

    r33376 r33381  
    110110                if (u64Now >= uTimeout)
    111111                    return VERR_TIMEOUT;
     112
     113                uTimeout -= u64Now; /* Get a relative value. */
    112114            }
    113115        }
     
    117119    {
    118120        pWait->fIndefinite      = false;
     121
     122#if 0
     123        struct timeval tv;
     124
     125        tv.tv_sec = uTimeout / UINT64_C(1000000000);
     126        tv.tv_usec = (uTimeout % UINT64_C(1000000000)) / UINT64_C(1000);
     127
     128        pWait->iTimeout = tvtohz(&tv);
     129#else
    119130        uint64_t cTicks = ASMMultU64ByU32DivByU32(uTimeout, hz, UINT32_C(1000000000));
    120131        if (cTicks >= INT_MAX)
     
    122133        else
    123134            pWait->iTimeout     = (int)cTicks;
     135#endif
    124136    }
    125137
Note: See TracChangeset for help on using the changeset viewer.

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