Changeset 25373 in vbox for trunk/src/VBox/Runtime/generic/semnoint-generic.cpp
- Timestamp:
- Dec 14, 2009 7:20:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/semnoint-generic.cpp
r21337 r25373 126 126 RT_EXPORT_SYMBOL(RTSemMutexRequest); 127 127 128 129 RTDECL(int) RTSemMutexRequestDebug(RTSEMMUTEX Mutex, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 130 { 131 int rc; 132 if (cMillies == RT_INDEFINITE_WAIT) 133 { 134 do rc = RTSemMutexRequestNoResumeDebug(Mutex, cMillies, uId, RT_SRC_POS_ARGS); 135 while (rc == VERR_INTERRUPTED); 136 } 137 else 138 { 139 const uint64_t u64Start = RTTimeMilliTS(); 140 rc = RTSemMutexRequestNoResumeDebug(Mutex, cMillies, uId, RT_SRC_POS_ARGS); 141 if (rc == VERR_INTERRUPTED) 142 { 143 do 144 { 145 uint64_t u64Elapsed = RTTimeMilliTS() - u64Start; 146 if (u64Elapsed >= cMillies) 147 return VERR_TIMEOUT; 148 rc = RTSemMutexRequestNoResumeDebug(Mutex, cMillies - (unsigned)u64Elapsed, uId, RT_SRC_POS_ARGS); 149 } while (rc == VERR_INTERRUPTED); 150 } 151 } 152 return rc; 153 } 154 RT_EXPORT_SYMBOL(RTSemMutexRequestDebug); 155
Note:
See TracChangeset
for help on using the changeset viewer.