[][src]Function linuxcnc_hal_sys::hal_add_funct_to_thread

pub unsafe extern "C" fn hal_add_funct_to_thread(
    funct_name: *const c_char,
    thread_name: *const c_char,
    position: c_int
) -> c_int

hal_add_funct_to_thread() adds a function exported by a realtime HAL component to a realtime thread. This determines how often and in what order functions are executed. 'funct_name' is the name of the function, as specified in a call to hal_export_funct(). 'thread_name' is the name of the thread to which the function should be added. When the thread runs, the functions will be executed in the order in which they were added to the thread. 'position' is the desired location within the thread. This determines when the function will run, in relation to other functions in the thread. A positive number indicates the desired location as measured from the beginning of the thread, and a negative is measured from the end. So +1 means this function will become the first one to run, +5 means it will be the fifth one to run, -2 means it will be next to last, and -1 means it will be last. Zero is illegal. Returns 0, or a negative error code. Call only from within user space or init code, not from realtime code.