ukeyset_ismember Subroutine

Purpose

Tests whether a key exists in a user-key-set.

Library

Standard C library (libc.a)

Syntax

#include <sys/ukeys.h>

int ukeyset_ismember (uset, ukey, flags)
ukeyset_t * uset;
ukey_t ukey;
unsigned int flags;

Description

The ukeyset_ismember subroutine tests whether the read or write access specified by the flags parameter for a user-key specified by the ukey parameter is included in the user-key-set pointed to by the uset parameter.

Parameters

Item Description
uset Points to the user-key-set.
ukey User-key whose membership in key-set is to be tested.
flags Must be set to one of the following values:
  • UK_READ - Tests for read access
  • UK_WRITE - Tests for write access
  • UK_RW - Tests for both read and write access

Return Values

Upon successful completion, the ukeyset_ismember subroutine returns a value of 1, if the user-key ukey with the specified access flags is present in the indicated key-set uset. Otherwise, it returns a value of 0. If unsuccessful, the subroutine returns a value of -1, and the errno global variable is set to indicate the error.

Errors Codes

The ukeyset_ismember subroutine fails if the following is true:

Item Description
EINVAL Invalid flags parameter or invalid ukey parameter or invalid key-set parameter.
ENOSYS The process is not a user-key-enabled process.