hal_add_funct_to_thread(3hal)

hal_add_funct_to_thread3hal

Cause a function to be executed at regular intervals

Usage

int hal_add_funct_to_thread(const char *funct_name, const char *thread_name, int position)

int hal_del_funct_from_thread(const char *funct_name, const char *thread_name)

Arguments

funct_name

The name of the function.

thread_name

The name of the thread.

position

The desired location within the thread. This determines when the function will run, in relation to other functions in the thread. A positive number indicates the desired location as measured from the beginning of the thread, and a negative is measured from the end. So +1 means this function will become the first one to run, +5 means it will be the fifth one to run, -2 means it will be next to last, and -1 means it will be last. Zero is illegal.

Overview

hal_add_funct_to_thread adds a function exported by a realtime HAL component to a realtime thread. This determines how often and in what order functions are executed.

hal_del_funct_from_thread removes a function from a thread.

Return value

Returns a HAL status code.

Realtime considerations

Call only from realtime init code, not from other realtime or non-realtime code.

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

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