LinuxCNC Documentation

СИНТАКСИС

#include <hal.h>

int hal_exit(int comp_id);

АРГУМЕНТИ

comp_id

Ідентифікатор компонента HAL, повернутий попереднім викликом hal_init.

ОПИС

The function hal_exit() shuts down and cleans up HAL and RTAPI. It must be called prior to exit by any module that called hal_init(3).

Each hal_init(3) call must be matched with a hal_exit() call. Failing to do so will leak resources in HAL memory and may hamper proper shutdown. Usually you’d call hal_exit() in rtapi_app_exit(3).

МІРКУВАННЯ В РЕАЛЬНОМУ ЧАСІ

Викликати лише з коду не реального часу або коду ініціалізації/очищення, а не із завдань реального часу.

ПОВЕРНЕНЕ ЗНАЧЕННЯ

Returns zero (0) on success or a HAL status code:

-EFAULT

The shared memory was not mapped.

-ENOENT

The component does not exist.

ДИВІТЬСЯ ТАКОЖ