VirtualBox

Ignore:
Timestamp:
Jan 11, 2010 2:45:34 PM (15 years ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/VBox/Runtime/common/misc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/req.cpp

    r24468 r25724  
    109109 *                          Use RT_INDEFINITE_WAIT to only wait till one is added.
    110110 */
    111 RTDECL(int) RTReqProcess(PRTREQQUEUE pQueue, unsigned cMillies)
     111RTDECL(int) RTReqProcess(PRTREQQUEUE pQueue, RTMSINTERVAL cMillies)
    112112{
    113113    LogFlow(("RTReqProcess %x\n", pQueue));
     
    211211 * @remarks See remarks on RTReqCallV.
    212212 */
    213 RTDECL(int) RTReqCall(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
     213RTDECL(int) RTReqCall(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    214214{
    215215    va_list va;
     
    246246 * @remarks See remarks on RTReqCallV.
    247247 */
    248 RTDECL(int) RTReqCallVoid(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
     248RTDECL(int) RTReqCallVoid(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, PFNRT pfnFunction, unsigned cArgs, ...)
    249249{
    250250    va_list va;
     
    283283 * @remarks See remarks on RTReqCallV.
    284284 */
    285 RTDECL(int) RTReqCallEx(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
     285RTDECL(int) RTReqCallEx(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)
    286286{
    287287    va_list va;
     
    327327 *                Use (void *)NULL or (uintptr_t)0 instead of NULL.
    328328 */
    329 RTDECL(int) RTReqCallV(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args)
     329RTDECL(int) RTReqCallV(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args)
    330330{
    331331    LogFlow(("RTReqCallV: cMillies=%d fFlags=%#x pfnFunction=%p cArgs=%d\n", cMillies, fFlags, pfnFunction, cArgs));
     
    656656 *                          wait till it's completed.
    657657 */
    658 RTDECL(int) RTReqQueue(PRTREQ pReq, unsigned cMillies)
     658RTDECL(int) RTReqQueue(PRTREQ pReq, RTMSINTERVAL cMillies)
    659659{
    660660    LogFlow(("RTReqQueue: pReq=%p cMillies=%d\n", pReq, cMillies));
     
    724724 *                          Use RT_INDEFINITE_WAIT to only wait till it's completed.
    725725 */
    726 RTDECL(int) RTReqWait(PRTREQ pReq, unsigned cMillies)
     726RTDECL(int) RTReqWait(PRTREQ pReq, RTMSINTERVAL cMillies)
    727727{
    728728    LogFlow(("RTReqWait: pReq=%p cMillies=%d\n", pReq, cMillies));
  • trunk/src/VBox/Runtime/common/misc/semspingpong.cpp

    r21337 r25724  
    197197 * @param   cMillies    Number of milliseconds to wait.
    198198 */
    199 RTDECL(int) RTSemPingWait(PRTPINGPONG pPP, unsigned cMillies)
     199RTDECL(int) RTSemPingWait(PRTPINGPONG pPP, RTMSINTERVAL cMillies)
    200200{
    201201    /*
     
    230230 * @param   cMillies    Number of milliseconds to wait.
    231231 */
    232 RTDECL(int) RTSemPongWait(PRTPINGPONG pPP, unsigned cMillies)
     232RTDECL(int) RTSemPongWait(PRTPINGPONG pPP, RTMSINTERVAL cMillies)
    233233{
    234234    /*
  • trunk/src/VBox/Runtime/common/misc/thread.cpp

    r25690 r25724  
    994994 *                              an indefinite wait.
    995995 */
    996 RTDECL(int) RTThreadUserWait(RTTHREAD Thread, unsigned cMillies)
     996RTDECL(int) RTThreadUserWait(RTTHREAD Thread, RTMSINTERVAL cMillies)
    997997{
    998998    int             rc;
     
    10181018 *                              an indefinite wait.
    10191019 */
    1020 RTDECL(int) RTThreadUserWaitNoResume(RTTHREAD Thread, unsigned cMillies)
     1020RTDECL(int) RTThreadUserWaitNoResume(RTTHREAD Thread, RTMSINTERVAL cMillies)
    10211021{
    10221022    int             rc;
     
    10661066 * @param       fAutoResume     Whether or not to resume the wait on VERR_INTERRUPTED.
    10671067 */
    1068 static int rtThreadWait(RTTHREAD Thread, unsigned cMillies, int *prc, bool fAutoResume)
     1068static int rtThreadWait(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc, bool fAutoResume)
    10691069{
    10701070    int rc = VERR_INVALID_HANDLE;
     
    11161116 * @param       prc             Where to store the return code of the thread. Optional.
    11171117 */
    1118 RTDECL(int) RTThreadWait(RTTHREAD Thread, unsigned cMillies, int *prc)
     1118RTDECL(int) RTThreadWait(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc)
    11191119{
    11201120    int rc = rtThreadWait(Thread, cMillies, prc, true);
     
    11341134 * @param       prc             Where to store the return code of the thread. Optional.
    11351135 */
    1136 RTDECL(int) RTThreadWaitNoResume(RTTHREAD Thread, unsigned cMillies, int *prc)
     1136RTDECL(int) RTThreadWaitNoResume(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc)
    11371137{
    11381138    return rtThreadWait(Thread, cMillies, prc, false);
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