ham_detach_name(), ham_detach_name_node()
Detach an entity from the HAM, using an entity name
Synopsis:
#include <ha/ham.h>
int ham_detach_name( int nd,
const char *ename,
unsigned flags);
int ham_detach_name_node( const char *nodename,
const char *ename,
unsigned flags);
Arguments:
- nd
- (ham_detach_name() only) The node identifier of the remote node on which the entity being targeted is running.
- nodename
- (ham_detach_name_node() only) The remote HAM on which the entity being targeted is running.
- ename
- The name of the entity to detach.
- flags
- Currently not used.
Library:
libham
Description:
These functions detach an attached entity (ename) from a HAM. The entity being detached must NOT be a self-attached entity.
The nd specifies the node identifier of the remote node on which the entity being targeted is running, at the time the call is made.
Note:
Since node identifiers are transient objects, you should obtain the
value for nd immediately before the call, using
netmgr_strtond()
or another function that converts nodenames into node identifiers.
The ham_detach_name_node() function is used when a nodename is used to specify a remote HAM instead of a node identifier (nd).
There are no flags defined at this time.
This function automatically calls ham_connect() and ham_disconnect() for the client.
Returns:
- 0
- Success.
- -1
- An error occurred (errno is set).
Errors:
- EBADF
- Error connecting to the HAM.
- EINVAL
- The name passed as an argument is invalid.
- ENOENT
- There's no entity corresponding to the name 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:
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |
Page updated:
