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

Technical Reference: Kernel and Subsystems, Volume 1

__pag_setname System Call

Purpose

Invokes the kcred_setpagname kernel service and returns the PAG type identifier.

Syntax

int __pag_setname (name, flags)
char *name;
int flags;

Description

The __pag_setname system call invokes the kcred_setpagname kernel service to register the name of a PAG and returns the PAG type identifier. The value of the func parameter to kcred_setpagname will be NULL. The other parameters to this system call are the same as with the underlying kernel service. This system call requires the SYS_CONFIG privilege.

Parameters

name A char * value giving the symbolic name of the requested PAG.
flags Either PAG_UNIQUEVALUE or PAG_MULTIVALUED 1 .

Return Values

A return value greater than or equal to 0 is the PAG type associated with the name parameter. This value may be used with other PAG-related system calls which require a numerical PAG identifier. If unsuccessful, -1 is returned and the errno global variable is set to indicate the cause of the error.

Error Codes

ENOSPC The PAG name table is full.
EINVAL The named PAG type already exists in the table, and the flags and func parameters do not match their earlier values.
EPERM The calling process does not have the SYS_CONFIG privilege.

Related Information

__pag_getid System Call, __pag_getname System Call, __pag_getvalue 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 ]