rtapi_app_main(3rtapi)

rtapi_app_main3rtapi

User-provided function to initialize a component

Usage

#include <rtapi_app.h>
int rtapi_app_main(void) {...}

Arguments

None

Overview

The body of rtapi_app_main, which is provided by the component author, generally consists of a call to rtapi_init or hal_init, followed by other component-specific initialization code.

Return value

Return 0 for success. Return a negative errno value (e.g., -EINVAL) on error. Existing code also returns RTAPI or HAL error values, but using negative errno values gives better diagnostics from insmod.

Realtime considerations

Called automatically by the rtapi infrastructure in an initialization (not realtime) context.

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.