__pag_getvalue System Call
Purpose
Invokes the kcred_getpag kernel service and returns the PAG value.
Syntax
int __pag_getvalue (type)
int type;
Description
Given a PAG type, the __pag_getvalue system call invokes the kcred_getpag kernel service and returns the PAG value for the value of the type parameter.
Parameters
Item | Description |
---|---|
type | An int value indicating the desired PAG. |
Return Values
If successful, the value of the PAG (or 0 when there is no value for that PAG type) is returned. If unsuccessful, -1 is returned and the errno global variable is set to a value reflecting the cause of the error.
Error Codes
Item | Description |
---|---|
EINVAL | The type parameter is less than 0 or greater than the maximum PAG type value. |
ENOENT | The type parameter doesn't reference and existing PAG type. |
Note: It is not an error for a defined PAG to not have a
value in the current process' credentials.