ukeyset_init Subroutine

Purpose

Initializes a user-key-set.

Library

Standard C library (libc.a)

Syntax

#include <sys/ukeys.h>

int ukeyset_init (nset, flags)
ukeyset_t * nset;
unsigned int flags;

Description

The ukeyset_init subroutine initializes the user-key set pointed to by the nset parameter. The key-set has read and write accesss enabled for UKEY_PUBLIC alone and disabled for all other keys. If the UK_INIT_ADD_PRIVATE flag is specified, read and write access for all available private user-keys is enabled.

Parameters

Item Description
nset Points to the user-key-set to be initialized.
flags Must be set to zero for default behavior (only public user-key enabled) or to UK_INIT_ADD_PRIVATE if all private user-keys are also to be enabled.

Return Values

If successful, the ukeyset_init subroutine returns a value of 0. Otherwise, it returns a value of -1 and sets the errno global variable to indicate the error.

Errors Codes

The ukeyset_init subroutine fails if the following are true:

Item Description
EINVAL Not valid flags parameter, or NULL or misaligned nset parameter.
ENOSYS Not a user-key enabled process.

Related Information

The ukey_enable subroutine.

The ukey_setjmp subroutine.

The ukeyset_add_key, ukeyset_remove_key, ukeyset_add_set, ukeyset_remove_set subroutine.

The ukeyset_activate subroutine.

The ukeyset_ismember subroutine.

The pthread_attr_getukeyset_np or pthread_attr_setukeyset_np subroutine.