BOOL osSuspendTask( HANDLE Handle );
A handle to the task to be suspended.
Returns TRUE on success or FALSE on failure. Use the osGetLastError function to obtain extended error information.
This function suspends the execution of the specified task.
The function can be invoked before system startup, from within an interrupt service routine, or by a running task. If a task suspends itself, or if the currently executing task is suspended from an interrupt, the scheduler will immediately switch execution to the ready-to-run task with the highest priority. This function is particularly designed for a task to suspend its own execution until it is later resumed by an interrupt, providing a high-performance mechanism for interrupt-to-task communication. Note that this function will fail if it is called on a task that is already in a waiting state.
This function is available only when the OS_SUSP_RES_TASK_FUNC constant is set to 1. If this functionality is not required, it can be disabled to reduce the memory footprint of the output code.
| Version: | 1.0 |
|---|---|
| Header file: | OS_Task.h (include OS_API.h) |
| See also: | BOOL, FALSE, HANDLE, OS_SUSP_RES_TASK_FUNC, OS_RESUME_IMMEDIATELY, osGetLastError, osSuspendTask, tasks, task suspending and resuming, TRUE |