PxTaskSignalEvents()
Signal events to a task (task service).
- APPLIES TO
-
8.2.0
- SYNOPSIS
-
PxError_t PxTaskSignalEvents (PxTask_t TaskId, PxEvents_t events); - ARGUMENTS
|
|
|
- RETURN VALUES
-
-
PXROS error code
-
- ERROR CODES
-
PXERR_TASK_ILLTASKTaskIdis not a valid task objectPXERR_OPOOL_ILLOPOOLThe object pool is not valid
PXERR_OBJ_NOOBJNo free objects available to send the request
PXERR_GLOBAL_ILLEGAL_COREThe requested object pool is not on the same core
PXERR_OBJ_ILLOBJThe passed object handle is not valid
PXERR_ILLEGAL_ACCESSAccess through parameter pointer in size is illegal
PXERR_INTERNAL_INCONSISTENCYAllocated object not convertible
- DESCRIPTION
-
PxTaskSignalEventssignals the events specified ineventstoTaskId. There they are saved until handled by task.If
TaskIdwaits for any of the events (with aPxAwaitEventscall or a call with the_EvWaitsuffix), the task is readied and the service returns. If some of the task’s aborting events occur (seePxExpectAbort) and task’s abort mechanism is enabled, thePxExpectAbortcall returns prematurely. If the events are signaled to a task on an other core, PXROS will allocate an object for intercore communication to send this request to the other core for execution.PxTaskSignalEventscan only be called from a task (not handler).
- 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 function returns
PXERR_NOERRORif the event could be signaled to the task. Any other return value describes an error, which has to be interpreted. (C)
-
- Best Practice
-
-
This function may be called from tasks only. (V)
-
- SEE ALSO
- USAGE
-
#include "pxdef.h" #define MY_EVENT 0x1l PxError_t Err = PxTaskSignalEvents(TaskId, MY_EVENT); if (Err != PXERR_NOERROR) { // Report error }