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

Technical Reference: Base Operating System and Extensions , Volume 2


SYS_SINGLELOAD sysconfig Operation

Purpose

Loads a kernel extension module if it is not already loaded.

Description

The SYS_SINGLELOAD sysconfig operation is identical to the SYS_KLOAD (SYS_KLOAD sysconfig Operation) operation, except that the SYS_SINGLELOAD operation loads the object file only if an object file with the same path name has not already been loaded into the kernel.

If an object file with the same path name has already been loaded, the module ID for that object file is returned in the kmid field and its load count incremented. If the object file is not loaded, this operation performs the load request exactly as defined for the SYS_KLOAD operation.

This option is useful in supporting global kernel routines where only one copy of the routine and its data can be present. Typically routines that export symbols to be added to the kernel name space are of this type.

Note: A path name comparison is done to determine if the same object file has already been loaded. However, this function will erroneously load a new copy of the object file into the kernel if the path name to the object file is expressed differently than it was on a previous load request.

Loader Symbol Binding Support explains the symbol binding support provided when loading kernel object files.

Return Values

The SYS_SINGLELOAD operation returns the same set of error codes that the SYS_KLOAD operation returns.

Related Information

The sysconfig (sysconfig Subroutine) subroutine.

The SYS_KLOAD (SYS_KLOAD sysconfig Operation) sysconfig operation.

Programming in the Kernel Environment Overview, and Understanding Kernel Extension Binding in AIX 5L Version 5.1 Kernel Extensions and Device Support Programming Concepts.


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