ham_detach()

Detach an entity from the HAM

Synopsis:

#include <ha/ham.h>

int ham_detach( ham_entity_t *ehdl,
                unsigned flags );

Arguments:

ehdl
The HAM entity handle to detach.
flags
Currently not used.

Library:

libham

Description:

This function detaches an attached entity from the HAM. The entity being detached must not be a self-attached entity.

The handle passed into this function (ehdl) is either returned by a previous ham_attach() call or obtained from ham_entity_handle().

There are no flags defined at this time.

This function automatically calls ham_connect() and ham_disconnect() for the client.

The ham_detach() call automatically raises a CONDDETACH condition in the HAM for that entity.

Returns:

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

Errors:

EBADF
Couldn't connect to the HAM.
EINVAL
The handle passed as an argument is invalid.
ENOENT
There's no entity corresponding to the handle supplied.

In addition to the above errors, the HAM returns any error it encounters while servicing the request to remove the entity from its context.

Classification:

QNX Neutrino

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