Changeset 25620 in vbox for trunk/src/VBox/Runtime/r3/posix
- Timestamp:
- Jan 2, 2010 10:18:07 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/semrw-posix.cpp
r25618 r25620 93 93 94 94 95 /* No debug wrapping here. */ 96 #undef RTSemRWRequestRead 97 #undef RTSemRWRequestReadNoResume 98 #undef RTSemRWRequestWrite 99 #undef RTSemRWRequestWriteNoResume 100 101 95 102 RTDECL(int) RTSemRWCreate(PRTSEMRW pRWSem) 96 103 { … … 180 187 181 188 182 RTDECL(int) RTSemRWRequestRead(RTSEMRW RWSem, unsigned cMillies) 183 { 184 PRTLOCKVALSRCPOS pSrcPos = NULL; 185 189 DECL_FORCE_INLINE(int) rtSemRWRequestRead(RTSEMRW RWSem, unsigned cMillies, PCRTLOCKVALSRCPOS pSrcPos) 190 { 186 191 /* 187 192 * Validate input. … … 281 286 282 287 288 RTDECL(int) RTSemRWRequestRead(RTSEMRW RWSem, unsigned cMillies) 289 { 290 #ifndef RTSEMRW_STRICT 291 return rtSemRWRequestRead(RWSem, cMillies, NULL); 292 #else 293 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API(); 294 return rtSemRWRequestRead(RWSem, cMillies, &SrcPos); 295 #endif 296 } 297 298 299 RTDECL(int) RTSemRWRequestReadDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 300 { 301 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); 302 return rtSemRWRequestRead(RWSem, cMillies, &SrcPos); 303 } 304 305 283 306 RTDECL(int) RTSemRWRequestReadNoResume(RTSEMRW RWSem, unsigned cMillies) 284 307 { 285 308 /* EINTR isn't returned by the wait functions we're using. */ 286 return RTSemRWRequestRead(RWSem, cMillies); 309 #ifndef RTSEMRW_STRICT 310 return rtSemRWRequestRead(RWSem, cMillies, NULL); 311 #else 312 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API(); 313 return rtSemRWRequestRead(RWSem, cMillies, &SrcPos); 314 #endif 315 } 316 317 318 RTDECL(int) RTSemRWRequestReadNoResumeDebug(RTSEMRW RWSem, unsigned cMillies, RTHCUINTPTR uId, RT_SRC_POS_DECL) 319 { 320 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); 321 return rtSemRWRequestRead(RWSem, cMillies, &SrcPos); 287 322 } 288 323
Note:
See TracChangeset
for help on using the changeset viewer.