Changeset 25724 in vbox
- Timestamp:
- Jan 11, 2010 2:45:34 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56467
- Location:
- trunk
- Files:
-
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/file.h
r25645 r25724 1195 1195 * @param cMinReqs The minimum number of requests which have to 1196 1196 * complete before this function returns. 1197 * @param cMilli sTimeoutThe number of milliseconds to wait before returning1198 * VERR_TIMEOUT. Use RT_INDEFINITE_WAIT to wait1197 * @param cMillies The number of milliseconds to wait before returning 1198 * VERR_TIMEOUT. Use RT_INDEFINITE_WAIT to wait 1199 1199 * forever. 1200 1200 * @param pahReqs Pointer to an array where the handles of the … … 1212 1212 * RT_ELEMENTS and similar macros. 1213 1213 */ 1214 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, unsigned cMillisTimeout,1214 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL cMillies, 1215 1215 PRTFILEAIOREQ pahReqs, size_t cReqs, uint32_t *pcReqs); 1216 1216 -
trunk/include/iprt/req.h
r24468 r25724 186 186 * Use RT_INDEFINITE_WAIT to only wait till one is added. 187 187 */ 188 RTDECL(int) RTReqProcess(PRTREQQUEUE pQueue, unsignedcMillies);188 RTDECL(int) RTReqProcess(PRTREQQUEUE pQueue, RTMSINTERVAL cMillies); 189 189 190 190 … … 213 213 * @remarks See remarks on RTReqCallV. 214 214 */ 215 RTDECL(int) RTReqCall(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsignedcMillies, PFNRT pfnFunction, unsigned cArgs, ...);215 RTDECL(int) RTReqCall(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 216 216 217 217 … … 240 240 * @remarks See remarks on RTReqCallV. 241 241 */ 242 RTDECL(int) RTReqCallVoid(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsignedcMillies, PFNRT pfnFunction, unsigned cArgs, ...);242 RTDECL(int) RTReqCallVoid(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, PFNRT pfnFunction, unsigned cArgs, ...); 243 243 244 244 … … 269 269 * @remarks See remarks on RTReqCallV. 270 270 */ 271 RTDECL(int) RTReqCallEx(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsignedcMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);271 RTDECL(int) RTReqCallEx(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...); 272 272 273 273 … … 305 305 * Use (void *)NULL or (uintptr_t)0 instead of NULL. 306 306 */ 307 RTDECL(int) RTReqCallV(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsignedcMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);307 RTDECL(int) RTReqCallV(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args); 308 308 309 309 … … 352 352 * wait till it's completed. 353 353 */ 354 RTDECL(int) RTReqQueue(PRTREQ pReq, unsignedcMillies);354 RTDECL(int) RTReqQueue(PRTREQ pReq, RTMSINTERVAL cMillies); 355 355 356 356 … … 366 366 * Use RT_INDEFINITE_WAIT to only wait till it's completed. 367 367 */ 368 RTDECL(int) RTReqWait(PRTREQ pReq, unsignedcMillies);368 RTDECL(int) RTReqWait(PRTREQ pReq, RTMSINTERVAL cMillies); 369 369 370 370 /** -
trunk/include/iprt/semaphore.h
r25723 r25724 123 123 * @param cMillies Number of milliseconds to wait. 124 124 */ 125 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies);125 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies); 126 126 127 127 /** … … 134 134 * @param cMillies Number of milliseconds to wait. 135 135 */ 136 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies);136 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies); 137 137 138 138 /** … … 251 251 * @param cMillies Number of milliseconds to wait. 252 252 */ 253 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies);253 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies); 254 254 255 255 … … 263 263 * @param cMillies Number of milliseconds to wait. 264 264 */ 265 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies);265 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies); 266 266 267 267 /** … … 389 389 * @param cMillies The number of milliseconds to wait. 390 390 */ 391 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies);391 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies); 392 392 393 393 /** … … 404 404 * @param cMillies The number of milliseconds to wait. 405 405 */ 406 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsignedcMillies);406 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies); 407 407 408 408 /** … … 421 421 * from. Optional. 422 422 */ 423 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL);423 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL); 424 424 425 425 /** … … 437 437 * from. Optional. 438 438 */ 439 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL);439 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL); 440 440 441 441 /** … … 976 976 * @param cMillies Number of milliseconds to wait. 977 977 */ 978 RTDECL(int) RTSemPingWait(PRTPINGPONG pPP, unsignedcMillies);978 RTDECL(int) RTSemPingWait(PRTPINGPONG pPP, RTMSINTERVAL cMillies); 979 979 980 980 /** … … 986 986 * @param cMillies Number of milliseconds to wait. 987 987 */ 988 RTDECL(int) RTSemPongWait(PRTPINGPONG pPP, unsignedcMillies);988 RTDECL(int) RTSemPongWait(PRTPINGPONG pPP, RTMSINTERVAL cMillies); 989 989 990 990 -
trunk/include/iprt/tcp.h
r23625 r25724 198 198 * Use RT_INDEFINITE_WAIT to wait for ever. 199 199 */ 200 RTR3DECL(int) RTTcpSelectOne(RTSOCKET Sock, unsignedcMillies);200 RTR3DECL(int) RTTcpSelectOne(RTSOCKET Sock, RTMSINTERVAL cMillies); 201 201 202 202 -
trunk/include/iprt/thread.h
r25638 r25724 200 200 * @remark See RTThreadNanoSleep() for sleeping for smaller periods of time. 201 201 */ 202 RTDECL(int) RTThreadSleep( unsignedcMillies);202 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies); 203 203 204 204 /** … … 334 334 * @param prc Where to store the return code of the thread. Optional. 335 335 */ 336 RTDECL(int) RTThreadWait(RTTHREAD Thread, unsignedcMillies, int *prc);336 RTDECL(int) RTThreadWait(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc); 337 337 338 338 /** … … 345 345 * @param prc Where to store the return code of the thread. Optional. 346 346 */ 347 RTDECL(int) RTThreadWaitNoResume(RTTHREAD Thread, unsignedcMillies, int *prc);347 RTDECL(int) RTThreadWaitNoResume(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc); 348 348 349 349 /** … … 406 406 * an indefinite wait. 407 407 */ 408 RTDECL(int) RTThreadUserWait(RTTHREAD Thread, unsignedcMillies);408 RTDECL(int) RTThreadUserWait(RTTHREAD Thread, RTMSINTERVAL cMillies); 409 409 410 410 /** … … 416 416 * an indefinite wait. 417 417 */ 418 RTDECL(int) RTThreadUserWaitNoResume(RTTHREAD Thread, unsignedcMillies);418 RTDECL(int) RTThreadUserWaitNoResume(RTTHREAD Thread, RTMSINTERVAL cMillies); 419 419 420 420 /** -
trunk/src/VBox/Runtime/common/misc/req.cpp
r24468 r25724 109 109 * Use RT_INDEFINITE_WAIT to only wait till one is added. 110 110 */ 111 RTDECL(int) RTReqProcess(PRTREQQUEUE pQueue, unsignedcMillies)111 RTDECL(int) RTReqProcess(PRTREQQUEUE pQueue, RTMSINTERVAL cMillies) 112 112 { 113 113 LogFlow(("RTReqProcess %x\n", pQueue)); … … 211 211 * @remarks See remarks on RTReqCallV. 212 212 */ 213 RTDECL(int) RTReqCall(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsignedcMillies, PFNRT pfnFunction, unsigned cArgs, ...)213 RTDECL(int) RTReqCall(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, PFNRT pfnFunction, unsigned cArgs, ...) 214 214 { 215 215 va_list va; … … 246 246 * @remarks See remarks on RTReqCallV. 247 247 */ 248 RTDECL(int) RTReqCallVoid(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsignedcMillies, PFNRT pfnFunction, unsigned cArgs, ...)248 RTDECL(int) RTReqCallVoid(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, PFNRT pfnFunction, unsigned cArgs, ...) 249 249 { 250 250 va_list va; … … 283 283 * @remarks See remarks on RTReqCallV. 284 284 */ 285 RTDECL(int) RTReqCallEx(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsignedcMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...)285 RTDECL(int) RTReqCallEx(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...) 286 286 { 287 287 va_list va; … … 327 327 * Use (void *)NULL or (uintptr_t)0 instead of NULL. 328 328 */ 329 RTDECL(int) RTReqCallV(PRTREQQUEUE pQueue, PRTREQ *ppReq, unsignedcMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args)329 RTDECL(int) RTReqCallV(PRTREQQUEUE pQueue, PRTREQ *ppReq, RTMSINTERVAL cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args) 330 330 { 331 331 LogFlow(("RTReqCallV: cMillies=%d fFlags=%#x pfnFunction=%p cArgs=%d\n", cMillies, fFlags, pfnFunction, cArgs)); … … 656 656 * wait till it's completed. 657 657 */ 658 RTDECL(int) RTReqQueue(PRTREQ pReq, unsignedcMillies)658 RTDECL(int) RTReqQueue(PRTREQ pReq, RTMSINTERVAL cMillies) 659 659 { 660 660 LogFlow(("RTReqQueue: pReq=%p cMillies=%d\n", pReq, cMillies)); … … 724 724 * Use RT_INDEFINITE_WAIT to only wait till it's completed. 725 725 */ 726 RTDECL(int) RTReqWait(PRTREQ pReq, unsignedcMillies)726 RTDECL(int) RTReqWait(PRTREQ pReq, RTMSINTERVAL cMillies) 727 727 { 728 728 LogFlow(("RTReqWait: pReq=%p cMillies=%d\n", pReq, cMillies)); -
trunk/src/VBox/Runtime/common/misc/semspingpong.cpp
r21337 r25724 197 197 * @param cMillies Number of milliseconds to wait. 198 198 */ 199 RTDECL(int) RTSemPingWait(PRTPINGPONG pPP, unsignedcMillies)199 RTDECL(int) RTSemPingWait(PRTPINGPONG pPP, RTMSINTERVAL cMillies) 200 200 { 201 201 /* … … 230 230 * @param cMillies Number of milliseconds to wait. 231 231 */ 232 RTDECL(int) RTSemPongWait(PRTPINGPONG pPP, unsignedcMillies)232 RTDECL(int) RTSemPongWait(PRTPINGPONG pPP, RTMSINTERVAL cMillies) 233 233 { 234 234 /* -
trunk/src/VBox/Runtime/common/misc/thread.cpp
r25690 r25724 994 994 * an indefinite wait. 995 995 */ 996 RTDECL(int) RTThreadUserWait(RTTHREAD Thread, unsignedcMillies)996 RTDECL(int) RTThreadUserWait(RTTHREAD Thread, RTMSINTERVAL cMillies) 997 997 { 998 998 int rc; … … 1018 1018 * an indefinite wait. 1019 1019 */ 1020 RTDECL(int) RTThreadUserWaitNoResume(RTTHREAD Thread, unsignedcMillies)1020 RTDECL(int) RTThreadUserWaitNoResume(RTTHREAD Thread, RTMSINTERVAL cMillies) 1021 1021 { 1022 1022 int rc; … … 1066 1066 * @param fAutoResume Whether or not to resume the wait on VERR_INTERRUPTED. 1067 1067 */ 1068 static int rtThreadWait(RTTHREAD Thread, unsignedcMillies, int *prc, bool fAutoResume)1068 static int rtThreadWait(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc, bool fAutoResume) 1069 1069 { 1070 1070 int rc = VERR_INVALID_HANDLE; … … 1116 1116 * @param prc Where to store the return code of the thread. Optional. 1117 1117 */ 1118 RTDECL(int) RTThreadWait(RTTHREAD Thread, unsignedcMillies, int *prc)1118 RTDECL(int) RTThreadWait(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc) 1119 1119 { 1120 1120 int rc = rtThreadWait(Thread, cMillies, prc, true); … … 1134 1134 * @param prc Where to store the return code of the thread. Optional. 1135 1135 */ 1136 RTDECL(int) RTThreadWaitNoResume(RTTHREAD Thread, unsignedcMillies, int *prc)1136 RTDECL(int) RTThreadWaitNoResume(RTTHREAD Thread, RTMSINTERVAL cMillies, int *prc) 1137 1137 { 1138 1138 return rtThreadWait(Thread, cMillies, prc, false); -
trunk/src/VBox/Runtime/generic/RTSemEventMultiWait-generic.cpp
r25381 r25724 43 43 44 44 #undef RTSemEventMultiWait /* undo debug mapping */ 45 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI EventSem, unsignedcMillies)45 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI EventSem, RTMSINTERVAL cMillies) 46 46 { 47 47 int rc; … … 62 62 if (u64Elapsed >= cMillies) 63 63 return VERR_TIMEOUT; 64 rc = RTSemEventMultiWaitNoResume(EventSem, cMillies - ( unsigned)u64Elapsed);64 rc = RTSemEventMultiWaitNoResume(EventSem, cMillies - (RTMSINTERVAL)u64Elapsed); 65 65 } while (rc == VERR_INTERRUPTED); 66 66 } -
trunk/src/VBox/Runtime/generic/RTSemEventWait-generic.cpp
r25381 r25724 43 43 44 44 #undef RTSemEventWait /* undo debug mapping */ 45 RTDECL(int) RTSemEventWait(RTSEMEVENT EventSem, unsignedcMillies)45 RTDECL(int) RTSemEventWait(RTSEMEVENT EventSem, RTMSINTERVAL cMillies) 46 46 { 47 47 int rc; … … 62 62 if (u64Elapsed >= cMillies) 63 63 return VERR_TIMEOUT; 64 rc = RTSemEventWaitNoResume(EventSem, cMillies - ( unsigned)u64Elapsed);64 rc = RTSemEventWaitNoResume(EventSem, cMillies - (RTMSINTERVAL)u64Elapsed); 65 65 } while (rc == VERR_INTERRUPTED); 66 66 } -
trunk/src/VBox/Runtime/generic/RTSemMutexRequest-generic.cpp
r25381 r25724 43 43 44 44 #undef RTSemMutexRequest /* undo debug mapping */ 45 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX Mutex, unsignedcMillies)45 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX Mutex, RTMSINTERVAL cMillies) 46 46 { 47 47 int rc; … … 62 62 if (u64Elapsed >= cMillies) 63 63 return VERR_TIMEOUT; 64 rc = RTSemMutexRequestNoResume(Mutex, cMillies - ( unsigned)u64Elapsed);64 rc = RTSemMutexRequestNoResume(Mutex, cMillies - (RTMSINTERVAL)u64Elapsed); 65 65 } while (rc == VERR_INTERRUPTED); 66 66 } -
trunk/src/VBox/Runtime/generic/RTSemMutexRequestDebug-generic.cpp
r25381 r25724 43 43 44 44 45 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX Mutex, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)45 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX Mutex, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 46 46 { 47 47 int rc; … … 62 62 if (u64Elapsed >= cMillies) 63 63 return VERR_TIMEOUT; 64 rc = RTSemMutexRequestNoResumeDebug(Mutex, cMillies - ( unsigned)u64Elapsed, uId, RT_SRC_POS_ARGS);64 rc = RTSemMutexRequestNoResumeDebug(Mutex, cMillies - (RTMSINTERVAL)u64Elapsed, uId, RT_SRC_POS_ARGS); 65 65 } while (rc == VERR_INTERRUPTED); 66 66 } -
trunk/src/VBox/Runtime/generic/semrw-generic.cpp
r25723 r25724 263 263 AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE); 264 264 265 unsignedcMilliesInitial = cMillies;265 RTMSINTERVAL cMilliesInitial = cMillies; 266 266 uint64_t tsStart = 0; 267 267 if (cMillies != RT_INDEFINITE_WAIT && cMillies != 0) … … 353 353 tsDelta /= 1000000; 354 354 if ((uint64_t)tsDelta < cMilliesInitial) 355 cMilliesInitial = ( unsigned)tsDelta;355 cMilliesInitial = (RTMSINTERVAL)tsDelta; 356 356 else 357 357 cMilliesInitial = 1; … … 555 555 * Validate handle. 556 556 */ 557 struct RTSEMRWINTERNAL *pThis = hRWSem;557 struct RTSEMRWINTERNAL *pThis = hRWSem; 558 558 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 559 559 AssertReturn(pThis->u32Magic == RTSEMRW_MAGIC, VERR_INVALID_HANDLE); 560 560 561 unsignedcMilliesInitial = cMillies;562 uint64_t tsStart= 0;561 RTMSINTERVAL cMilliesInitial = cMillies; 562 uint64_t tsStart = 0; 563 563 if (cMillies != RT_INDEFINITE_WAIT && cMillies != 0) 564 564 tsStart = RTTimeNanoTS(); … … 643 643 tsDelta /= 1000000; 644 644 if ((uint64_t)tsDelta < cMilliesInitial) 645 cMilliesInitial = ( unsigned)tsDelta;645 cMilliesInitial = (RTMSINTERVAL)tsDelta; 646 646 else 647 647 cMilliesInitial = 1; -
trunk/src/VBox/Runtime/r0drv/darwin/semaphore-r0drv-darwin.cpp
r25722 r25724 215 215 216 216 217 static int rtSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies, wait_interrupt_t fInterruptible)217 static int rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, wait_interrupt_t fInterruptible) 218 218 { 219 219 PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)hEventSem; … … 305 305 306 306 307 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies)307 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 308 308 { 309 309 return rtSemEventWait(hEventSem, cMillies, THREAD_UNINT); … … 311 311 312 312 313 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)313 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 314 314 { 315 315 return rtSemEventWait(hEventSem, cMillies, THREAD_ABORTSAFE); … … 428 428 429 429 430 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies, wait_interrupt_t fInterruptible)430 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies, wait_interrupt_t fInterruptible) 431 431 { 432 432 PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)hEventMultiSem; … … 514 514 515 515 516 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)516 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 517 517 { 518 518 return rtSemEventMultiWait(hEventMultiSem, cMillies, THREAD_UNINT); … … 520 520 521 521 522 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)522 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 523 523 { 524 524 return rtSemEventMultiWait(hEventMultiSem, cMillies, THREAD_ABORTSAFE); … … 577 577 578 578 579 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies)579 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 580 580 { 581 581 /* -
trunk/src/VBox/Runtime/r0drv/darwin/thread-r0drv-darwin.cpp
r22052 r25724 48 48 49 49 50 RTDECL(int) RTThreadSleep( unsignedcMillies)50 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 51 51 { 52 52 RT_ASSERT_PREEMPTIBLE(); -
trunk/src/VBox/Runtime/r0drv/freebsd/semevent-r0drv-freebsd.c
r25717 r25724 162 162 163 163 164 static int rtSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies, bool fInterruptible)164 static int rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, bool fInterruptible) 165 165 { 166 166 int rc; … … 283 283 284 284 285 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies)285 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 286 286 { 287 287 return rtSemEventWait(hEventSem, cMillies, false /* not interruptible */); … … 289 289 290 290 291 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)291 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 292 292 { 293 293 return rtSemEventWait(hEventSem, cMillies, true /* interruptible */); -
trunk/src/VBox/Runtime/r0drv/freebsd/semeventmulti-r0drv-freebsd.c
r25720 r25724 177 177 178 178 179 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies, bool fInterruptible)179 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies, bool fInterruptible) 180 180 { 181 181 int rc; … … 293 293 294 294 295 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)295 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 296 296 { 297 297 return rtSemEventMultiWait(hEventMultiSem, cMillies, false /* not interruptible */); … … 299 299 300 300 301 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)301 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 302 302 { 303 303 return rtSemEventMultiWait(hEventMultiSem, cMillies, true /* interruptible */); -
trunk/src/VBox/Runtime/r0drv/freebsd/thread-r0drv-freebsd.c
r22151 r25724 49 49 50 50 51 RTDECL(int) RTThreadSleep( unsignedcMillies)51 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 52 52 { 53 53 int rc; -
trunk/src/VBox/Runtime/r0drv/linux/semevent-r0drv-linux.c
r25717 r25724 138 138 * @param fInterruptible Whether it's an interruptible wait or not. 139 139 */ 140 static int rtSemEventWait(PRTSEMEVENTINTERNAL pThis, unsignedcMillies, bool fInterruptible)140 static int rtSemEventWait(PRTSEMEVENTINTERNAL pThis, RTMSINTERVAL cMillies, bool fInterruptible) 141 141 { 142 142 /* … … 193 193 194 194 195 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies)195 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 196 196 { 197 197 PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)hEventSem; … … 206 206 207 207 208 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)208 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 209 209 { 210 210 PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)hEventSem; -
trunk/src/VBox/Runtime/r0drv/linux/semeventmulti-r0drv-linux.c
r25720 r25724 161 161 * @param fInterruptible Whether it's an interruptible wait or not. 162 162 */ 163 static int rtSemEventMultiWait(PRTSEMEVENTMULTIINTERNAL pThis, unsignedcMillies, bool fInterruptible)163 static int rtSemEventMultiWait(PRTSEMEVENTMULTIINTERNAL pThis, RTMSINTERVAL cMillies, bool fInterruptible) 164 164 { 165 165 /* … … 216 216 217 217 218 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)218 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 219 219 { 220 220 PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)hEventMultiSem; … … 231 231 232 232 233 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)233 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 234 234 { 235 235 PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)hEventMultiSem; -
trunk/src/VBox/Runtime/r0drv/linux/semmutex-r0drv-linux.c
r25721 r25724 120 120 121 121 #undef RTSemMutexRequest 122 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies)122 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 123 123 { 124 124 int rc = VINF_SUCCESS; -
trunk/src/VBox/Runtime/r0drv/linux/thread-r0drv-linux.c
r22150 r25724 59 59 60 60 61 RTDECL(int) RTThreadSleep( unsignedcMillies)61 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 62 62 { 63 63 long cJiffies = msecs_to_jiffies(cMillies); -
trunk/src/VBox/Runtime/r0drv/nt/semevent-r0drv-nt.cpp
r25717 r25724 120 120 121 121 122 static int rtSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies, bool fInterruptible)122 static int rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, bool fInterruptible) 123 123 { 124 124 /* … … 163 163 164 164 165 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies)165 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 166 166 { 167 167 return rtSemEventWait(hEventSem, cMillies, false /* fInterruptible */); … … 169 169 170 170 171 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)171 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 172 172 { 173 173 return rtSemEventWait(hEventSem, cMillies, true /* fInterruptible */); -
trunk/src/VBox/Runtime/r0drv/nt/semeventmulti-r0drv-nt.cpp
r25722 r25724 142 142 143 143 144 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies, bool fInterruptible)144 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies, bool fInterruptible) 145 145 { 146 146 /* … … 187 187 188 188 189 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)189 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 190 190 { 191 191 return rtSemEventMultiWait(hEventMultiSem, cMillies, false /* fInterruptible */); … … 193 193 194 194 195 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)195 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 196 196 { 197 197 return rtSemEventMultiWait(hEventMultiSem, cMillies, true /* fInterruptible */); -
trunk/src/VBox/Runtime/r0drv/nt/semmutex-r0drv-nt.cpp
r25721 r25724 123 123 * (RTSemMutexRequest). 124 124 */ 125 static int rtSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies, BOOLEAN fInterruptible)125 static int rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, BOOLEAN fInterruptible) 126 126 { 127 127 /* … … 174 174 175 175 #undef RTSemMutexRequest 176 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies)176 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 177 177 { 178 178 return rtSemMutexRequest(hMutexSem, cMillies, FALSE /*fInterruptible*/); … … 180 180 181 181 182 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)182 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 183 183 { 184 184 return RTSemMutexRequest(hMutexSem, cMillies); … … 187 187 188 188 #undef RTSemMutexRequestNoResume 189 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsignedcMillies)189 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 190 190 { 191 191 return rtSemMutexRequest(hMutexSem, cMillies, TRUE /*fInterruptible*/); … … 193 193 194 194 195 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)195 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 196 196 { 197 197 return RTSemMutexRequestNoResume(hMutexSem, cMillies); -
trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp
r24034 r25724 54 54 55 55 56 RTDECL(int) RTThreadSleep( unsignedcMillies)56 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 57 57 { 58 58 LARGE_INTEGER Interval; -
trunk/src/VBox/Runtime/r0drv/os2/semevent-r0drv-os2.cpp
r25717 r25724 154 154 155 155 156 static int rtSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies, bool fInterruptible)156 static int rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, bool fInterruptible) 157 157 { 158 158 PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)hEventSem; … … 221 221 222 222 223 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies)223 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 224 224 { 225 225 return rtSemEventWait(hEventSem, cMillies, false /* not interruptible */); … … 227 227 228 228 229 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)229 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 230 230 { 231 231 return rtSemEventWait(hEventSem, cMillies, true /* interruptible */); -
trunk/src/VBox/Runtime/r0drv/os2/semeventmulti-r0drv-os2.cpp
r25720 r25724 164 164 165 165 166 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies, bool fInterruptible)166 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies, bool fInterruptible) 167 167 { 168 168 PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)hEventMultiSem; … … 230 230 231 231 232 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)232 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 233 233 { 234 234 return rtSemEventMultiWait(hEventMultiSem, cMillies, false /* not interruptible */); … … 236 236 237 237 238 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)238 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 239 239 { 240 240 return rtSemEventMultiWait(hEventMultiSem, cMillies, true /* interruptible */); -
trunk/src/VBox/Runtime/r0drv/os2/thread-r0drv-os2.cpp
r24287 r25724 59 59 60 60 61 RTDECL(int) RTThreadSleep( unsignedcMillies)61 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 62 62 { 63 63 int rc = KernBlock((ULONG)RTThreadSleep, -
trunk/src/VBox/Runtime/r0drv/solaris/semevent-r0drv-solaris.c
r25717 r25724 183 183 184 184 185 static int rtSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies, bool fInterruptible)185 static int rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, bool fInterruptible) 186 186 { 187 187 int rc; … … 270 270 271 271 272 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies)272 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 273 273 { 274 274 return rtSemEventWait(hEventSem, cMillies, false /* not interruptible */); … … 276 276 277 277 278 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)278 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 279 279 { 280 280 return rtSemEventWait(hEventSem, cMillies, true /* interruptible */); -
trunk/src/VBox/Runtime/r0drv/solaris/semeventmulti-r0drv-solaris.c
r25720 r25724 217 217 218 218 219 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies, bool fInterruptible)219 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies, bool fInterruptible) 220 220 { 221 221 int rc; … … 301 301 302 302 303 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)303 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 304 304 { 305 305 return rtSemEventMultiWait(hEventMultiSem, cMillies, false /* not interruptible */); … … 307 307 308 308 309 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)309 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 310 310 { 311 311 return rtSemEventMultiWait(hEventMultiSem, cMillies, true /* interruptible */); -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/thread-r0drv-solaris.c
r25183 r25724 50 50 51 51 52 RTDECL(int) RTThreadSleep( unsignedcMillies)52 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 53 53 { 54 54 clock_t cTicks; -
trunk/src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp
r25645 r25724 472 472 } 473 473 474 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, unsigned cMillisTimeout,474 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL cMillies, 475 475 PRTFILEAIOREQ pahReqs, size_t cReqs, uint32_t *pcReqs) 476 476 { … … 498 498 struct timespec Timeout = {0,0}; 499 499 uint64_t StartNanoTS = 0; 500 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)501 { 502 Timeout.tv_sec = cMilli sTimeout/ 1000;503 Timeout.tv_nsec = cMilli sTimeout% 1000 * 1000000;500 if (cMillies != RT_INDEFINITE_WAIT) 501 { 502 Timeout.tv_sec = cMillies / 1000; 503 Timeout.tv_nsec = cMillies % 1000 * 1000000; 504 504 pTimeout = &Timeout; 505 505 StartNanoTS = RTTimeNanoTS(); … … 573 573 cReqs -= cDone; 574 574 575 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)575 if (cMillies != RT_INDEFINITE_WAIT) 576 576 { 577 577 /* The API doesn't return ETIMEDOUT, so we have to fix that ourselves. */ 578 578 uint64_t NanoTS = RTTimeNanoTS(); 579 579 uint64_t cMilliesElapsed = (NanoTS - StartNanoTS) / 1000000; 580 if (cMilliesElapsed >= cMilli sTimeout)580 if (cMilliesElapsed >= cMillies) 581 581 { 582 582 rc = VERR_TIMEOUT; … … 585 585 586 586 /* The syscall supposedly updates it, but we're paranoid. :-) */ 587 Timeout.tv_sec = (cMilli sTimeout - (unsigned)cMilliesElapsed) / 1000;588 Timeout.tv_nsec = (cMilli sTimeout - (unsigned)cMilliesElapsed) % 1000 * 1000000;587 Timeout.tv_sec = (cMillies - (RTMSINTERVAL)cMilliesElapsed) / 1000; 588 Timeout.tv_nsec = (cMillies - (RTMSINTERVAL)cMilliesElapsed) % 1000 * 1000000; 589 589 } 590 590 } -
trunk/src/VBox/Runtime/r3/linux/fileaio-linux.cpp
r25645 r25724 647 647 648 648 649 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, unsigned cMillisTimeout,649 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL cMillies, 650 650 PRTFILEAIOREQ pahReqs, size_t cReqs, uint32_t *pcReqs) 651 651 { … … 673 673 struct timespec Timeout = {0,0}; 674 674 uint64_t StartNanoTS = 0; 675 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)675 if (cMillies != RT_INDEFINITE_WAIT) 676 676 { 677 Timeout.tv_sec = cMilli sTimeout/ 1000;678 Timeout.tv_nsec = cMilli sTimeout% 1000 * 1000000;677 Timeout.tv_sec = cMillies / 1000; 678 Timeout.tv_nsec = cMillies % 1000 * 1000000; 679 679 pTimeout = &Timeout; 680 680 StartNanoTS = RTTimeNanoTS(); … … 747 747 cReqs -= cDone; 748 748 749 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)749 if (cMillies != RT_INDEFINITE_WAIT) 750 750 { 751 751 /* The API doesn't return ETIMEDOUT, so we have to fix that ourselves. */ 752 752 uint64_t NanoTS = RTTimeNanoTS(); 753 753 uint64_t cMilliesElapsed = (NanoTS - StartNanoTS) / 1000000; 754 if (cMilliesElapsed >= cMilli sTimeout)754 if (cMilliesElapsed >= cMillies) 755 755 { 756 756 rc = VERR_TIMEOUT; … … 759 759 760 760 /* The syscall supposedly updates it, but we're paranoid. :-) */ 761 Timeout.tv_sec = (cMilli sTimeout - (unsigned)cMilliesElapsed) / 1000;762 Timeout.tv_nsec = (cMilli sTimeout - (unsigned)cMilliesElapsed) % 1000 * 1000000;761 Timeout.tv_sec = (cMillies - (RTMSINTERVAL)cMilliesElapsed) / 1000; 762 Timeout.tv_nsec = (cMillies - (RTMSINTERVAL)cMilliesElapsed) % 1000 * 1000000; 763 763 } 764 764 } -
trunk/src/VBox/Runtime/r3/linux/semevent-linux.cpp
r25717 r25724 219 219 220 220 221 static int rtSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies, bool fAutoResume)221 static int rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, bool fAutoResume) 222 222 { 223 223 PCRTLOCKVALSRCPOS pSrcPos = NULL; … … 331 331 332 332 333 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies)333 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 334 334 { 335 335 int rc = rtSemEventWait(hEventSem, cMillies, true); … … 340 340 341 341 342 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)342 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 343 343 { 344 344 return rtSemEventWait(hEventSem, cMillies, false); -
trunk/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp
r25720 r25724 242 242 243 243 244 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies, bool fAutoResume)244 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies, bool fAutoResume) 245 245 { 246 246 PCRTLOCKVALSRCPOS pSrcPos = NULL; … … 354 354 355 355 356 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)356 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 357 357 { 358 358 int rc = rtSemEventMultiWait(hEventMultiSem, cMillies, true); … … 362 362 363 363 364 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)364 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 365 365 { 366 366 return rtSemEventMultiWait(hEventMultiSem, cMillies, false); -
trunk/src/VBox/Runtime/r3/linux/semmutex-linux.cpp
r25721 r25724 194 194 195 195 196 DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies, bool fAutoResume, PCRTLOCKVALSRCPOS pSrcPos)196 DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, bool fAutoResume, PCRTLOCKVALSRCPOS pSrcPos) 197 197 { 198 198 /* … … 343 343 344 344 #undef RTSemMutexRequest 345 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies)345 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 346 346 { 347 347 #ifndef RTSEMMUTEX_STRICT … … 356 356 357 357 358 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)358 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 359 359 { 360 360 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); … … 366 366 367 367 #undef RTSemMutexRequestNoResume 368 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsignedcMillies)368 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 369 369 { 370 370 #ifndef RTSEMMUTEX_STRICT … … 377 377 378 378 379 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)379 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 380 380 { 381 381 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); -
trunk/src/VBox/Runtime/r3/os2/sems-os2.cpp
r25721 r25724 89 89 90 90 91 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)91 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 92 92 { 93 93 /* … … 226 226 227 227 228 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)228 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 229 229 { 230 230 /* … … 327 327 328 328 #undef RTSemMutexRequestNoResume 329 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsignedcMillies)329 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 330 330 { 331 331 /* -
trunk/src/VBox/Runtime/r3/os2/thread-os2.cpp
r16311 r25724 176 176 177 177 178 RTDECL(int) RTThreadSleep( unsignedcMillies)178 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 179 179 { 180 180 LogFlow(("RTThreadSleep: cMillies=%d\n", cMillies)); -
trunk/src/VBox/Runtime/r3/posix/fileaio-posix.cpp
r25645 r25724 807 807 808 808 809 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, unsigned cMillisTimeout,809 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL cMillies, 810 810 PRTFILEAIOREQ pahReqs, size_t cReqs, uint32_t *pcReqs) 811 811 { … … 832 832 return VERR_INVALID_PARAMETER; 833 833 834 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)834 if (cMillies != RT_INDEFINITE_WAIT) 835 835 { 836 Timeout.tv_sec = cMilli sTimeout/ 1000;837 Timeout.tv_nsec = (cMilli sTimeout% 1000) * 1000000;836 Timeout.tv_sec = cMillies / 1000; 837 Timeout.tv_nsec = (cMillies % 1000) * 1000000; 838 838 pTimeout = &Timeout; 839 839 StartNanoTS = RTTimeNanoTS(); … … 964 964 break; 965 965 966 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)966 if (cMillies != RT_INDEFINITE_WAIT) 967 967 { 968 968 uint64_t TimeDiff; … … 970 970 /* Recalculate the timeout. */ 971 971 TimeDiff = RTTimeSystemNanoTS() - StartNanoTS; 972 Timeout.tv_sec = Timeout.tv_sec- (TimeDiff / 1000000);972 Timeout.tv_sec = Timeout.tv_sec - (TimeDiff / 1000000); 973 973 Timeout.tv_nsec = Timeout.tv_nsec - (TimeDiff % 1000000); 974 974 } -
trunk/src/VBox/Runtime/r3/posix/semevent-posix.cpp
r25717 r25724 288 288 289 289 290 DECL_FORCE_INLINE(int) rtSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies, bool fAutoResume)290 DECL_FORCE_INLINE(int) rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, bool fAutoResume) 291 291 { 292 292 PCRTLOCKVALSRCPOS pSrcPos = NULL; … … 464 464 465 465 466 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, unsignedcMillies)466 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 467 467 { 468 468 int rc = rtSemEventWait(hEventSem, cMillies, true); … … 472 472 473 473 474 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)474 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 475 475 { 476 476 return rtSemEventWait(hEventSem, cMillies, false); -
trunk/src/VBox/Runtime/r3/posix/semeventmulti-posix.cpp
r25720 r25724 323 323 324 324 325 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies, bool fAutoResume)325 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies, bool fAutoResume) 326 326 { 327 327 PCRTLOCKVALSRCPOS pSrcPos = NULL; … … 495 495 496 496 497 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)497 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 498 498 { 499 499 int rc = rtSemEventMultiWait(hEventMultiSem, cMillies, true); … … 503 503 504 504 505 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)505 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 506 506 { 507 507 return rtSemEventMultiWait(hEventMultiSem, cMillies, false); -
trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
r25721 r25724 180 180 181 181 182 DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies, PCRTLOCKVALSRCPOS pSrcPos)182 DECL_FORCE_INLINE(int) rtSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, PCRTLOCKVALSRCPOS pSrcPos) 183 183 { 184 184 /* … … 281 281 282 282 #undef RTSemMutexRequest 283 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, unsignedcMillies)283 RTDECL(int) RTSemMutexRequest(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 284 284 { 285 285 #ifndef RTSEMMUTEX_STRICT … … 292 292 293 293 294 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)294 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 295 295 { 296 296 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); … … 300 300 301 301 #undef RTSemMutexRequestNoResume 302 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsignedcMillies)302 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 303 303 { 304 304 /* (EINTR isn't returned by the wait functions we're using.) */ … … 312 312 313 313 314 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)314 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 315 315 { 316 316 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); -
trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
r25638 r25724 266 266 267 267 268 RTDECL(int) RTThreadSleep( unsignedcMillies)268 RTDECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 269 269 { 270 270 LogFlow(("RTThreadSleep: cMillies=%d\n", cMillies)); -
trunk/src/VBox/Runtime/r3/solaris/fileaio-solaris.cpp
r25645 r25724 433 433 } 434 434 435 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, unsigned cMillisTimeout,435 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL cMillies, 436 436 PRTFILEAIOREQ pahReqs, size_t cReqs, uint32_t *pcReqs) 437 437 { … … 459 459 struct timespec Timeout = {0,0}; 460 460 uint64_t StartNanoTS = 0; 461 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)462 { 463 Timeout.tv_sec = cMilli sTimeout/ 1000;464 Timeout.tv_nsec = cMilli sTimeout% 1000 * 1000000;461 if (cMillies != RT_INDEFINITE_WAIT) 462 { 463 Timeout.tv_sec = cMillies / 1000; 464 Timeout.tv_nsec = cMillies % 1000 * 1000000; 465 465 pTimeout = &Timeout; 466 466 StartNanoTS = RTTimeNanoTS(); … … 517 517 cReqs -= cRequests; 518 518 519 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)519 if (cMillies != RT_INDEFINITE_WAIT) 520 520 { 521 521 uint64_t NanoTS = RTTimeNanoTS(); … … 523 523 524 524 /* The syscall supposedly updates it, but we're paranoid. :-) */ 525 Timeout.tv_sec = (cMillisTimeout - (unsigned)cMilliesElapsed) / 1000; 526 Timeout.tv_nsec = (cMillisTimeout - (unsigned)cMilliesElapsed) % 1000 * 1000000; 525 if (cMilliesElapsed < cMillies) 526 { 527 Timeout.tv_sec = (cMillies - (RTMSINTERVAL)cMilliesElapsed) / 1000; 528 Timeout.tv_nsec = (cMillies - (RTMSINTERVAL)cMilliesElapsed) % 1000 * 1000000; 529 } 530 else 531 { 532 Timeout.tv_sec = 0; 533 Timeout.tv_nsec = 0; 534 } 527 535 } 528 536 } -
trunk/src/VBox/Runtime/r3/tcp.cpp
r25000 r25724 882 882 883 883 884 RTR3DECL(int) RTTcpSelectOne(RTSOCKET Sock, unsignedcMillies)884 RTR3DECL(int) RTTcpSelectOne(RTSOCKET Sock, RTMSINTERVAL cMillies) 885 885 { 886 886 fd_set fdsetR; -
trunk/src/VBox/Runtime/r3/win/fileaio-win.cpp
r25645 r25724 386 386 } 387 387 388 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, unsigned cMillisTimeout,388 RTDECL(int) RTFileAioCtxWait(RTFILEAIOCTX hAioCtx, size_t cMinReqs, RTMSINTERVAL cMillies, 389 389 PRTFILEAIOREQ pahReqs, size_t cReqs, uint32_t *pcReqs) 390 390 { … … 417 417 int cRequestsCompleted = 0; 418 418 while ( !pCtxInt->fWokenUp 419 && (cMinReqs > 0))419 && cMinReqs > 0) 420 420 { 421 421 uint64_t StartNanoTS = 0; 422 DWORD dwTimeout = cMilli sTimeout == RT_INDEFINITE_WAIT ? INFINITE : cMillisTimeout;422 DWORD dwTimeout = cMillies == RT_INDEFINITE_WAIT ? INFINITE : cMillies; 423 423 DWORD cbTransfered; 424 424 LPOVERLAPPED pOverlapped; … … 426 426 BOOL fSucceeded; 427 427 428 if (cMilli sTimeout!= RT_INDEFINITE_WAIT)428 if (cMillies != RT_INDEFINITE_WAIT) 429 429 StartNanoTS = RTTimeNanoTS(); 430 430 … … 446 446 if (lCompletionKey == AIO_CONTEXT_WAKEUP_EVENT) 447 447 break; 448 else 448 449 /* A request completed. */ 450 PRTFILEAIOREQINTERNAL pReqInt = OVERLAPPED_2_RTFILEAIOREQINTERNAL(pOverlapped); 451 AssertPtr(pReqInt); 452 Assert(pReqInt->u32Magic == RTFILEAIOREQ_MAGIC); 453 454 /* Mark the request as finished. */ 455 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED); 456 457 /* completion status. */ 458 DWORD cbTransfered; 459 fSucceeded = GetOverlappedResult(pReqInt->hFile, 460 &pReqInt->Overlapped, 461 &cbTransfered, 462 FALSE); 463 pReqInt->cbTransfered = cbTransfered; 464 pReqInt->Rc = VINF_SUCCESS; 465 466 pahReqs[cRequestsCompleted++] = (RTFILEAIOREQ)pReqInt; 467 468 /* Update counter. */ 469 cMinReqs--; 470 471 if (cMillies != RT_INDEFINITE_WAIT) 449 472 { 450 /* A request completed. */ 451 PRTFILEAIOREQINTERNAL pReqInt = OVERLAPPED_2_RTFILEAIOREQINTERNAL(pOverlapped); 452 AssertPtr(pReqInt); 453 Assert(pReqInt->u32Magic == RTFILEAIOREQ_MAGIC); 454 455 /* Mark the request as finished. */ 456 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED); 457 458 /* completion status. */ 459 DWORD cbTransfered; 460 fSucceeded = GetOverlappedResult(pReqInt->hFile, 461 &pReqInt->Overlapped, 462 &cbTransfered, 463 FALSE); 464 pReqInt->cbTransfered = cbTransfered; 465 pReqInt->Rc = VINF_SUCCESS; 466 467 pahReqs[cRequestsCompleted++] = (RTFILEAIOREQ)pReqInt; 468 469 /* Update counter. */ 470 cMinReqs --; 471 472 if (cMillisTimeout != RT_INDEFINITE_WAIT) 473 { 474 /* Recalculate timeout. */ 475 uint64_t NanoTS = RTTimeNanoTS(); 476 uint64_t cMilliesElapsed = (NanoTS - StartNanoTS) / 1000000; 477 cMillisTimeout -= cMilliesElapsed; 478 } 473 /* Recalculate timeout. */ 474 uint64_t NanoTS = RTTimeNanoTS(); 475 uint64_t cMilliesElapsed = (NanoTS - StartNanoTS) / 1000000; 476 if (cMilliesElapsed < cMillies) 477 cMillies -= cMilliesElapsed; 478 else 479 cMillies = 0; 479 480 } 480 481 } -
trunk/src/VBox/Runtime/r3/win/semevent-win.cpp
r25717 r25724 197 197 198 198 #undef RTSemEventWaitNoResume 199 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, unsignedcMillies)199 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 200 200 { 201 201 PCRTLOCKVALSRCPOS pSrcPos = NULL; -
trunk/src/VBox/Runtime/r3/win/semeventmulti-win.cpp
r25720 r25724 221 221 222 222 #undef RTSemEventMultiWaitNoResume 223 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, unsignedcMillies)223 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 224 224 { 225 225 PCRTLOCKVALSRCPOS pSrcPos = NULL; -
trunk/src/VBox/Runtime/r3/win/semmutex-win.cpp
r25721 r25724 174 174 * @param pSrcPos The source position of the caller. 175 175 */ 176 DECL_FORCE_INLINE(int) rtSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsignedcMillies, PCRTLOCKVALSRCPOS pSrcPos)176 DECL_FORCE_INLINE(int) rtSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, PCRTLOCKVALSRCPOS pSrcPos) 177 177 { 178 178 /* … … 251 251 252 252 #undef RTSemMutexRequestNoResume 253 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, unsignedcMillies)253 RTDECL(int) RTSemMutexRequestNoResume(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies) 254 254 { 255 255 #ifndef RTSEMMUTEX_STRICT … … 262 262 263 263 264 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, unsignedcMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL)264 RTDECL(int) RTSemMutexRequestNoResumeDebug(RTSEMMUTEX hMutexSem, RTMSINTERVAL cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 265 265 { 266 266 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); -
trunk/src/VBox/Runtime/r3/win/thread-win.cpp
r13837 r25724 146 146 147 147 148 RTR3DECL(int) RTThreadSleep( unsignedcMillies)148 RTR3DECL(int) RTThreadSleep(RTMSINTERVAL cMillies) 149 149 { 150 150 LogFlow(("RTThreadSleep: cMillies=%d\n", cMillies));
Note:
See TracChangeset
for help on using the changeset viewer.