VirtualBox

Changeset 23411 in vbox for trunk/src


Ignore:
Timestamp:
Sep 29, 2009 3:05:08 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52970
Message:

Runtime/Aio-posix: stricter checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/fileaio-posix.cpp

    r23406 r23411  
    661661
    662662                    rcPosix = aio_error(&pReqInt->AioCB);
    663                     Assert(rcPosix != 0);
    664 
    665                     if (rcPosix != EINPROGRESS)
     663
     664                    if ((rcPosix != EINPROGRESS) && (rcPosix != 0))
    666665                    {
    667666                        cReqsSubmit--;
     
    841840           && RT_SUCCESS_NP(rc))
    842841    {
     842#ifdef RT_STRICT
     843        if (RT_UNLIKELY(!pCtxInt->iFirstFree))
     844        {
     845            for (unsigned i = 0; i < pCtxInt->cReqsWaitMax; i++)
     846                AssertMsg2("wait[%d] = %#p\n", i, pCtxInt->apReqs[i]);
     847
     848            AssertMsgFailed(("No request to wait for. pReqsWaitHead=%#p pReqsWaitTail=%#p\n",
     849                            pCtxInt->pReqsWaitHead, pCtxInt->pReqsWaitTail));
     850        }
     851#endif
     852
    843853        ASMAtomicXchgBool(&pCtxInt->fWaiting, true);
    844854        int rcPosix = aio_suspend((const struct aiocb * const *)pCtxInt->apReqs,
     
    914924                            pCtxInt->apReqs[pReq->iWaitingList] = pCtxInt->apReqs[--pCtxInt->iFirstFree];
    915925                            pCtxInt->apReqs[pReq->iWaitingList]->iWaitingList = pReq->iWaitingList;
    916                             pCtxInt->apReqs[pCtxInt->iFirstFree] = NULL;
    917926                        }
    918927                        else
    919928                            pCtxInt->iFirstFree--;
     929
     930                        pCtxInt->apReqs[pCtxInt->iFirstFree] = NULL;
    920931                    }
    921932
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette