PxTaskGetMbx()
Get task’s mailbox.
- APPLIES TO
-
1.0.0
- SYNOPSIS
-
PxMbx_t PxTaskGetMbx (PxTask_t TaskId); - ARGUMENTS
|
- RETURN VALUES
-
-
Invalid mailbox handle on failure
-
Mailbox on success
-
- ERROR CODES
-
PXERR_TASK_ILLTASKThe task is not a valid task object
- DESCRIPTION
-
PxTaskGetMbxreturns the private mailbox of the taskTaskId.
- IMPLEMENTATION GUIDELINES
-
- Before call
-
-
The parameter
TaskIdmust be a valid task object id. This id may be-
the calling task’s own id read by calling
PxGetId()(V) -
the return value of a
PxTaskCreate()call (V) -
the result of a
nameserverquery (V) -
part of a message sent by another task (V)
-
-
Additionally the task id may be checked with
PxTaskCheck()(F).
-
- After call
-
-
The returned value is the id of type
PxMbx_t. This id may be checked with one of the following macros:-
PxMbxIdIsValid()must be true. -
PxMbxIdGet()must not be_PXIllegalObjId. -
PxMbxIdError()must bePXERR_NOERRORotherwise the returned error code has to be interpreted (C).
-
or with a call of
PxMbxCheck()(C). -
- Best Practice
-
-
No restrictions.
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" PxMbx_t Mbx = PxTaskGetMbx(TaskId); if (!PxMbxIdIsValid(Mbx)) { // Report error }