List of Device Configuration Subroutines

This section lists the preexisting conditions for using the device configuration library subroutines.

  • The caller has initialized the Object Data Manager (ODM) before invoking any of these library subroutines. This is done using the initialize_odm subroutine. Similarly, the caller must terminate the ODM (using the terminate_odm subroutine) after these library subroutines have completed.
  • Because all of these library subroutines (except the attrval, getattr, and putattr subroutines) access the Customized Device Driver (CuDvDr) object class, this class must be exclusively locked and unlocked at the proper times. The application does this by using the odm_lock and odm_unlock subroutines. In addition, those library subroutines that access the CuDvDr object class exclusively lock this class with their own internal locks.

Following are the device configuration library subroutines:

Item Description
attrval Verifies that attributes are within range.
genmajor Generates the next available major number for a device driver instance.
genminor Generates the smallest unused minor number, a requested minor number for a device if it is available, or a set of unused minor numbers.
genseq Generates a unique sequence number for creating a device's logical name.
getattr Returns attribute objects from either the Predefined Attribute (PdAt) or Customized Attribute (CuAt) object class, or both.
getminor Gets from the CuDvDr object class the minor numbers for a given major number.
loadext Loads or unloads and binds or unbinds device drivers to or from the kernel.
putattr Updates attribute information in the CuAt object class or creates a new object for the attribute information.
reldevno Releases the minor number or major number, or both, for a device instance.
relmajor Releases the major number associated with a specific device driver instance.