cfgnadd Kernel Service

Purpose

Registers a notification routine to be called when system-configurable variables are changed.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/sysconfig.h>

void cfgnadd
( cbp)
struct cfgncb *cbp;

Parameter

Item Description
cbp Points to a cfgncb configuration notification control block.

On a platform that supports storage keys, the passed in cbp parameter must only be in the KKEY_PUBLIC domain.

Description

The cfgnadd kernel service adds a cfgncb control block to the list of cfgncb structures that the kernel maintains. A cfgncb control block contains the address of a notification routine (in its cfgncb.func field) to be called when a configurable variable is being changed.

The SYS_SETPARMS sysconfig operation allows a user with sufficient authority to change the values of configurable system parameters. The cfgnadd service allows kernel routines and extensions to register the notification routine that is called whenever these configurable system variables have been changed.

This notification routine is called in a two-pass process. The first pass performs validity checks on the proposed changes to the system parameters. During the second pass invocation, the notification routine performs whatever processing is needed to make these changes to the parameters. This two-pass procedure ensures that variables used by more than one kernel extension are correctly handled.

To use the cfgnadd service, the caller must define a cfgncb control block using the structure found in the /usr/include/sys/sysconfig.h file.

Execution Environment

The cfgnadd kernel service can be called from the process environment only.

The cfgncb.func notification routine is called in a process environment only.