kra_getrset Subroutine
Purpose
Gets the resource set to which a work component is attached.
Syntax
#include <sys/rset.h>
int kra_getrset (rstype, rsid, flags, rset, rset_type)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
rsethandle_t rset;
unsigned int *rset_type;
Description
The kra_getrset subroutine returns the resource set to which a specified work component is attached.
The work component is an existing process identified by the process ID or an existing kernel thread identified by the kernel thread ID (tid). A process ID or thread ID value of RS_MYSELF indicates the resource set attached to the current process or the current kernel thread, respectively, is requested.
Upon successful completion, one
of the following types of resource set is returned into the rset_type parameter:
- A value of RS_EFFECTIVE_RSET indicates the process was explicitly attached to the resource set. This may have been done with the kra_attachrset subroutine.
- A value of RS_PARTITION_RSET indicates the process was not explicitly attached to a resource set. However, the process had an explicitly set partition resource set. This may be set with the krs_setpartition subroutine or through the use of WLM work classes with resource sets.
- A value of RS_DEFAULT_RSET indicates the process was not explicitly attached to a resource set nor did it have an explicitly set partition resource set. The system default resource set is returned.
- A value of RS_THREAD_RSET indicates the kernel thread was explicitly attached to the resource set. This might have been done with the ra_attachrset subroutine.
Parameters
Item | Description |
---|---|
rstype | Specifies the type of the work component whose
resource set attachment is requested. This parameter must be the following
value, defined in rset.h:
|
rsid | Identifies the work component whose resource
set attachment is requested. This parameter must be the following:
|
flags | Reserved for future use. Specify as 0. |
rset | Specifies the resource set to receive the work component's resource set. |
rset_type | Points to an unsigned integer field to receive the resource set type. |
Return Values
Upon
successful completion, the kra_getrset subroutine returns a
0. If unsuccessful, one or more of the following are true:
Item | Description |
---|---|
EINVAL | One of the following is true:
|
EFAULT | Invalid address. |
ESRCH | The process or kernel thread identified by the rstype and rsid parameters does not exist. |