Download Chapter 4 – Queues

Transcript
Chapter 1111- Signals
NU_Send_Signals
STATUS NU_Send_Signals(NU_TASK *task, UNSIGNED signals)
This service sends the signals indicated by the parameter signals to the task pointed to
by the parameter task. If the receiving task has any of the designated signals enabled, its
registered signal handler is executed as soon as the receiving task’s priority permits. Each
task has 32 available signals that are represented by each bit in signals.
There are several conditions that prevent the receiving task’s signal handler from being
executed, as follows:
! Receiving task is in a finished or terminated state.
! Receiving task is unconditionally suspended (either it was not started after creation
or it was suspended by NU_Suspend_Task). If this is the case, the signal handler
does not execute until the task is resumed.
! There is always a task ready at a higher priority than the receiving task.
! The receiving task has not enabled the signals sent.
! The receiving task has not registered a signal handler.
Overview
Option
Tasking Changes
Allowed From
Category
Yes
Application_Initialize, HISR, Signal Handler, Task
Task Synchronization Services
Parameters
Parameter
task
signals
Meaning
Pointer to the user-supplied task control block.
Bit pattern representing signals to be sent.
Return Value
Status
NU_SUCCESS
NU_INVALID_TASK
Meaning
Indicates successful completion of the service.
Indicates the task pointer is invalid.
191