<< 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
) or,OS_PRIO_SELF
is not specified.
- OS_TASK_SUS_PRIO
- The task to suspend does not exist.
Library
- UCOS2.LIB
See also
- OSTaskResume
Dynamic C Functions | << Previous | Next >> | rabbit.com |