rs_alloc Subroutine
Purpose
Allocates a resource set and returns its handle.
Library
Standard C library (libc.a)
Syntax
#include <sys/rset.h>
rsethandle_t rs_alloc (flags)
unsigned int flags;
Description
The rs_alloc subroutine allocates a resource set and initializes it according to the information specified by the flags parameter. The value of the flags parameter determines how the new resource set is initialized.
The handle for the new resource set is returned by the subroutine.
Parameters
Item | Description |
---|---|
flags | Specifies how the new resource set is initialized.
It takes one of the following values, defined in rset.h:
|
Return Values
On successful completion, a resource set handle for the new resource set is returned. Otherwise, a value of 0 is returned and the errno global variable is set to indicate the error.
Error Codes
The rs_alloc subroutine is unsuccessful if one or more of the following are true:
Item | Description |
---|---|
EINVAL | The flags parameter contains an invalid value. |
ENOMEM | There is not enough space to create the data structures related to the resource set. |