Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

void kldrDyldModAddDep ( PKLDRDYLDMOD  pMod,
PKLDRDYLDMOD  pDep 
)

Increment the count of modules depending on this module.

Parameters:
pMod The module.
pDep The module which depends on us.

Definition at line 505 of file kLdrDyldMod.c.

References KLDRDYLDMOD::cDepRefs, KLDRDYLDMOD::cRefs, KLDRDYLDMOD::enmState, KLDRDYLDMOD_ASSERT, KLDRSTATE_END, KLDRSTATE_GOOD, KLDRSTATE_INITIALIZING, KLDRSTATE_INVALID, KLDRSTATE_LOADED_PREREQUISITES, KLDRSTATE_MAPPED, KLDRSTATE_PENDING_INITIALIZATION, KLDRSTATE_RELOADED, and KLDRSTATE_RELOADED_LOADED_PREREQUISITES.

Referenced by kldrDyldGetPrerequisite().

{
    (void)pDep;

    /* validate state */
    switch (pMod->enmState)
    {
        case KLDRSTATE_MAPPED:
        case KLDRSTATE_RELOADED:
        case KLDRSTATE_LOADED_PREREQUISITES:
        case KLDRSTATE_RELOADED_LOADED_PREREQUISITES:
        case KLDRSTATE_PENDING_INITIALIZATION:
        case KLDRSTATE_INITIALIZING:
        case KLDRSTATE_GOOD:
            break;
        default:
            KLDRDYLDMOD_ASSERT(!"invalid state");
            break;

    }
    KLDRDYLDMOD_ASSERT(pMod->enmState > KLDRSTATE_INVALID && pMod->enmState <= KLDRSTATE_END);
    pMod->cRefs++;
    pMod->cDepRefs++;
}


Generated by  Doxygen 1.6.0   Back to index