|
| << Previous | Next >> |
INT8U OSTaskSuspend (INT8U prio);
Description
- Suspends a task. The task can be the calling task if the priority passed to
OSTaskSuspend()is the priority of the calling task orOS_PRIO_SELF. This function should be used with great care. If a task is suspended that is waiting for an event (i.e., a message, a semaphore, a queue ...) the task will be prevented from running when the event arrives.Parameters
- prio
- The priority of the task to suspend.
Return value
- OS_NO_ERR
- The requested task is suspended.
- OS_TASK_SUS_IDLE
- Attempting to suspend the idle task (not allowed).
- OS_PRIO_INVALID
- The priority specified is higher than the maximum allowed (i.e., ≥
OS_LOWEST_PRIO) orOS_PRIO_SELFis not specified.
- OS_TASK_SUS_PRIO
- The task to suspend does not exist.
Library
- OS_TASK.C
See also
- OSTaskResume
| 020-0059 Rev. D | << Previous | Next >> | µC/OS-II |