The POSIX library (and by extension the C library) derive a number of its external interfaces from the client OS (see Section 11). Rather than relying on linktime dependencies for these interfaces, the POSIX library uses a services database (see Section 5.1) that was provided to the C library when it was initialized. This services database is pre-loaded (by the client OS when the kernel boots) with certain COM objects that make the POSIX library functional. One such interface object is the oskit_libcenv_t COM interface, which provides hooks that are very specific to the POSIX and C libraries. This, and other interfaces, are looked up in the database as required. For example, the filesytem namespace object is provided by the oskit_libcenv_t COM object. The first file access will result in a lookup in the services database for the oskit_libcenv_t object, and then a call to oskit_libcenv_getfsnamespace to get the filesystem namespace COM object (see Section 20). If the kernel has been constructed with a filesystem, and the appropriate client OS initialization done, the call to getfsnamespace will return sucessfully. Otherwise, getfsnamespace will fail and all subsequent file operations will fail.
The intent of this ``indirection'' is to reduce (eventually to zero) the number of linktime dependencies between the C/Posix library and the rest of the OSKit libraries. Not only does this simplify the process of constructing an oskit kernel, but also makes it possible to do other interesting things such dynamic composition of services.
The POSIX library depends on the client OS for a number of interfaces. They are: