[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

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

cbp Points to a cfgncb configuration notification control block.

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.

Implementation Specifics

The cfgnadd kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The sysconfig subroutine.

The cfgncb configuration notification control block.

The cfgndel kernel service.

Kernel Extension and Device Driver Management Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]