X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStable.h;h=ca2e72118adae425fd34bef2af6ff3dadecddfd2;hb=0372ac231bd18e993a2533f784805046876d5527;hp=c4c207787c598186ffbd1593b4f5e0e300bfd9c3;hpb=ae1319236ce2f672dede0a92f0ed2df318060702;p=ghc-hetmet.git diff --git a/ghc/includes/Stable.h b/ghc/includes/Stable.h index c4c2077..ca2e721 100644 --- a/ghc/includes/Stable.h +++ b/ghc/includes/Stable.h @@ -1,7 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: Stable.h,v 1.14 2002/12/19 14:25:04 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,17 +40,27 @@ extern DLL_IMPORT_RTS snEntry *stable_ptr_table; extern void freeStablePtr(StgStablePtr sp); -#ifndef RTS_STABLE_C +#if defined(__GNUC__) +# ifndef RTS_STABLE_C extern inline -#endif +# 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