PxMcResolveDefault()

Resolve a memory class default.

APPLIES TO

1.0.0

SYNOPSIS
PxMc_t PxMcResolveDefault (PxMc_t mcid);
ARGUMENTS
mcid

Memory class to resolve

RETURN VALUES
  • Resolved memory class

ERROR CODES

PXERR_MC_ILLMC

mcid is not a valid memory class.

DESCRIPTION

PxMcResolveDefault resolves a memory class default. More precisely, it returns mcid, if mcid is not PXMcSystemdefault or PXMcTaskdefault; otherwise it returns the memory class id corresponding to the specified default.

IMPLEMENTATION GUIDELINES
Before call
  • mcid must be:

    • a valid PXROS-HR memory class created with a PxMcRequest call (V). The validity of mcid may also be checked by the PxMcIsValid macro (F).

    • the symbolic value PXMcSystemdefault specifying the system memory class (V)

    • the symbolic value PXMcTaskdefault specifying the task’s memory class (V)

After call
  • The returned value is the id of type PxMc_t. This id may be checked with one of the following macros:

    • PxmcidIsValid() must be true.

    • PxmcidGet() must not be _PXIllegalObjId.

    • PxmcidError() must be PXERR_NOERROR otherwise the returned error code has to be interpreted (C).

Best Practice
  • No restrictions.

SEE ALSO
USAGE
#include "pxdef.h"

PxMc_t RetMc = PxMcResolveDefault(mcid)

if ((PxmcidError(RetMc) != PXERR_NOERROR) || (PxmcidGet(RetMc) != PxmcidGet(Mc))) {
    // Report error;
}