The programming environment of POSIX processes includes the standard POSIX APIs and a number of POSIX extensions that can be accessed directly by any process.
Certain libraries (libc and libstdc++, for example) are implicitly provided when you select the appropriate Imakefile rule (see "The imake Environment"). Other libraries must be explicitly stated in the Imakefile.
The libraries to which a process has access may be either static (.a) or shared (.so). Whether the process uses a static or shared library depends on the rule selected in the Imakefile. Shared processes use libc.so.
The following sections describe all libraries that can be used by a process. Note that the libraries can be accessed by either a user or supervisor actor or process.
The os/lib/libc.a and os/lib/libc.so libraries are automatically included by any process or actor and include the following APIs:
Private Data API
LAP API
MIPC API
IPC API
Standard C API
POSIX I/O API
POSIX Network API
C++ actors or processes have access to the same APIs through the C++ library (os/lib/libstdc++.a).
The following libraries can be accessed by either a supervisor or user process or actor. These libraries must be explicitly included in your Imakefile and contain the full pathname.
To add a library to an Imakefile, $(OS_DIR)/lib/lib<libraryname>.a or $(OS_DIR)/lib/lib<libraryname>.so to the relevant rule.
Table 5-1 Static libraries (.a)
Using the libsysevent.a library dictates that you use the libnvpair.a, librpc.a and libpthreads.a libraries too.
Library name and path |
Description |
---|---|
os/lib/libldap.so |
LDAP library |
os/lib/libnsl.so |
Network services library (symbolic link to libresolv.so) |
os/lib/libpam.so |
Interface library for PAM |
os/lib/libpthreads.so |
POSIX pthread library |
os/lib/libresolv.so |
Network services library |
os/lib/librpc.so |
RPC library |
The extensions to the standard POSIX APIs can be divided into two groups:
Restricted microkernel calls
POSIX-like extended services
The restricted microkernel calls are directly available from the libc.a or libc.so libraries and include the following APIs:
MIPC
IPC
LAP
To add POSIX-like extended services, you must specify the required library in your Imakefile. These services include the following APIs:
Blackbox
SysEvent
LDAP