krs_alloc Subroutine
Purpose
Allocates a resource set and returns its handle.
Syntax
#include <sys/rset.h>
int krs_alloc (rset, flags)
rsethandle_t *rset;
unsigned int flags;
Description
The krs_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.
Parameters
Item | Description |
---|---|
rset | Points to an rsethandle_t where the resource set handle is stored on successful completion. |
flags | Specifies how the new resource set is initialized.
It takes one of the following values, defined in rset.h:
|
Return Values
Upon
successful completion, the krs_alloc subroutine returns a 0.
If unsuccessful, one or more of the following is returned:
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. |