VirtualBox

Changeset 58294 in vbox


Ignore:
Timestamp:
Oct 17, 2015 10:39:09 PM (9 years ago)
Author:
vboxsync
Message:

localipc-posix.cpp: Adjust cMillies on interrupt in RTLocalIpcSessionWaitForData.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/localipc-posix.cpp

    r58293 r58294  
    4242#include <iprt/socket.h>
    4343#include <iprt/string.h>
     44#include <iprt/time.h>
    4445
    4546#include <sys/types.h>
     
    835836        {
    836837            pThis->hReadThread = RTThreadSelf();
     838            uint64_t const msStart = RTTimeMilliTS();
     839            RTMSINTERVAL const cMsOriginalTimeout = cMillies;
    837840
    838841            for (;;)
     
    882885                    else if (   rc == VERR_INTERRUPTED
    883886                             || rc == VERR_TRY_AGAIN)
     887                    {
     888                        /* Recalc cMillies. */
     889                        if (cMsOriginalTimeout != RT_INDEFINITE_WAIT)
     890                        {
     891                            uint64_t cMsElapsed = RTTimeMilliTS() - msStart;
     892                            cMillies = cMsElapsed >= cMsOriginalTimeout ? 0 : cMsOriginalTimeout - (RTMSINTERVAL)cMsElapsed;
     893                        }
    884894                        continue;
     895                    }
    885896                }
    886897                else
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