Changeset 22959 in vbox
- Timestamp:
- Sep 11, 2009 1:45:44 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r22777 r22959 183 183 ifdef IPRT_WITH_LZO 184 184 RuntimeR3_DEFS += RTZIP_USE_LZO 185 endif 186 ifdef IPRT_WITH_FUTEX_BASED_SEMS 187 RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS 185 188 endif 186 189 RuntimeR3_INCS = \ … … 445 448 r3/posix/tls-posix.cpp \ 446 449 r3/posix/utf8-posix.cpp 447 RuntimeR3_SOURCES.linux.x86 += \ 448 r3/posix/semevent-posix.cpp \ 449 r3/posix/semeventmulti-posix.cpp \ 450 r3/posix/semmutex-posix.cpp 451 RuntimeR3_SOURCES.linux.amd64 += \ 452 r3/linux/semevent-linux.cpp \ 453 r3/linux/semeventmulti-linux.cpp 454 ifdef RT_NEW_LINUX_MUTEX_CODE 450 ifdef IPRT_WITH_FUTEX_BASED_SEMS 451 RuntimeR3_SOURCES.linux += \ 452 r3/linux/semevent-linux.cpp \ 453 r3/linux/semeventmulti-linux.cpp \ 454 r3/linux/semmutex-linux.cpp 455 else 456 RuntimeR3_SOURCES.linux.x86 += \ 457 r3/posix/semevent-posix.cpp \ 458 r3/posix/semeventmulti-posix.cpp \ 459 r3/posix/semmutex-posix.cpp 455 460 RuntimeR3_SOURCES.linux.amd64 += \ 456 r3/linux/semmutex-linux.cpp 457 else 458 RuntimeR3_SOURCES.linux.amd64 += \ 459 r3/posix/semmutex-posix.cpp 461 r3/linux/semevent-linux.cpp \ 462 r3/linux/semeventmulti-linux.cpp 463 ifdef RT_NEW_LINUX_MUTEX_CODE 464 RuntimeR3_SOURCES.linux.amd64 += \ 465 r3/linux/semmutex-linux.cpp 466 else 467 RuntimeR3_SOURCES.linux.amd64 += \ 468 r3/posix/semmutex-posix.cpp 469 endif 460 470 endif 461 471 -
trunk/src/VBox/Runtime/r3/linux/semevent-linux.cpp
r22958 r22959 30 30 31 31 #include <features.h> 32 #if __GLIBC_PREREQ(2,6) 32 #if __GLIBC_PREREQ(2,6) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) 33 33 34 34 /* … … 83 83 /** The futex state variable. 84 84 * 0 means not signalled. 85 * 1 means signalled*/85 1 means signalled. */ 86 86 uint32_t volatile fSignalled; 87 87 /** The number of waiting threads */ … … 195 195 196 196 /* 197 * Convert t imeout value.197 * Convert the timeout value. 198 198 */ 199 199 struct timespec ts; … … 202 202 if (cMillies != RT_INDEFINITE_WAIT) 203 203 { 204 if (!cMillies) 205 return VERR_TIMEOUT; 204 206 ts.tv_sec = cMillies / 1000; 205 207 ts.tv_nsec = (cMillies % 1000) * 1000000; … … 282 284 } 283 285 284 #endif /* glibc < 2.6 */ 286 #endif /* glibc < 2.6 || IPRT_WITH_FUTEX_BASED_SEMS */ 287 -
trunk/src/VBox/Runtime/r3/linux/semeventmulti-linux.cpp
r22958 r22959 31 31 32 32 #include <features.h> 33 #if __GLIBC_PREREQ(2,6) 33 #if __GLIBC_PREREQ(2,6) && !defined(IPRT_WITH_FUTEX_BASED_SEMS) 34 34 35 35 /* … … 86 86 * -1 means signaled. 87 87 * 0 means not signaled, no waiters. 88 * >0 means not signaled, and the value gives the number of waiters.88 * 1 means not signaled and that someone is waiting. 89 89 */ 90 90 int32_t volatile iState; … … 212 212 if (iCur == -1) 213 213 return VINF_SUCCESS; 214 if (!cMillies) 215 return VERR_TIMEOUT; 216 217 /* 218 * Convert timeout value. 214 215 /* 216 * Convert the timeout value. 219 217 */ 220 218 struct timespec ts; … … 223 221 if (cMillies != RT_INDEFINITE_WAIT) 224 222 { 223 if (!cMillies) 224 return VERR_TIMEOUT; 225 225 ts.tv_sec = cMillies / 1000; 226 226 ts.tv_nsec = (cMillies % 1000) * 1000000; … … 300 300 } 301 301 302 #endif /* glibc < 2.6 */ 302 #endif /* glibc < 2.6 || IPRT_WITH_FUTEX_BASED_SEMS */ 303 -
trunk/src/VBox/Runtime/r3/linux/semmutex-linux.cpp
r22958 r22959 38 38 #include <iprt/asm.h> 39 39 #include <iprt/err.h> 40 #include <iprt/time.h> 40 41 #include "internal/magics.h" 41 42 #include "internal/strict.h"
Note:
See TracChangeset
for help on using the changeset viewer.