Lines Matching refs:pCtxInt
92 PRTFILEAIOCTXINTERNAL pCtxInt;
154 pReqInt->pCtxInt = NULL;
210 pReqInt->pCtxInt = NULL;
273 AssertMsg(VALID_PTR(pReqInt->pCtxInt),
276 ASMAtomicDecS32(&pReqInt->pCtxInt->cRequests);
308 PRTFILEAIOCTXINTERNAL pCtxInt;
312 pCtxInt = (PRTFILEAIOCTXINTERNAL)RTMemAllocZ(sizeof(RTFILEAIOCTXINTERNAL));
313 if (RT_UNLIKELY(!pCtxInt))
317 pCtxInt->iKQueue = kqueue();
318 if (RT_LIKELY(pCtxInt->iKQueue > 0))
320 pCtxInt->fFlags = fFlags;
321 pCtxInt->u32Magic = RTFILEAIOCTX_MAGIC;
322 *phAioCtx = (RTFILEAIOCTX)pCtxInt;
326 RTMemFree(pCtxInt);
338 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
339 RTFILEAIOCTX_VALID_RETURN(pCtxInt);
342 if (RT_UNLIKELY(pCtxInt->cRequests))
345 close(pCtxInt->iKQueue);
346 ASMAtomicUoWriteU32(&pCtxInt->u32Magic, RTFILEAIOCTX_MAGIC_DEAD);
347 RTMemFree(pCtxInt);
368 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
369 RTFILEAIOCTX_VALID_RETURN(pCtxInt);
391 pReqInt->pCtxInt = NULL;
398 pReqInt->AioCB.aio_sigevent.sigev_notify_kqueue = pCtxInt->iKQueue;
399 pReqInt->pCtxInt = pCtxInt;
429 pReqInt->pCtxInt = NULL;
436 pReqInt->pCtxInt = NULL;
443 ASMAtomicAddS32(&pCtxInt->cRequests, cReqsSubmit);
467 pReqInt->pCtxInt = NULL;
479 ASMAtomicIncS32(&pCtxInt->cRequests);
500 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
501 RTFILEAIOCTX_VALID_RETURN(pCtxInt);
506 if ( RT_UNLIKELY(ASMAtomicReadS32(&pCtxInt->cRequests) == 0)
507 && !(pCtxInt->fFlags & RTFILEAIOCTX_FLAGS_WAIT_WITHOUT_PENDING_REQUESTS))
529 Assert(pCtxInt->hThreadWait == NIL_RTTHREAD);
530 ASMAtomicWriteHandle(&pCtxInt->hThreadWait, RTThreadSelf());
540 ASMAtomicXchgBool(&pCtxInt->fWaiting, true);
541 rcBSD = kevent(pCtxInt->iKQueue, NULL, 0, aKEvents, cRequestsToWait, pTimeout);
542 ASMAtomicXchgBool(&pCtxInt->fWaiting, false);
612 ASMAtomicSubS32(&pCtxInt->cRequests, cRequestsCompleted);
613 Assert(pCtxInt->hThreadWait == RTThreadSelf());
614 ASMAtomicWriteHandle(&pCtxInt->hThreadWait, NIL_RTTHREAD);
619 if ( pCtxInt->fWokenUp
622 ASMAtomicXchgBool(&pCtxInt->fWokenUp, false);
631 PRTFILEAIOCTXINTERNAL pCtxInt = hAioCtx;
632 RTFILEAIOCTX_VALID_RETURN(pCtxInt);
637 bool fWokenUp = ASMAtomicXchgBool(&pCtxInt->fWokenUp, true);
649 ASMAtomicReadHandle(&pCtxInt->hThreadWait, &hThread);
650 bool fWaiting = ASMAtomicReadBool(&pCtxInt->fWaiting);