The pool_get_binding() function returns the name of the pool on the running system that contains the set of resources to which the given process is bound. If no such pool exists on the system or the search returns more than one pool (since the set of resources is referred to by
more than one pool), NULL is returned and the pool error value is set to POE_INVALID_SEARCH.
It is possible that one of the resources to which the given process is bound is not associated with a pool. This could occur if a processor set was created with one of the pset_() functions and the process was then bound to that set. It could also occur if the process was bound
to a resource set not currently associated with a pool, since resources can exist that are not associated with a pool.
The pool_set_binding() function binds the processes matching idtype and id to the resources associated with pool on the running system. This function requires the privilege required by the underlying resource
types referenced by the pool; generally, this requirement is equivalent to requiring superuser privilege.
The idtype parameter can be of the following types:
-
P_PID
- The id parameter is a pid.
-
P_TASKID
- The id parameter is a taskid.
-
P_PROJID
- The id parameter is a project ID. All currently running processes belonging to the given project will be bound to the pool's resources.
The pool_get_resource_binding() function returns the name of the resource of the supplied type to which the supplied process is bound.
|