X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStable.h;h=ca2e72118adae425fd34bef2af6ff3dadecddfd2;hb=4a0cbd60940b4499b1e4f35a2e6b7bb7f5b9e0a5;hp=386087e351c5d1b7eba9aeb6ccb95977001d19b8;hpb=95371b03d1e5310f3b344cc2ecf29982e2bc9f5d;p=ghc-hetmet.git diff --git a/ghc/includes/Stable.h b/ghc/includes/Stable.h index 386087e..ca2e721 100644 --- a/ghc/includes/Stable.h +++ b/ghc/includes/Stable.h @@ -1,7 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Stable.h,v 1.13 2002/08/16 13:29:05 simonmar 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 @@ -41,15 +40,27 @@ extern DLL_IMPORT_RTS snEntry *stable_ptr_table; 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