Lines Matching refs:pCtxInt
211 PRTFILEAIOCTXINTERNAL pCtxInt;
332 pReqInt->pCtxInt = NULL;
394 pReqInt->pCtxInt = NULL;
452 AssertMsg(VALID_PTR(pReqInt->pCtxInt),
455 ASMAtomicDecS32(&pReqInt->pCtxInt->cRequests);
485 PRTFILEAIOCTXINTERNAL pCtxInt;
493 pCtxInt = (PRTFILEAIOCTXINTERNAL)RTMemAllocZ(sizeof(RTFILEAIOCTXINTERNAL));
494 if (RT_UNLIKELY(!pCtxInt))
498 int rc = rtFileAsyncIoLinuxCreate(cAioReqsMax, &pCtxInt->AioContext);
501 pCtxInt->fWokenUp = false;
502 pCtxInt->fWaiting = false;
503 pCtxInt->hThreadWait = NIL_RTTHREAD;
504 pCtxInt->cRequestsMax = cAioReqsMax;
505 pCtxInt->fFlags = fFlags;
506 pCtxInt->u32Magic = RTFILEAIOCTX_MAGIC;
507 *phAioCtx = (RTFILEAIOCTX)pCtxInt;
510 RTMemFree(pCtxInt);
521 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
522 RTFILEAIOCTX_VALID_RETURN(pCtxInt);
525 if (RT_UNLIKELY(pCtxInt->cRequests))
529 int rc = rtFileAsyncIoLinuxDestroy(pCtxInt->AioContext);
532 ASMAtomicUoWriteU32(&pCtxInt->u32Magic, RTFILEAIOCTX_MAGIC_DEAD);
533 RTMemFree(pCtxInt);
547 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
548 RTFILEAIOCTX_VALID_RETURN_RC(pCtxInt, 0);
550 return pCtxInt->cRequestsMax;
567 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
568 RTFILEAIOCTX_VALID_RETURN(pCtxInt);
588 pReqInt->pCtxInt = NULL;
593 pReqInt->AioContext = pCtxInt->AioContext;
594 pReqInt->pCtxInt = pCtxInt;
606 rc = rtFileAsyncIoLinuxSubmit(pCtxInt->AioContext, cReqs,
625 pReqInt->pCtxInt = NULL;
646 ASMAtomicAddS32(&pCtxInt->cRequests, cReqsSubmitted);
662 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
663 RTFILEAIOCTX_VALID_RETURN(pCtxInt);
671 if ( RT_UNLIKELY(ASMAtomicUoReadS32(&pCtxInt->cRequests) == 0)
672 && !(pCtxInt->fFlags & RTFILEAIOCTX_FLAGS_WAIT_WITHOUT_PENDING_REQUESTS))
694 Assert(pCtxInt->hThreadWait == NIL_RTTHREAD);
695 ASMAtomicWriteHandle(&pCtxInt->hThreadWait, RTThreadSelf());
703 while (!pCtxInt->fWokenUp)
707 ASMAtomicXchgBool(&pCtxInt->fWaiting, true);
708 rc = rtFileAsyncIoLinuxGetEvents(pCtxInt->AioContext, cMinReqs, cRequestsToWait, &aPortEvents[0], pTimeout);
709 ASMAtomicXchgBool(&pCtxInt->fWaiting, false);
776 ASMAtomicSubS32(&pCtxInt->cRequests, cRequestsCompleted);
777 Assert(pCtxInt->hThreadWait == RTThreadSelf());
778 ASMAtomicWriteHandle(&pCtxInt->hThreadWait, NIL_RTTHREAD);
783 if ( pCtxInt->fWokenUp
786 ASMAtomicXchgBool(&pCtxInt->fWokenUp, false);
796 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
797 RTFILEAIOCTX_VALID_RETURN(pCtxInt);
802 bool fWokenUp = ASMAtomicXchgBool(&pCtxInt->fWokenUp, true);
814 ASMAtomicReadHandle(&pCtxInt->hThreadWait, &hThread);
815 bool fWaiting = ASMAtomicReadBool(&pCtxInt->fWaiting);