unregister_library

Unregisters third-party library code.

Library:LibC
Service:Library

Syntax

  #include <library.h> 
   
  int unregister_library (
     int   lib_id);
  

Parameters

lib_id

(IN) Specifies the ID of the library to unregister.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:

Decimal

Name

Description

9

EINVAL

A valid, registered library was not indicated by lib_id.

Remarks

The register_library function must be called prior to any other function requiring a libC library handle.

You must unregister each library to avoid causing small memory leaks that will decrease the amount of available memory. Before your library calls unregister_library, you must ensure all your clients have unloaded. If your library can't determine this, your library should stay loaded until the server goes down or your address space is unloaded.

For sample code, see Library.c.

See Also