Changeset 25724 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- Jan 11, 2010 2:45:34 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime/r3
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
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.