PxGetGlobalServerMbx()

Get the requested application-specific server mailbox from an other core.

APPLIES TO

8.2.0 , 8.2.1 , 9.0.0 , 9.1.0

SYNOPSIS
PxError_t PxGetGlobalServerMbx (PxCoreId_t ServerCore, PxMbxReq_t mbxreqid);
ARGUMENTS
ServerCore

The coreId to get the mailbox from

mbxreqid

The request service mailbox

ERROR CODES

PXERR_OPOOL_ILLOPOOL

The passed object pool handle is not valid

PXERR_GLOBAL_ILLEGAL_CORE

The requested object pool is not on the same core

PXERR_REQUEST_FAILED

The requested object is not valid

PXERR_NAME_ILL_REQUEST

The mbxreqid is not known

PXERR_INTERNAL_INCONSISTENCY

Allocated object not convertible

PXERR_OBJ_NOOBJ

No free object is available

PXERR_OBJ_ILLOBJ

The passed object handle is not valid

PXERR_ACCESS_RIGHT

The calling task has not the right to access the object pool

DESCRIPTION

PxGetGlobalServerMbx requests a system specific mailbox id for a defined service (mbxreqid) from another core (ServerCore).

This function is not responsible for returning a mailbox object - it only ensures that the requested mailbox is accessible on the core from which it is called, which is also reflected in its return value. If PxMbxRequestMbx() is called before this function, the mailbox will not be found and an error will be returned.

IMPLEMENTATION GUIDELINES
Before call
  • ServerCore must not exceed the number of available cores(V). mbxreqid must be a valid PXROS-HR service mailbox (V).

After call
  • The function returns PXERR_NOERROR if the mailbox could be requested for the service mailbox. Any other return value describes an error, which has to be interpreted (C).

Best Practice
  • Should be called once on each core (except the ServerCore) on which the requested mailbox needs to be accessible.

  • Once called, PxMbxRequestMbx() can be called any number of times on the core, saving the upfront cost of inter-core communication.

SEE ALSO
USAGE
#include "pxdef.h"

// Ensure the desired mailbox is accessible from the current core
if (PxGetGlobalServerMbx(ServerCore, mbxreqid) != PXERR_NOERROR) {
    // Handle error
}

PxMbx_t mbx = PxMbxRequestMbx(mbxreqid); // the mailbox can now be requested