summaryrefslogtreecommitdiff
path: root/docs/man/man3/rtapi_app_main.3rtapi
blob: 45107f122ac1be3f8d4b83d2af8d2faf95e28d60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.TH rtapi_app_main "3rtapi" "2008-05-26" "LinuxCNC Documentation" "HAL"
.SH NAME

rtapi_app_main \- User-provided function to initialize a component

.SH SYNTAX
.HP
#include "rtapi_app.h"
int \fBrtapi_app_main\fR(void) { \fI...\fR }
.SH ARGUMENTS
None

.SH DESCRIPTION
The body of \fBrtapi_app_main\fR, 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.

.SH 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.

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

.SH SEE ALSO
\fBrtapi_app_exit(3rtapi)\fR,
\fBrtapi_init(3rtapi)\fR,
\fBhal_init(3hal)\fR