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
|
|
|
- ERROR CODES
-
PXERR_OPOOL_ILLOPOOLThe passed object pool handle is not valid
PXERR_GLOBAL_ILLEGAL_COREThe requested object pool is not on the same core
PXERR_REQUEST_FAILEDThe requested object is not valid
PXERR_NAME_ILL_REQUESTThe
mbxreqidis not knownPXERR_INTERNAL_INCONSISTENCYAllocated object not convertible
PXERR_OBJ_NOOBJNo free object is available
PXERR_OBJ_ILLOBJThe passed object handle is not valid
PXERR_ACCESS_RIGHTThe calling task has not the right to access the object pool
- DESCRIPTION
-
PxGetGlobalServerMbxrequests 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
-
-
ServerCoremust not exceed the number of available cores(V).mbxreqidmust be a valid PXROS-HR service mailbox (V).
-
- After call
-
-
The function returns
PXERR_NOERRORif 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