Changeset 25724 in vbox for trunk/src/VBox/Runtime/r3/freebsd
- Timestamp:
- Jan 11, 2010 2:45:34 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56467
- File:
-
- 1 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 }
Note:
See TracChangeset
for help on using the changeset viewer.