1 -----------------------------------------------------------------------------
2 The External API to the GHC Runtime System.
3 -----------------------------------------------------------------------------
5 The header files in this directory form the external API for the
6 runtime. The header files are used in the following scenarios:
8 1. Included into the RTS source code itself.
9 In this case we include "Rts.h", which includes everything
10 else in the appropriate order.
12 Pretty much everything falls into this category.
14 2. Included into a .hc file generated by the compiler.
15 In this case we include Stg.h, which includes a
16 subset of the headers, in the appropriate order and
17 with the appropriate settings (e.g. global register variables
20 Includes everything below Stg.h in the hierarchy (see below).
22 3. Included into external C source code.
23 The following headers are designed to be included into
24 external C code (i.e. C code compiled using a GHC installation,
25 not part of GHC itself or the RTS):
33 These interfaces are intended to be relatively stable.
35 Also Rts.h can be included to get hold of everything else, including
36 definitions of heap objects, info tables, the storage manager interface
37 and so on. But be warned: none of this is guaranteed to remain stable
38 from one GHC release to the next.
40 4. Included into non-C source code, including Haskell (GHC itself)
41 and C-- code in the RTS.
43 The following headers are #included into non-C source, so
44 cannot contain any C code or declarations:
55 Here is a rough hierarchy of the header files by dependency.
59 ghcconfig.h // configuration info derived by the configure script.
60 RtsConfig.h // settings for Rts things (eg. eager vs. lazy BH)
61 MachDeps.h // sizes of various basic types
62 StgTypes.h // basic types specific to the virtual machine
63 TailCalls.h // tail calls in .hc code
64 StgDLL.h // stuff related to Windows DLLs
65 MachRegs.h // global register assignments for this arch
66 Regs.h // "registers" in the virtual machine
67 StgProf.h // profiling gubbins
68 StgMiscClosures.h // decls for closures & info tables in the RTS
69 RtsExternal.h // decls for RTS things required by .hc code
73 RtsTypes.h // types used in the RTS
75 Constants.h // build-time constants
79 Liveness.h // macros for constructing RET_DYN liveness masks
84 Updates.h // macros for performing updates
96 Cmm.h // included into .cmm source only
97 DerivedConstants.h // generated by mkDerivedConstants.c from other
106 Bytecodes.h // Bytecode definitions for the interpreter
107 Linker.h // External API to the linker
108 RtsFlags.h // External API to the RTS runtime flags
109 SchedAPI.h // External API to the RTS scheduler
110 ieee-flpt.h // ToDo: needed?
112 RtsAPI.h // The top-level interface to the RTS (rts_evalIO(), etc.)
113 HsFFI.h // The external FFI api