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

int kLdrModCanExecuteOn ( PKLDRMOD  pMod,
const void *  pvBits,
KCPUARCH  enmArch,
KCPU  enmCpu 
)

Checks if this module can be executed by the specified arch+cpu.

Returns:
0 if it can, KCPU_ERR_ARCH_CPU_NOT_COMPATIBLE if it can't. Other failures may occur and cause other return values.
Parameters:
pMod The module.
pvBits Optional pointer to bits returned by kLdrModGetBits(). This can be used by some module interpreters to reduce memory consumption.

Definition at line 348 of file kLdrMod.c.

References KLDRMOD::enmArch, KLDRMOD::enmCpu, KLDRMOD_VALIDATE, KLDRMODOPS::pfnCanExecuteOn, and KLDRMOD::pOps.

{
    KLDRMOD_VALIDATE(pMod);
    if (pMod->pOps->pfnCanExecuteOn)
        return pMod->pOps->pfnCanExecuteOn(pMod, pvBits, enmArch, enmCpu);
    return kCpuCompare(pMod->enmArch, pMod->enmCpu, enmArch, enmCpu);
}


Generated by  Doxygen 1.6.0   Back to index