X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStable.h;h=ca2e72118adae425fd34bef2af6ff3dadecddfd2;hb=45252b35151fc55aa19fb6770df5ed8267639083;hp=12056f9974885eac3141c6e4b26385ad9f59db14;hpb=791d890ca039ce45704b879b292069ddc5821dc0;p=ghc-hetmet.git diff --git a/ghc/includes/Stable.h b/ghc/includes/Stable.h index 12056f9..ca2e721 100644 --- a/ghc/includes/Stable.h +++ b/ghc/includes/Stable.h @@ -1,7 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Stable.h,v 1.12 2001/12/20 16:12:09 sewardj Exp $ * - * (c) The GHC Team, 1998-2000 + * (c) The GHC Team, 1998-2004 * * Stable Pointers: A stable pointer is represented as an index into * the stable pointer table in the low BITS_PER_WORD-8 bits with a @@ -38,21 +37,30 @@ typedef struct { } snEntry; extern DLL_IMPORT_RTS snEntry *stable_ptr_table; -extern DLL_IMPORT_RTS snEntry *stable_ptr_free; - -extern DLL_IMPORT_RTS unsigned int SPT_size; extern void freeStablePtr(StgStablePtr sp); -extern inline StgPtr -deRefStablePtr(StgStablePtr sp) +#if defined(__GNUC__) +# ifndef RTS_STABLE_C +extern inline +# endif +StgPtr deRefStablePtr(StgStablePtr sp) { ASSERT(stable_ptr_table[(StgWord)sp].ref > 0); return stable_ptr_table[(StgWord)sp].addr; } +#else +/* No support for 'extern inline' */ +extern StgPtr deRefStablePtr(StgStablePtr sp); +#endif + +extern void initStablePtrTable ( void ); +extern void enlargeStablePtrTable ( void ); +extern StgWord lookupStableName ( StgPtr p ); -/* No deRefStableName, because the existence of a stable name doesn't - * guarantee the existence of the object itself. - */ +extern void markStablePtrTable ( evac_fn evac ); +extern void threadStablePtrTable ( evac_fn evac ); +extern void gcStablePtrTable ( void ); +extern void updateStablePtrTable ( rtsBool full ); #endif