VirtualBox

Changeset 25724 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jan 11, 2010 2:45:34 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56467
Message:

iprt: Use RTMSINTERVAL for timeouts. Fixed missing timeout underflow checks in two RTFileAioCtxWait implementations.

Location:
trunk/include/iprt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/file.h

    r25645 r25724  
    11951195 * @param   cMinReqs        The minimum number of requests which have to
    11961196 *                          complete before this function returns.
    1197  * @param   cMillisTimeout  The number of milliseconds to wait before returning
    1198  *                          VERR_TIMEOUT. Use RT_INDEFINITE_WAIT to wait
     1197 * @param   cMillies        The number of milliseconds to wait before returning
     1198 *                          VERR_TIMEOUT.  Use RT_INDEFINITE_WAIT to wait
    11991199 *                          forever.
    12001200 * @param   pahReqs         Pointer to an array where the handles of the
     
    12121212 *          RT_ELEMENTS and similar macros.
    12131213 */
    1214 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, unsigned cMillisTimeout,
     1214RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL cMillies,
    12151215                             PRTFILEAIOREQ pahReqs, size_t cReqs, uint32_t *pcReqs);
    12161216
  • trunk/include/iprt/req.h

    r24468 r25724  
    186186 *                          Use RT_INDEFINITE_WAIT to only wait till one is added.
    187187 */
    188 RTDECL(int) RTReqProcess(PRTREQQUEUE pQueue, unsigned cMillies);
     188RTDECL(int) RTReqProcess(PRTREQQUEUE pQueue, RTMSINTERVAL cMillies);
    189189
    190190
     
    213213 * @remarks See remarks on RTReqCallV.
    214214 */
    215 RTDECL(int) RTReqCall(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
     215RTDECL(int) RTReqCall(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
    216216
    217217
     
    240240 * @remarks See remarks on RTReqCallV.
    241241 */
    242 RTDECL(int) RTReqCallVoid(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
     242RTDECL(int) RTReqCallVoid(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
    243243
    244244
     
    269269 * @remarks See remarks on RTReqCallV.
    270270 */
    271 RTDECL(int) RTReqCallEx(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
     271RTDECL(int) RTReqCallEx(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
    272272
    273273
     
    305305 *                Use (void *)NULL or (uintptr_t)0 instead of NULL.
    306306 */
    307 RTDECL(int) RTReqCallV(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
     307RTDECL(int) RTReqCallV(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
    308308
    309309
     
    352352 *                          wait till it's completed.
    353353 */
    354 RTDECL(int) RTReqQueue(PRTREQ pReq, unsigned cMillies);
     354RTDECL(int) RTReqQueue(PRTREQ pReq, RTMSINTERVAL cMillies);
    355355
    356356
     
    366366 *                          Use RT_INDEFINITE_WAIT to only wait till it's completed.
    367367 */
    368 RTDECL(int) RTReqWait(PRTREQ pReq, unsigned cMillies);
     368RTDECL(int) RTReqWait(PRTREQ pReq, RTMSINTERVAL cMillies);
    369369
    370370/**
  • trunk/include/iprt/semaphore.h

    r25723 r25724  
    123123 * @param   cMillies            Number of milliseconds to wait.
    124124 */
    125 RTDECL(int)  RTSemEventWait(RTSEMEVENT hEventSem, unsigned cMillies);
     125RTDECL(int)  RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies);
    126126
    127127/**
     
    134134 * @param   cMillies            Number of milliseconds to wait.
    135135 */
    136 RTDECL(int)  RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsigned cMillies);
     136RTDECL(int)  RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies);
    137137
    138138/**
     
    251251 * @param   cMillies            Number of milliseconds to wait.
    252252 */
    253 RTDECL(int)  RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsigned cMillies);
     253RTDECL(int)  RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies);
    254254
    255255
     
    263263 * @param   cMillies            Number of milliseconds to wait.
    264264 */
    265 RTDECL(int)  RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsigned cMillies);
     265RTDECL(int)  RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies);
    266266
    267267/**
     
    389389 * @param   cMillies            The number of milliseconds to wait.
    390390 */
    391 RTDECL(int)  RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsigned cMillies);
     391RTDECL(int)  RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies);
    392392
    393393/**
     
    404404 * @param   cMillies            The number of milliseconds to wait.
    405405 */
    406 RTDECL(int)  RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsigned cMillies);
     406RTDECL(int)  RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies);
    407407
    408408/**
     
    421421 *                              from.  Optional.
    422422 */
    423 RTDECL(int)  RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL);
     423RTDECL(int)  RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL);
    424424
    425425/**
     
    437437 *                              from.  Optional.
    438438 */
    439 RTDECL(int)  RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL);
     439RTDECL(int)  RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL);
    440440
    441441/**
     
    976976 * @param   cMillies    Number of milliseconds to wait.
    977977 */
    978 RTDECL(int) RTSemPingWait(PRTPINGPONG pPP, unsigned cMillies);
     978RTDECL(int) RTSemPingWait(PRTPINGPONG pPP, RTMSINTERVAL cMillies);
    979979
    980980/**
     
    986986 * @param   cMillies    Number of milliseconds to wait.
    987987 */
    988 RTDECL(int) RTSemPongWait(PRTPINGPONG pPP, unsigned cMillies);
     988RTDECL(int) RTSemPongWait(PRTPINGPONG pPP, RTMSINTERVAL cMillies);
    989989
    990990
  • trunk/include/iprt/tcp.h

    r23625 r25724  
    198198 *                      Use RT_INDEFINITE_WAIT to wait for ever.
    199199 */
    200 RTR3DECL(int)  RTTcpSelectOne(RTSOCKET Sock, unsigned cMillies);
     200RTR3DECL(int)  RTTcpSelectOne(RTSOCKET Sock, RTMSINTERVAL cMillies);
    201201
    202202
  • trunk/include/iprt/thread.h

    r25638 r25724  
    200200 * @remark  See RTThreadNanoSleep() for sleeping for smaller periods of time.
    201201 */
    202 RTDECL(int) RTThreadSleep(unsigned cMillies);
     202RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies);
    203203
    204204/**
     
    334334 * @param       prc             Where to store the return code of the thread. Optional.
    335335 */
    336 RTDECL(int) RTThreadWait(RTTHREAD Thread, unsigned cMillies, int *prc);
     336RTDECL(int) RTThreadWait(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc);
    337337
    338338/**
     
    345345 * @param       prc             Where to store the return code of the thread. Optional.
    346346 */
    347 RTDECL(int) RTThreadWaitNoResume(RTTHREAD Thread, unsigned cMillies, int *prc);
     347RTDECL(int) RTThreadWaitNoResume(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc);
    348348
    349349/**
     
    406406 *                              an indefinite wait.
    407407 */
    408 RTDECL(int) RTThreadUserWait(RTTHREAD Thread, unsigned cMillies);
     408RTDECL(int) RTThreadUserWait(RTTHREAD Thread, RTMSINTERVAL cMillies);
    409409
    410410/**
     
    416416 *                              an indefinite wait.
    417417 */
    418 RTDECL(int) RTThreadUserWaitNoResume(RTTHREAD Thread, unsigned cMillies);
     418RTDECL(int) RTThreadUserWaitNoResume(RTTHREAD Thread, RTMSINTERVAL cMillies);
    419419
    420420/**
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