Warning: This document is a work in progress.
This document describes the requirements, design, and implementation details of LLVM's System Library. The library is composed of the header files in llvm/include/llvm/System and the source files in llvm/lib/System. The goal of this library is to completely shield LLVM from the variations in operating system interfaces. By centralizing LLVM's use of operating system interfaces, we make it possible for the LLVM tool chain and runtime libraries to be more easily ported to new platforms. The library also unclutters the rest of LLVM from #ifdef use and special cases for specific operating systems.
The System Library was donated to LLVM by Reid Spencer who formulated the original design as part of the eXtensible Programming System (XPS) which is based, in part, on LLVM.
The System library's requirements are aimed at shielding LLVM from the variations in operating system interfaces. The following sections define the requirements needed to fulfill this objective.
To be written.
To be written.
To be written.
To be written.
To be written.
To be written.
In order to fulfill the requirements of the system library, strict design objectives must be maintained in the library as it evolves. The goal here is to provide interfaces to operating system concepts (files, memory maps, sockets, signals, locking, etc) efficiently and in such a way that the remainder of LLVM is completely operating system agnostic.
no public data
onlyprimitive typed private/protected data
data size is "right" for platform, not max of all platforms
each class corresponds to O/S concept
To be written.
To be written.
To be written.
To be written.
To be written.
To be written.
See bug 351 for further details on the progress of this work
The linux implementation of the system library will always be the reference implementation. This means that (a) the concepts defined by the linux must be identically replicated in the other implementations and (b) the linux implementation must always be complete (provide implementations for all concepts).