VirtualBox

Changeset 25649 in vbox


Ignore:
Timestamp:
Jan 5, 2010 2:39:26 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56364
Message:

semeventmulti-linux.cpp: Fixed bug in rtSemEventMultiWait when calculating u64End where timeouts larger than 4294 ms would be truncated to 4294 ms or less.

File:
1 edited

Legend:

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

    r25648 r25649  
    258258            return VERR_TIMEOUT;
    259259        ts.tv_sec  = cMillies / 1000;
    260         ts.tv_nsec = (cMillies % 1000) * 1000000;
    261         u64End = RTTimeSystemNanoTS() + cMillies * 1000000;
     260        ts.tv_nsec = (cMillies % 1000) * UINT32_C(1000000);
     261        u64End = RTTimeSystemNanoTS() + cMillies * UINT64_C(1000000);
    262262        pTimeout = &ts;
    263263    }
     
    288288                if (i64Diff < 1000)
    289289                    return VERR_TIMEOUT;
    290                 ts.tv_sec  = i64Diff / 1000000000;
    291                 ts.tv_nsec = i64Diff % 1000000000;
     290                ts.tv_sec  = (uint64_t)i64Diff / UINT32_C(1000000000);
     291                ts.tv_nsec = (uint64_t)i64Diff % UINT32_C(1000000000);
    292292            }
    293293#ifdef RTSEMEVENTMULTI_STRICT
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