LinuxCNC Documentation

SYNOPSIS

#include <hal.h>

int hal_exit(int comp_id);

ARGUMENTE

comp_id

Eine HAL-Komponenten-Kennung, die durch einen früheren Aufruf von hal_init zurückgegeben wurde.

BESCHREIBUNG

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).

REALTIME CONSIDERATIONS

Aufruf nur aus dem Nicht-Echtzeit- oder Init/Cleanup-Code, nicht aus Echtzeit-Tasks.

RETURN VALUE

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

-EFAULT

The shared memory was not mapped.

-ENOENT

The component does not exist.

SIEHE AUCH