Pool Configuration Manipulation Library Functions
pooldynamiclocation(3POL)
NAME
pooldynamiclocation, poolstaticlocation, poolversion,
poolgetstatus, poolsetstatus, poolresourcetypelist -
resource pool framework functions
SYNOPSIS
cc [ flag... ] file... -lpool [ library... ]
#include
const char *pooldynamiclocation(void);
const char *poolstaticlocation(void);
uintt poolversion(uintt ver);
int poolgetstatus(int *state);
int poolsetstatus(int state);
int poolresourcetypelist(const char **reslist,
uintt *numres);
DESCRIPTION
The pooldynamiclocation() function returns the location
used by the pools framework to store the dynamic configura-
tion.
The poolstaticlocation() function returns the location
used by the pools framework to store the default configura-
tion used for pools framework instantiation.
The poolversion() function can be used to inquire about the
version number of the library by specifying POLVERNONE.
The current (most capable) version is POLVERCURENT. The
user can set the version used by the library by specifying
the required version number. If this is not possible, the
version returned will be POLVERNONE.
The poolgetstatus() function retrieves the current state
of the pools facility. If state is non-null, then on suc-
cessful completion the state of the pools facility is stored
in the location pointed to by state.
SunOS 5.11 Last change: 23 Sep 2003 1
Pool Configuration Manipulation Library Functions
pooldynamiclocation(3POL)
The poolsetstatus() function modifies the current state of
the pools facility. On successful completion the state of
the pools facility is changed to match the value supplied in
state. Only two values are valid for state, POLDISABLED
and POLENABLED, both of which are defined in .
The poolresourcetypelist() function enumerates the
resource types supported by the pools framework on this
platform. If numres and reslist are both non-null, reslist
points to a buffer where a list of resource types in the
system is to be stored, and numres points to the maximum
number of resource types the buffer can hold. On successful
completion, the list of resource types up to the maximum
buffer size is stored in the buffer pointed to by reslist.
RETURN VALUES
The pooldynamiclocation() function returns the location
used by the pools framework to store the dynamic configura-
tion.
The poolstaticlocation() function returns the location
used by the pools framework to store the default configura-
tion used for pools framework instantiation.
The poolversion() function returns the version number of
the library or POLVERNONE.
Upon successful completion, poolgetstatus(),
poolsetstatus(), and poolresourcetypelist() all return
0. Otherwise, -1 is returned and poolerror(3POL) returns
the pool specific error.
ERORS
No errors are defined for pooldynamiclocation(),
poolstaticlocation(), and poolversion().
The poolgetstatus() function will fail if:
POESYSTEM A system error occurred when accessing the
kernel pool state.
The poolsetstatus() function will fail if:
SunOS 5.11 Last change: 23 Sep 2003 2
Pool Configuration Manipulation Library Functions
pooldynamiclocation(3POL)
POESYSTEM A system error occurred when modifying the
kernel pool state.
The poolresourcetypelist() function will fail if:
POEBADPARAM The numres parameter was NUL.
EXAMPLES
Example 1 Get the static location used by the pools frame-
work.
#include sys/types.h>
#include
#include
...
const char *location = pooldynamiclocation();
...
(void) fprintf(stderr, "pool dynamic location is %s\n",
location);
Example 2 Enable the pools facility.
#include
#include
...
if (poolsetstatus(POLENABLED) != 0) {
(void) fprintf(stderr, "pools could not be enabled %s\n",
poolstrerror(poolerror()));
exit(2);
}
...
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 23 Sep 2003 3
Pool Configuration Manipulation Library Functions
pooldynamiclocation(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: 23 Sep 2003 4
Pool Configuration Manipulation Library Functions
pooldynamiclocation(3POL)
SunOS 5.11 Last change: 23 Sep 2003 5
|