[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Base Operating System and Extensions, Volume 2
ra_getrset Subroutine
Purpose
Gets the resource set to which a work component is attached.
Library
Standard C library (libc.a)
Syntax
# include <sys/rset.h>
int ra_getrset (rstype, rsid, flags, rset)
rstype_t rstype;
rsid_t rsid;
unsigned int flags;
rsethandle_t rset;
Description
The ra_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.
A process ID value of RS_MYSELF indicates the resource set attached to the
current process is requested.
The following return values from the ra_getrset subroutine
indicate the type of resource set returned:
- A value of RS_EFFECTIVE_RSET indicates the process was explicitly attached
to the resource set. This may have been done with the ra_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 rs_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.
Parameters
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:
- R_PROCESS: existing process
|
rsid |
Identifies the work component whose resource set attachment
is requested. This parameter must be the following:
- Process ID (for rstype of R_PROCESS): set the rsid_t at_pid field to the desired process'
process ID.
|
flags |
Reserved for future use. Specify as 0. |
rset |
Specifies the resource set to receive the work component's
resource set. |
Return Values
If successful, a value of RS_EFFECTIVE_RSET, RS_PARTITION_RSET, or RS_DEFAULT_RSET
is returned. If unsuccessful, a value of -1 is returned and the errno global variable is set to indicate the error.
Error Codes
The ra_getrset subroutine is unsuccessful if one
or more of the following are true:
EINVAL |
One of the following is true:
- The flags parameter contains an invalid value.
- The rstype parameter contains an invalid type
qualifier.
|
EFAULT |
Invalid address. |
ESRCH |
The process identified by the rstype and rsid parameters does not exist. |
Related Information
The rs_getpartition Subroutine.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]