Allocates a resource set and returns its handle.
Standard C library (libc.a)
#include <sys/rset.h>
rsethandle_t rs_alloc (flags)
unsigned int flags;
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.
Item | Description |
---|---|
flags | Specifies how the new resource set is initialized.
It takes one of the following values, defined in rset.h:
|
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.
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. |