rtapi_task_pause3rtapi
Pause and resume real-time tasks
Usage
void rtapi_task_pause(int task_id)
void rtapi_task_resume(int task_id)
Arguments
- task_id
-
An RTAPI task identifier returned by an earlier call to
rtapi_task_new.
Overview
rtapi_task_resume starts a task in free-running mode. The task must be in the "paused" state.
A free running task runs continuously until either:
- 1)
-
It is prempted by a higher priority task. It will resume as soon as the higher priority task releases the CPU.
- 2)
-
It calls a blocking function, like
rtapi_sem_take. It will resume when the function unblocks.
- 3)
-
It is returned to the "paused" state by
rtapi_task_pause. May be called from init/cleanup code, and from within realtime tasks.rtapi_task_pausecauses a task to stop execution and change to the "paused" state. The task can be free-running or periodic. Note thatrtapi_task_pausemay called from any task, or from init or cleanup code, not just from the task that is to be paused. The task will resume execution when eitherrtapi_task_resumeorrtapi_task_start(depending on whether this is a free-running or periodic task) is called.
Realtime considerations
May be called from init/cleanup code, and from within realtime tasks.
Return value
An RTAPI status code.
Releases
Unchanged in 2 releases since Debian 12 (Bookworm).