POOL_ASSOCIATE(3POOL) | Pool Configuration Manipulation Library Functions | POOL_ASSOCIATE(3POOL) |
cc [ flag... ] file... -lpool [ library... ] #include <pool.h> int pool_associate(pool_conf_t *conf, pool_t *pool, pool_resource_t *resource);
pool_t *pool_create(pool_conf_t *conf, const char *name);
int pool_destroy(pool_conf_t *conf, pool_t *pool);
int pool_dissociate(pool_conf_t *conf, pool_t *pool, pool_resource_t *resource);
const char *pool_info(pool_conf_t *conf, pool_t *pool, int flags);
pool_resource_t **pool_query_pool_resources(pool_conf_t *conf, pool_t *pool, uint_t *nelem, pool_value_t **properties);
The pool_associate() function associates the specified resource with pool. A resource can be associated with multiple pools at the same time. Any resource of this type that was formerly associated with this pool is no longer associated with the pool. The new association replaces the earlier one.
The pool_create() function creates a new pool with the supplied name with its default properties initialized, and associated with the default resource of each type.
The pool_destroy function() destroys the given pool association. Associated resources are not modified.
The pool_dissociate() function removes the association between the given resource and pool. On successful completion, the pool is associated with the default resource of the same type.
The pool_info() function returns a string describing the given pool. The string is allocated with malloc(3C). The caller is responsible for freeing the returned string. If the flags option is non-zero, the string returned also describes the associated resources of the pool.
The pool_query_pool_resources() function returns a null-terminated array of resources currently associated with the pool that match the given list of properties. The return value must be freed by the caller. The nelem argument is set to be the length of the array returned.
Upon successful completion, pool_associate(), pool_destroy(), and pool_dissociate() return 0. Otherwise, they return -1 and pool_error() returns the pool-specific error value.
Upon successful completion, pool_info() returns a string describing the given pool. Otherwise it returns NULL and pool_error() returns the pool-specific error value.
Upon successful completion, pool_query_pool_resources() returns a null-terminated array of resources. Otherwise it returns NULL and pool_error() returns the pool-specific error value.
POE_BADPARAM
POE_SYSTEM
POE_INVALID_CONF
POE_PUTPROP
The pool_destroy() function will fail if:
POE_BADPARAM
The pool_associate() function will fail if:
POE_BADPARAM
POE_SYSTEM
The pool_disassociate() function will fail if:
POE_BADPARAM
POE_INVALID_CONF
POE_SYSTEM
The pool_info() function will fail if:
POE_BADPARAM
POE_INVALID_CONF
POE_SYSTEM
The pool_query_pool_resources() function will fail if:
POE_BADPARAM
POE_INVALID_CONF
POE_SYSTEM
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
CSI | Enabled |
Interface Stability | Unstable |
MT-Level | Safe |
January 15, 2020 |