diff options
Diffstat (limited to 'includes/rts')
-rw-r--r-- | includes/rts/BlockSignals.h | 37 | ||||
-rw-r--r-- | includes/rts/PrimFloat.h | 18 | ||||
-rw-r--r-- | includes/rts/Utils.h | 21 | ||||
-rw-r--r-- | includes/rts/storage/GC.h | 13 |
4 files changed, 89 insertions, 0 deletions
diff --git a/includes/rts/BlockSignals.h b/includes/rts/BlockSignals.h new file mode 100644 index 0000000000..bc02f5fccf --- /dev/null +++ b/includes/rts/BlockSignals.h @@ -0,0 +1,37 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team, 1998-2009 + * + * RTS signal handling + * + * Do not #include this file directly: #include "Rts.h" instead. + * + * To understand the structure of the RTS headers, see the wiki: + * http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes + * + * ---------------------------------------------------------------------------*/ + +#ifndef RTS_BLOCKSIGNALS_H +#define RTS_BLOCKSIGNALS_H + +/* Used by runProcess() in the process package + */ + +/* + * Function: blockUserSignals() + * + * Temporarily block the delivery of further console events. Needed to + * avoid race conditions when GCing the queue of outstanding handlers or + * when emptying the queue by running the handlers. + * + */ +void blockUserSignals(void); + +/* + * Function: unblockUserSignals() + * + * The inverse of blockUserSignals(); re-enable the deliver of console events. + */ +void unblockUserSignals(void); + +#endif /* RTS_BLOCKSIGNALS_H */ diff --git a/includes/rts/PrimFloat.h b/includes/rts/PrimFloat.h new file mode 100644 index 0000000000..7d137a7b6c --- /dev/null +++ b/includes/rts/PrimFloat.h @@ -0,0 +1,18 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team, 1998-2009 + * + * Primitive floating-point operations + * + * To understand the structure of the RTS headers, see the wiki: + * http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes + * + * ---------------------------------------------------------------------------*/ + +#ifndef RTS_PRIMFLOAT_H +#define RTS_PRIMFLOAT_H + +StgDouble __int_encodeDouble (I_ j, I_ e); +StgFloat __int_encodeFloat (I_ j, I_ e); + +#endif /* RTS_PRIMFLOAT_H */ diff --git a/includes/rts/Utils.h b/includes/rts/Utils.h new file mode 100644 index 0000000000..1258f6daa3 --- /dev/null +++ b/includes/rts/Utils.h @@ -0,0 +1,21 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team, 1998-2009 + * + * RTS external APIs. This file declares everything that the GHC RTS + * exposes externally. + * + * To understand the structure of the RTS headers, see the wiki: + * http://hackage.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes + * + * ---------------------------------------------------------------------------*/ + +#ifndef RTS_UTILS_H +#define RTS_UTILS_H + +// Used in GHC (basicTypes/Unique.lhs, and Data.Unique in the base +// package. +HsInt genSymZh(void); +HsInt resetGenSymZh(void); + +#endif /* RTS_UTILS_H */ diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h index df4ba9d153..b30582dfd7 100644 --- a/includes/rts/storage/GC.h +++ b/includes/rts/storage/GC.h @@ -182,6 +182,10 @@ lnat allocatedBytes ( void ); void * allocateExec(unsigned int len, void **exec_addr); void freeExec (void *p); +// Used by GC checks in external .cmm code: +extern nat alloc_blocks; +extern nat alloc_blocks_lim; + /* ----------------------------------------------------------------------------- Performing Garbage Collection -------------------------------------------------------------------------- */ @@ -197,6 +201,15 @@ void newCAF (StgClosure*); void newDynCAF (StgClosure *); void revertCAFs (void); +/* ----------------------------------------------------------------------------- + This is the write barrier for MUT_VARs, a.k.a. IORefs. A + MUT_VAR_CLEAN object is not on the mutable list; a MUT_VAR_DIRTY + is. When written to, a MUT_VAR_CLEAN turns into a MUT_VAR_DIRTY + and is put on the mutable list. + -------------------------------------------------------------------------- */ + +void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p); + /* set to disable CAF garbage collection in GHCi. */ /* (needed when dynamic libraries are used). */ extern rtsBool keepCAFs; |