Pool Configuration Manipulation Library Functions
poolassociate(3POL)
NAME
poolassociate, poolcreate, pooldestroy, pooldissociate,
poolinfo, poolquerypoolresources - resource pool manipu-
lation functions
SYNOPSIS
cc [ flag... ] file... -lpool [ library... ]
#include
int poolassociate(poolconft *conf, poolt *pool,
poolresourcet *resource);
poolt *poolcreate(poolconft *conf, const char *name);
int pooldestroy(poolconft *conf, poolt *pool);
int pooldissociate(poolconft *conf, poolt *pool,
poolresourcet *resource);
const char *poolinfo(poolconft *conf, poolt *pool,
int flags);
poolresourcet **poolquerypoolresources(poolconft *conf,
poolt *pool, uintt *nelem, poolvaluet **properties);
DESCRIPTION
These functions provide mechanisms for constructing and
modifying pools entries within a target pools configuration.
The conf argument for each function refers to the target
configuration to which the operation applies.
The poolassociate() function associates the specified
resource with pool. A resource can be associated with multi-
ple pools at the same time. Any resource of this type that
was formerly associated with this pool is no longer associ-
ated with the pool. The new association replaces the earlier
one.
The poolcreate() function creates a new pool with the sup-
plied name with its default properties initialized, and
associated with the default resource of each type.
SunOS 5.11 Last change: 18 Jul 2005 1
Pool Configuration Manipulation Library Functions
poolassociate(3POL)
The pooldestroy function() destroys the given pool associa-
tion. Associated resources are not modified.
The pooldissociate() function removes the association
between the given resource and pool. On successful comple-
tion, the pool is associated with the default resource of
the same type.
The poolinfo() function returns a string describing the
given pool. The string is allocated with malloc(3C). The
caller is reponsible for freeing the returned string. If the
flags option is non-zero, the string returned also describes
the associated resources of the pool.
The poolquerypoolresources() 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.
RETURN VALUES
Upon successful completion, poolcreate() returns a new ini-
tialized pool. Otherwise it returns NUL and
poolerror(3POL) returns the pool-specific error value.
Upon successful completion, poolassociate(),
pooldestroy(), and pooldissociate() return 0. Otherwise,
they return -1 and poolerror() returns the pool-specific
error value.
Upon successful completion, poolinfo() returns a string
describing the given pool. Otherwise it returns NUL and
poolerror() returns the pool-specific error value.
Upon successful completion, poolquerypoolresources()
returns a null-terminated array of resources. Otherwise it
returns NUL and poolerror() returns the pool-specific
error value.
ERORS
The poolcreate() function will fail if:
POEBADPARAM The supplied configuration's status is
not POFVALID or name is already in use.
SunOS 5.11 Last change: 18 Jul 2005 2
Pool Configuration Manipulation Library Functions
poolassociate(3POL)
POESYSTEM A system error has occurred. Check the
system error code for more details.
POEINVALIDCONF The pool element could not be created
because the configuration would be
invalid.
POEPUTPROP One of the supplied properties could not
be set.
The pooldestroy() function will fail if:
POEBADPARAM The supplied configuration's status is not
POFVALID.
The poolassociate() function will fail if:
POEBADPARAM The supplied configuration's status is not
POFVALID or the parameters are supplied
from a different configuration.
POESYSTEM A system error has occurred. Check the sys-
tem error code for more details.
The pooldisassociate() function will fail if:
POEBADPARAM The supplied configuration's status is
not POFVALID or the parameters are sup-
plied from a different configuration.
POEINVALIDCONF No resources could be located for the
supplied configuration or the supplied
configuration is not valid (for example,
more than one default for a resource
type was found.)
POESYSTEM A system error has occurred. Check the
system error code for more details.
SunOS 5.11 Last change: 18 Jul 2005 3
Pool Configuration Manipulation Library Functions
poolassociate(3POL)
The poolinfo() function will fail if:
POEBADPARAM The supplied configuration's status is
not POFVALID or the flags paramter is
neither 0 or 1.
POEINVALIDCONF The configuration is invalid.
POESYSTEM A system error has occurred. Check the
system error code for more details.
The poolquerypoolresources() function will fail if:
POEBADPARAM The supplied configuration's status is
not POFVALID.
POEINVALIDCONF The configuration is invalid.
POESYSTEM A system error has occurred. Check the
system error code for more details.
USAGE
Pool names are unique across pools in a given configuration
file. It is an error to attempt to create a pool with a name
that is currently used by another pool within the same con-
figuration.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 18 Jul 2005 4
Pool Configuration Manipulation Library Functions
poolassociate(3POL)
ATRIBUTE TYPE ATRIBUTE VALUE
CSI Enabled
Interface Stability Unstable
MT-Level Safe
SEE ALSO
libpool(3LIB), poolerror(3POL), attributes(5)
SunOS 5.11 Last change: 18 Jul 2005 5
Pool Configuration Manipulation Library Functions
poolassociate(3POL)
SunOS 5.11 Last change: 18 Jul 2005 6
|