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

Technical Reference: Base Operating System and Extensions , Volume 2


wlm_initkey Subroutine

Purpose

Allocates and initializes the classes to keys translation table.

Library

Workload Manager Library (libwlm.a)

Syntax

#include <sys/wlm.h>

int wlm_initkey ( struct wlm_args *args, void **ctx)

Description

The wlm_initkey subroutine allocates a block of memory, builds the keys <==> class names translation table and returns its address into the ctx argument.

Parameters


args Only 2 fields need to be initialized in the wlm_args structure pointed to by args:
  • confdir specifies the null-terminated name of the WLM configuration to be searched (the name can be "current" to specify the current configuration). If the configuration name passed is an empty string (starts with '\0'), then all the configurations in /etc/wlm are searched.
  • versflags initialized with WLM_VERSION and optionally WLM_MUTE.

Return Values

If the wlm_initkey subroutine is successful, a value of 0 is returned. If the wlm_initkey subroutine is unsuccessful, an error code is returned.

Error Codes

If the wlm_initkey subroutine is unsuccessful, one of the following error codes is returned:

WLM_BADVERS Bad version number.
WLM_NOT_INITED Missing call to wlm_init.
WLM_NOMEM Not enough memory.
WLM_NOCLASS Specified configuration does not exist.
WLM_EFAULT Invalid ctx or args argument.

Related Information

The wlm_endkey subroutine.

The wlm_class2key subroutine.

The wlm_key2class subroutine.


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