From 4f6015a487758e51bf103436e04599b3a34ba38e Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sat, 17 Jul 2004 10:04:49 +0000 Subject: [PATCH] Initial (outline only) draft of the System Library requirements, design and details documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14910 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/SystemLibrary.html | 201 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 docs/SystemLibrary.html diff --git a/docs/SystemLibrary.html b/docs/SystemLibrary.html new file mode 100644 index 00000000000..8ee2563b7d6 --- /dev/null +++ b/docs/SystemLibrary.html @@ -0,0 +1,201 @@ + + + + System Library + + + + +
System Library
+ +
Warning: This document is a work in progress.
+ + + +
+

Written by the Reid Spencer

+
+ + + +
Abstract
+
+

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.

+
+ + +
+ System Library Requirements +
+
+

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.

+
+ + +
Hide System Header Files
+
+

To be written.

+
+ + +
No Exposed Functions
+
+

To be written.

+
+ + +
No Exposed Data
+
+

To be written.

+
+ + +
No Exceptions
+
+

To be written.

+
+ + +
Standard Error Codes
+
+

To be written.

+
+ + +
Minimize Overhead
+
+

To be written.

+
+ + +
System Library Design
+
+

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.

+
+ + +
Use Opaque Classes
+
+

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

+
+ + +
Common Implementations
+
+

To be written.

+
+ + +
+ Multiple Implementations +
+
+

To be written.

+
+ + +
+ Use Low Level Interfaces +
+
+

To be written.

+
+ + +
No Memory Allocation
+
+

To be written.

+
+ + +
No Virtual Methods
+
+

To be written.

+
+ + +
System Library Details
+
+

To be written.

+
+ + +
Bug 251
+
+

See bug 351 + for further details on the progress of this work

+
+ + +
+ Reference Implementation +
+
+

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).

+
+ + + +
+
+ Valid CSS! + Valid HTML 4.01! + + Reid Spencer
+ LLVM Compiler Infrastructure
+ Last modified: $Date$ +
+ + -- 2.34.1