[ 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:

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 ]