ham_entity()

QNX SDP8.0High Availability Framework Developer's GuideDeveloper

Create entity placeholder objects in a HAM

Synopsis:

#include <ha/ham.h>

ham_entity_t *ham_entity( const char *ename, 
                          int reserved, 
                          unsigned flags);

Arguments:

ename
The name of the entity for which you want to create placeholders.
reserved
Set this argument to 0.
flags
Currently not used.

Library:

libham

Description:

This function is used to create placeholders for entity objects in a HAM.

You can use this function to create entities, and associate conditions and actions with them, before the process associated with an entity is started (or attached). Subsequent ham_attach() calls by entities can attach to these placeholder entities and thereby enable conditions and actions when they occur.

Returns:

An entity handle, or NULL if an error occurred (errno is set).

Errors:

EBADF
Couldn't connect to the HAM.
EINVAL
The name given in ename is invalid (e.g., it contains the / character) or is NULL.
ENAMETOOLONG
The name given (in aname) is too long, i.e., it exceeds _POSIX_PATH_MAX (defined in <limits.h>). Note that the combined length of an entity/condition/action name is also limited by _POSIX_PATH_MAX.
ENOMEM
Not enough memory to create a new handle.

In addition to the above errors, the HAM returns any error it encounters while servicing this request.

Classification:

QNX OS

Safety:
Cancellation pointNo
Signal handlerNo
ThreadYes
Page updated: