/ docs / man / man3 / rtapi_init.3rtapi
rtapi_init.3rtapi
 1  .TH rtapi_init "3rtapi" "2006-10-12" "LinuxCNC Documentation" "RTAPI"
 2  .SH NAME
 3  
 4  rtapi_init \- Sets up RTAPI
 5  
 6  .SH SYNTAX
 7  .HP
 8   int rtapi_init(const char *\fImodname\fR)
 9  
10  .SH ARGUMENTS
11  .IP \fImodname\fR
12  The name of this rtapi module
13  
14  .SH DESCRIPTION
15  
16  \fBrtapi_init\fR sets up the RTAPI.  It must be called by any
17  module that intends to use the API, before any other RTAPI
18  calls.
19  
20  \fImodname\fR can optionally point to a string that identifies
21  the module.  The string will be truncated at \fBRTAPI_NAME_LEN\fR
22  characters.  If \fImodname\fR is \fBNULL\fR, the system will assign a
23  name.
24  
25  .SH REALTIME CONSIDERATIONS
26  Call only from within user or init/cleanup code, not from relatime tasks.
27  
28  .SH RETURN VALUE
29  On success, returns a positive integer module ID, which is
30  used for subsequent calls to rtapi_xxx_new, rtapi_xxx_delete,
31  and rtapi_exit.  On failure, returns an RTAPI error code.