Add a notify pulse action to a an action,
which executes if the corresponding action fails
Synopsis:
#include <ha/ham.h>
int ham_action_fail_notify_pulse(
ham_action_t *ahdl,
const char *aname,
int nd,
pid_t topid,
int chid,
int pulsecode,
int value,
unsigned flags);
int ham_action_fail_notify_pulse_node(
ham_action_t *ahdl,
const char *aname,
const char *nodename,
pid_t topid,
int chid,
int pulsecode,
int value,
unsigned flags);
Arguments:
- ahdl
- The targeted HAM action handle to which the action fail item is added.
- aname
- The action fail item to add.
- nd
- (ham_action_fail_notify_pulse() only) The node identifier of the recipient
node.
- nodename
- (ham_action_fail_notify_pulse_node() only) The recipient remote HAM.
- topid
- The process ID of the targeted process.
- chid
- The channel ID on which topid is located.
- pulsecode
- The code of the pulse to deliver.
- value
- The value of the pulse to deliver.
- flags
- Currently not used.
Description:
The ham_action_fail_notify_pulse*() functions add an action fail
item (aname) to the
specified action. The action will deliver a pulse specified by
pulsecode to the specified nd/pid/chid
or the nodename/pid/chid with
value given by value. The nd specified to
ham_action_notify_pulse() is the node identifier of the
recipient node. This nd must be valid at the time the call is made.
The handle (ahdl) is obtained either:
- from one of the ham_action*() functions to add actions
or:
- by calling any of the ham_action_handle() functions
to request a handle to a specific action.
The action is executed when the corresponding action that it
is associated with, fails.
Currently, there are no flags defined.
Returns:
- 0
- Success.
- -1
- An error occurred (errno is set).
Errors:
- EBADF
- Couldn't connect to the HAM.
- EEXIST
- The aname name already exists
for the specified ahdl action.
- EINVAL
-
The name given in aname 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:
The combined name length of an entity, condition,
or action is also limited by _POSIX_PATH_MAX.
- ENOENT
-
There's no entity or condition specified by
the given handle (ahdl).
- 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 Neutrino
Safety: |
|
Cancellation point |
No |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |