rs_init Subroutine

Purpose

Initializes a previously allocated resource set.

Library

Standard C library (libc.a)

Syntax

#include <sys/rset.h>
int rs_init (rset, flags)
rsethandle_t rset;
unsigned int flags;

Description

The rs_init subroutine initializes a previously allocated resource set. The resource set is initialized according to information specified by the flags parameter.

Parameters

Item Description
rset Specifies the handle of the resource set to initialize.
flags Specifies how the resource set is initialized. It takes one of the following values, defined in rset.h:
  • RS_EMPTY: The resource set is initialized to contain no resources.
  • RS_SYSTEM: The resource set is initialized to contain available system resources.
  • RS_ALL: The resource set is initialized to contain all resources.
  • RS_PARTITION: The resource set is initialized to contain the resources in the caller's process partition resource set.

Return Values

If successful, a value of 0 is returned. If unsuccessful, a value of -1 is returned, and the errno global variable is set to indicate the error.

Error Codes

The rs_init subroutine is unsuccessful if one or more of the following are true:

Item Description
EINVAL The flags parameter contains an invalid value.