hal_init.3hal
1 .TH hal_init "3hal" "2006-10-12" "LinuxCNC Documentation" "HAL" 2 .SH NAME 3 4 hal_init \- Sets up HAL and RTAPI 5 6 .SH SYNTAX 7 .HP 8 int hal_init(const char *\fImodname\fR) 9 10 .SH ARGUMENTS 11 .IP \fImodname\fR 12 The name of this hal module 13 14 .SH DESCRIPTION 15 16 \fBhal_init\fR sets up HAL and 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 must point to a string that identifies the module. 21 The string may be no longer than \fBHAL_NAME_LEN\fR characters. 22 23 .SH REALTIME CONSIDERATIONS 24 Call only from within user or init/cleanup code, not from relatime tasks. 25 26 .SH RETURN VALUE 27 On success, returns a positive integer module ID, which is 28 used for subsequent calls to hal and rtapi APIs. 29 On failure, returns a HAL error code.