[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

__pag_getid System Call

Purpose

Invokes the kcred_getpagid kernel service and returns the PAG identifier for that PAG name.

Syntax

int __pag_getid (name)
char *name;

Description

Given a PAG type name, the __pag_getid invokes the kcred_getpagid kernel service and returns the PAG identifier for that PAG name.

Parameters

name A char * value which references a NULL-terminated string of not more than PAG_NAME_LENGTH_MAX characters.

Return Values

If successful, a value greater than or equal to 0 is returned and represents the PAG type. This value may be used in subsequent calls to other PAG system calls that require a type parameter on input. If unsuccessful, -1 is returned and the errno global variable is set to a value reflecting the cause of the error.

Error Codes

ENOENT The name parameter doesn't refer to an existing PAG type.
ENAMETOOLONG The name parameter refers to a string that is longer than PAG_NAME_LENGTH_MAX.

Related Information

__pag_getname System Call, __pag_getvalue System Call, __pag_setname System Call, __pag_setvalue System Call, kcred_getpagid Kernel Service, kcred_getpagname Kernel Service, and kcred_setpagname Kernel Service.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]