Changeset 45678 in vbox for trunk/src/VBox/Runtime/r3/solaris
- Timestamp:
- Apr 23, 2013 11:28:41 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85204
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/solaris/fileaio-solaris.cpp
r44528 r45678 56 56 /** Current number of requests active on this context. */ 57 57 volatile int32_t cRequests; 58 /** Flags given during creation. */ 59 uint32_t fFlags; 58 60 /** Magic value (RTFILEAIOCTX_MAGIC). */ 59 61 uint32_t u32Magic; … … 271 273 } 272 274 273 RTDECL(int) RTFileAioCtxCreate(PRTFILEAIOCTX phAioCtx, uint32_t cAioReqsMax) 275 RTDECL(int) RTFileAioCtxCreate(PRTFILEAIOCTX phAioCtx, uint32_t cAioReqsMax, 276 uint32_t fFlags) 274 277 { 275 278 int rc = VINF_SUCCESS; 276 279 PRTFILEAIOCTXINTERNAL pCtxInt; 277 280 AssertPtrReturn(phAioCtx, VERR_INVALID_POINTER); 281 AssertReturn(!(fFlags & ~RTFILEAIOCTX_FLAGS_VALID_MASK), VERR_INVALID_PARAMETER); 278 282 279 283 pCtxInt = (PRTFILEAIOCTXINTERNAL)RTMemAllocZ(sizeof(RTFILEAIOCTXINTERNAL)); … … 285 289 if (RT_LIKELY(pCtxInt->iPort > 0)) 286 290 { 287 pCtxInt->u32Magic = RTFILEAIOCTX_MAGIC; 291 pCtxInt->fFlags = fFlags; 292 pCtxInt->u32Magic = RTFILEAIOCTX_MAGIC; 288 293 *phAioCtx = (RTFILEAIOCTX)pCtxInt; 289 294 } … … 449 454 AssertReturn(cReqs >= cMinReqs, VERR_OUT_OF_RANGE); 450 455 451 if (RT_UNLIKELY(ASMAtomicReadS32(&pCtxInt->cRequests) == 0)) 456 if ( RT_UNLIKELY(ASMAtomicReadS32(&pCtxInt->cRequests) == 0) 457 && !(pCtxInt->fFlags & RTFILEAIOCTX_FLAGS_WAIT_WITHOUT_PENDING_REQUESTS)) 452 458 return VERR_FILE_AIO_NO_REQUEST; 453 459
Note:
See TracChangeset
for help on using the changeset viewer.