[][src]Function linuxcnc_hal_sys::rtapi_init

pub unsafe extern "C" fn rtapi_init(modname: *const c_char) -> c_int

'rtapi_init() sets up the RTAPI. It must be called by any module that intends to use the API, before any other RTAPI calls. 'modname' can optionally point to a string that identifies the module. The string will be truncated at RTAPI_NAME_LEN characters. If 'modname' is NULL, the system will assign a name. On success, returns a positive integer module ID, which is used for subsequent calls to rtapi_xxx_new, rtapi_xxx_delete, and rtapi_exit. On failure, returns an error code as defined above. Call only from within user or init/cleanup code, not from realtime tasks.