- Timestamp:
- Sep 11, 2009 12:33:33 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime/r3/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/linux/semevent-linux.cpp
r22952 r22954 30 30 31 31 #include <features.h> 32 #if __GLIBC_PREREQ(2,6) 32 #if __GLIBC_PREREQ(2,6) && 0 33 33 34 34 /* … … 199 199 struct timespec tsEnd; 200 200 struct timespec *pTimeout = NULL; 201 if ( RT_UNLIKELY(cMillies != RT_INDEFINITE_WAIT))201 if (cMillies != RT_INDEFINITE_WAIT) 202 202 { 203 203 ts.tv_sec = cMillies / 1000; … … 256 256 } 257 257 /* adjust the relative timeout */ 258 if ( RT_UNLIKELY(pTimeout))258 if (pTimeout) 259 259 { 260 260 clock_gettime(CLOCK_REALTIME, &ts); 261 261 ts.tv_nsec = tsEnd.tv_nsec - ts.tv_nsec; 262 ts.tv_sec = tsEnd.tv_ nsec - ts.tv_sec;262 ts.tv_sec = tsEnd.tv_sec - ts.tv_sec; 263 263 if (ts.tv_nsec < 0) 264 264 { 265 265 ts.tv_nsec += 1000000000; /* not correct if ts.tv_sec is negative but we 266 266 leave on negative timeouts in any case */ 267 ts.tv_ nsec--;267 ts.tv_sec--; 268 268 } 269 269 /* don't wait for less than 1 microsecond */ -
trunk/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp
r22952 r22954 31 31 32 32 #include <features.h> 33 #if __GLIBC_PREREQ(2,6) 33 #if __GLIBC_PREREQ(2,6) && 0 34 34 35 35 /* … … 220 220 struct timespec tsEnd; 221 221 struct timespec *pTimeout = NULL; 222 if ( RT_UNLIKELY(cMillies != RT_INDEFINITE_WAIT))222 if (cMillies != RT_INDEFINITE_WAIT) 223 223 { 224 224 ts.tv_sec = cMillies / 1000; … … 250 250 { 251 251 /* adjust the relative timeout */ 252 if ( RT_UNLIKELY(pTimeout))252 if (pTimeout) 253 253 { 254 254 clock_gettime(CLOCK_REALTIME, &ts); 255 255 ts.tv_nsec = tsEnd.tv_nsec - ts.tv_nsec; 256 ts.tv_sec = tsEnd.tv_ nsec - ts.tv_sec;256 ts.tv_sec = tsEnd.tv_sec - ts.tv_sec; 257 257 if (ts.tv_nsec < 0) 258 258 { 259 259 ts.tv_nsec += 1000000000; /* not correct if ts.tv_sec is negative but we 260 260 leave on negative timeouts in any case */ 261 ts.tv_ nsec--;261 ts.tv_sec--; 262 262 } 263 263 /* don't wait for less than 1 microsecond */
Note:
See TracChangeset
for help on using the changeset viewer.