VirtualBox

Changeset 22954 in vbox for trunk/src


Ignore:
Timestamp:
Sep 11, 2009 12:33:33 PM (15 years ago)
Author:
vboxsync
Message:

Runtime/semevent: stupid typos; no RT_UNLIKELY

Location:
trunk/src/VBox/Runtime/r3/linux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/linux/semevent-linux.cpp

    r22952 r22954  
    3030
    3131#include <features.h>
    32 #if __GLIBC_PREREQ(2,6)
     32#if __GLIBC_PREREQ(2,6) && 0
    3333
    3434/*
     
    199199    struct timespec tsEnd;
    200200    struct timespec *pTimeout = NULL;
    201     if (RT_UNLIKELY(cMillies != RT_INDEFINITE_WAIT))
     201    if (cMillies != RT_INDEFINITE_WAIT)
    202202    {
    203203        ts.tv_sec  = cMillies / 1000;
     
    256256        }
    257257        /* adjust the relative timeout */
    258         if (RT_UNLIKELY(pTimeout))
     258        if (pTimeout)
    259259        {
    260260            clock_gettime(CLOCK_REALTIME, &ts);
    261261            ts.tv_nsec = tsEnd.tv_nsec - ts.tv_nsec;
    262             ts.tv_sec  = tsEnd.tv_nsec - ts.tv_sec;
     262            ts.tv_sec  = tsEnd.tv_sec - ts.tv_sec;
    263263            if (ts.tv_nsec < 0)
    264264            {
    265265                ts.tv_nsec += 1000000000; /* not correct if ts.tv_sec is negative but we
    266266                                             leave on negative timeouts in any case */
    267                 ts.tv_nsec--;
     267                ts.tv_sec--;
    268268            }
    269269            /* don't wait for less than 1 microsecond */
  • trunk/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp

    r22952 r22954  
    3131
    3232#include <features.h>
    33 #if __GLIBC_PREREQ(2,6)
     33#if __GLIBC_PREREQ(2,6) && 0
    3434
    3535/*
     
    220220    struct timespec tsEnd;
    221221    struct timespec *pTimeout = NULL;
    222     if (RT_UNLIKELY(cMillies != RT_INDEFINITE_WAIT))
     222    if (cMillies != RT_INDEFINITE_WAIT)
    223223    {
    224224        ts.tv_sec  = cMillies / 1000;
     
    250250        {
    251251            /* adjust the relative timeout */
    252             if (RT_UNLIKELY(pTimeout))
     252            if (pTimeout)
    253253            {
    254254                clock_gettime(CLOCK_REALTIME, &ts);
    255255                ts.tv_nsec = tsEnd.tv_nsec - ts.tv_nsec;
    256                 ts.tv_sec  = tsEnd.tv_nsec - ts.tv_sec;
     256                ts.tv_sec  = tsEnd.tv_sec - ts.tv_sec;
    257257                if (ts.tv_nsec < 0)
    258258                {
    259259                    ts.tv_nsec += 1000000000; /* not correct if ts.tv_sec is negative but we
    260260                                                 leave on negative timeouts in any case */
    261                     ts.tv_nsec--;
     261                    ts.tv_sec--;
    262262                }
    263263                /* don't wait for less than 1 microsecond */
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