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

Technical Reference: Kernel and Subsystems, Volume 1

__pag_getname System Call

Purpose

Retrieves the name of a PAG type.

Syntax

int __pag_getname (type, buf, size)
int type;
char *buf;
int size;

Description

The __pag_getname system call retrieves the name of a PAG type given its integer value by invoking the kcred_getpagname kernel service with the given parameters.

Parameters

type A numerical PAG identifier.
buf A char * value that points to an array at least PAG_NAME_LENGTH_MAX+1 bytes in length.
size An int value that gives the size of buf in bytes.

Return Values

If successful, 0 is returned and the buf parameter contains the PAG name associated with the type parameter. If unsuccessful, -1 is returned and the errno global variable is set to a value reflecting the cause of the error.

Error Codes

EINVAL The value of the type parameter is less than 0 or greater than the maximum PAG identifier.
ENOENT There is no PAG associated with the type parameter.
ENOSPC The value of the size parameter is insuffient to hold the PAG name and its terminating NULL character.

Related Information

__pag_getid 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 ]