ham_action_handle_free()

Updated: May 06, 2022

Free a previously obtained handle to an action in a condition in an entity

Synopsis:

#include <ha/ham.h>

int ham_action_handle_free(ham_action_t *ahdl);

Arguments:

ahdl
The HAM action handle to free.

Library:

libham

Description:

The ham_action_handle_free() function frees a handle (ahdl) associated with a given action in a condition in an entity. The function reclaims all storage associated with the handle.

The handle you pass as an argument (ahdl) must be obtained from ham_action_execute(), ham_action_restart(), ham_action_notify_pulse(), ham_action_notify_signal(), or ham_action_waitfor().

Once a handle is freed, it is no longer available to refer to any action. The ham_action_handle_free() call frees storage allocated for the handle, but does not remove the action itself, which is in the HAM.

Returns:

0
Success.
-1
An error occurred (errno is set).

Errors:

EINVAL
The handle isn't valid.

Classification:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

Caveats:

The ham_action_handle_free() function frees storage related only to the handle in the client — it doesn't remove the corresponding action.