rtapi_task_pause(3rtapi)

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_pause causes a task to stop execution and change to the "paused" state. The task can be free-running or periodic. Note that rtapi_task_pause may 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 either rtapi_task_resume or rtapi_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).

  1. 12–13

From linuxcnc-uspace-dev 1:2.9.4-2+deb13u1 in Debian 13 (Trixie). Parsed by carta from the page's man source.