Commit a814590c authored by sof's avatar sof
Browse files

[project @ 2003-11-12 17:27:00 by sof]

Tidy up a couple of unportable coding issues:

- conditionally use empty structs.
- use GNU attributes only if supported.
- 'long long' usage
- use of 'inline' in declarations and definitions.

Upshot of these changes is that MSVC is now capable of compiling
the non-.hc portions of the RTS.
parent eacd5715
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Block.h,v 1.14 2003/09/23 15:38:35 simonmar Exp $ * $Id: Block.h,v 1.15 2003/11/12 17:27:00 sof Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -82,7 +82,7 @@ typedef struct _bdescr { ...@@ -82,7 +82,7 @@ typedef struct _bdescr {
/* Finding the block descriptor for a given block -------------------------- */ /* Finding the block descriptor for a given block -------------------------- */
static inline bdescr *Bdescr(StgPtr p) INLINE_HEADER bdescr *Bdescr(StgPtr p)
{ {
return (bdescr *) return (bdescr *)
((((W_)p & MBLOCK_MASK & ~BLOCK_MASK) >> (BLOCK_SHIFT-BDESCR_SHIFT)) ((((W_)p & MBLOCK_MASK & ~BLOCK_MASK) >> (BLOCK_SHIFT-BDESCR_SHIFT))
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* $Id: ClosureMacros.h,v 1.37 2003/06/30 14:17:02 simonmar Exp $ * $Id: ClosureMacros.h,v 1.38 2003/11/12 17:27:00 sof Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
#define RET_INFO_PTR_TO_STRUCT(info) ((StgRetInfoTable *)(info) - 1) #define RET_INFO_PTR_TO_STRUCT(info) ((StgRetInfoTable *)(info) - 1)
#define FUN_INFO_PTR_TO_STRUCT(info) ((StgFunInfoTable *)(info) - 1) #define FUN_INFO_PTR_TO_STRUCT(info) ((StgFunInfoTable *)(info) - 1)
#define THUNK_INFO_PTR_TO_STRUCT(info) ((StgThunkInfoTable *)(info) - 1) #define THUNK_INFO_PTR_TO_STRUCT(info) ((StgThunkInfoTable *)(info) - 1)
static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) { INLINE_HEADER StgFunPtr get_entry(const StgInfoTable *itbl) {
return (StgFunPtr)(itbl+1); return (StgFunPtr)(itbl+1);
} }
#define itbl_to_fun_itbl(i) ((StgFunInfoTable *)(((StgInfoTable *)(i) + 1)) - 1) #define itbl_to_fun_itbl(i) ((StgFunInfoTable *)(((StgInfoTable *)(i) + 1)) - 1)
...@@ -83,7 +83,7 @@ static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) { ...@@ -83,7 +83,7 @@ static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
#define RET_INFO_PTR_TO_STRUCT(info) ((StgRetInfoTable *)info) #define RET_INFO_PTR_TO_STRUCT(info) ((StgRetInfoTable *)info)
#define FUN_INFO_PTR_TO_STRUCT(info) ((StgFunInfoTable *)info) #define FUN_INFO_PTR_TO_STRUCT(info) ((StgFunInfoTable *)info)
#define THUNK_INFO_PTR_TO_STRUCT(info) ((StgThunkInfoTable *)info) #define THUNK_INFO_PTR_TO_STRUCT(info) ((StgThunkInfoTable *)info)
static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) { INLINE_HEADER StgFunPtr get_entry(const StgInfoTable *itbl) {
return itbl->entry; return itbl->entry;
} }
#define itbl_to_fun_itbl(i) ((StgFunInfoTable *)(i)) #define itbl_to_fun_itbl(i) ((StgFunInfoTable *)(i))
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* $Id: InfoTables.h,v 1.29 2003/05/14 09:14:02 simonmar Exp $ * $Id: InfoTables.h,v 1.30 2003/11/12 17:27:00 sof Exp $
* *
* (c) The GHC Team, 1998-2002 * (c) The GHC Team, 1998-2002
* *
...@@ -85,9 +85,11 @@ typedef struct { ...@@ -85,9 +85,11 @@ typedef struct {
Ticky info Ticky info
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#if defined(SUPPORTS_EMPTY_STRUCTS)
typedef struct { typedef struct {
/* empty */ /* empty */
} StgTickyInfo; } StgTickyInfo;
#endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Debugging info Debugging info
...@@ -101,9 +103,11 @@ typedef struct { ...@@ -101,9 +103,11 @@ typedef struct {
#else /* !DEBUG_CLOSURE */ #else /* !DEBUG_CLOSURE */
typedef struct { # if defined(SUPPORTS_EMPTY_STRUCTS)
typedef struct StgDebugInfo {
/* empty */ /* empty */
} StgDebugInfo; } StgDebugInfo;
# endif
#endif /* DEBUG_CLOSURE */ #endif /* DEBUG_CLOSURE */
...@@ -249,10 +253,10 @@ typedef struct _StgInfoTable { ...@@ -249,10 +253,10 @@ typedef struct _StgInfoTable {
StgProfInfo prof; StgProfInfo prof;
#endif #endif
#ifdef TICKY #ifdef TICKY
StgTickyInfo ticky; MAYBE_EMPTY_STRUCT(StgTickyInfo,ticky)
#endif #endif
#ifdef DEBUG_CLOSURE #ifdef DEBUG_CLOSURE
StgDebugInfo debug; MAYBE_EMPTY_STRUCT(StgDebugInfo,debug)
#endif #endif
StgClosureInfo layout; // closure layout info (one word) StgClosureInfo layout; // closure layout info (one word)
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: PrimOps.h,v 1.106 2003/10/01 10:57:41 wolfgang Exp $ * $Id: PrimOps.h,v 1.107 2003/11/12 17:27:01 sof Exp $
* *
* (c) The GHC Team, 1998-2000 * (c) The GHC Team, 1998-2000
* *
...@@ -256,8 +256,7 @@ EXTFUN_RTS(catchzh_fast); ...@@ -256,8 +256,7 @@ EXTFUN_RTS(catchzh_fast);
EXTFUN_RTS(raisezh_fast); EXTFUN_RTS(raisezh_fast);
EXTFUN_RTS(raiseIOzh_fast); EXTFUN_RTS(raiseIOzh_fast);
extern void stg_exit(int n) __attribute__ ((noreturn)); extern void stg_exit(int n) GNU_ATTRIBUTE(__noreturn__);
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Stable Name / Stable Pointer PrimOps Stable Name / Stable Pointer PrimOps
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Rts.h,v 1.22 2002/12/19 17:57:39 panne Exp $ * $Id: Rts.h,v 1.23 2003/11/12 17:27:03 sof Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -96,12 +96,21 @@ extern void* GetFiberData ( void ); ...@@ -96,12 +96,21 @@ extern void* GetFiberData ( void );
#define STG_UNUSED #define STG_UNUSED
#endif #endif
#if defined(__GNUC__)
#define SUPPORTS_TYPEOF
#endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
Useful macros and inline functions Useful macros and inline functions
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
#if defined(SUPPORTS_TYPEOF)
#define stg_min(a,b) ({typeof(a) _a = (a), _b = (b); _a <= _b ? _a : _b; }) #define stg_min(a,b) ({typeof(a) _a = (a), _b = (b); _a <= _b ? _a : _b; })
#define stg_max(a,b) ({typeof(a) _a = (a), _b = (b); _a <= _b ? _b : _a; }) #define stg_max(a,b) ({typeof(a) _a = (a), _b = (b); _a <= _b ? _b : _a; })
#else
#define stg_min(a,b) ((a) <= (b) ? (a) : (b))
#define stg_max(a,b) ((a) <= (b) ? (b) : (a))
#endif
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
......
...@@ -17,7 +17,13 @@ typedef unsigned long nat; /* at least 32 bits (like int) */ ...@@ -17,7 +17,13 @@ typedef unsigned long nat; /* at least 32 bits (like int) */
typedef unsigned int nat; /* at least 32 bits (like int) */ typedef unsigned int nat; /* at least 32 bits (like int) */
#endif #endif
typedef unsigned long lnat; /* at least 32 bits */ typedef unsigned long lnat; /* at least 32 bits */
#ifndef _MSC_VER
typedef unsigned long long ullong; /* at least 32 bits */ typedef unsigned long long ullong; /* at least 32 bits */
typedef long long llong;
#else
typedef unsigned __int64 ullong; /* at least 32 bits */
typedef __int64 llong;
#endif
/* ullong (64|128-bit) type: only include if needed (not ANSI) */ /* ullong (64|128-bit) type: only include if needed (not ANSI) */
#if defined(__GNUC__) #if defined(__GNUC__)
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: SchedAPI.h,v 1.18 2003/09/21 22:20:53 wolfgang Exp $ * $Id: SchedAPI.h,v 1.19 2003/11/12 17:27:03 sof Exp $
* *
* (c) The GHC Team 1998-2002 * (c) The GHC Team 1998-2002
* *
...@@ -34,12 +34,12 @@ extern void scheduleThread(StgTSO *tso); ...@@ -34,12 +34,12 @@ extern void scheduleThread(StgTSO *tso);
extern SchedulerStatus scheduleWaitThread(StgTSO *tso, /*out*/HaskellObj* ret, extern SchedulerStatus scheduleWaitThread(StgTSO *tso, /*out*/HaskellObj* ret,
Capability *initialCapability); Capability *initialCapability);
static inline void pushClosure (StgTSO *tso, StgWord c) { INLINE_HEADER void pushClosure (StgTSO *tso, StgWord c) {
tso->sp--; tso->sp--;
tso->sp[0] = (W_) c; tso->sp[0] = (W_) c;
} }
static inline StgTSO * INLINE_HEADER StgTSO *
createGenThread(nat stack_size, StgClosure *closure) { createGenThread(nat stack_size, StgClosure *closure) {
StgTSO *t; StgTSO *t;
#if defined(GRAN) #if defined(GRAN)
...@@ -52,7 +52,7 @@ createGenThread(nat stack_size, StgClosure *closure) { ...@@ -52,7 +52,7 @@ createGenThread(nat stack_size, StgClosure *closure) {
return t; return t;
} }
static inline StgTSO * INLINE_HEADER StgTSO *
createIOThread(nat stack_size, StgClosure *closure) { createIOThread(nat stack_size, StgClosure *closure) {
StgTSO *t; StgTSO *t;
#if defined(GRAN) #if defined(GRAN)
...@@ -72,7 +72,7 @@ createIOThread(nat stack_size, StgClosure *closure) { ...@@ -72,7 +72,7 @@ createIOThread(nat stack_size, StgClosure *closure) {
* to whnf while we're at it. * to whnf while we're at it.
*/ */
static inline StgTSO * INLINE_HEADER StgTSO *
createStrictIOThread(nat stack_size, StgClosure *closure) { createStrictIOThread(nat stack_size, StgClosure *closure) {
StgTSO *t; StgTSO *t;
#if defined(GRAN) #if defined(GRAN)
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Stable.h,v 1.14 2002/12/19 14:25:04 simonmar Exp $ * $Id: Stable.h,v 1.15 2003/11/12 17:27:03 sof Exp $
* *
* (c) The GHC Team, 1998-2000 * (c) The GHC Team, 1998-2000
* *
...@@ -41,17 +41,18 @@ extern DLL_IMPORT_RTS snEntry *stable_ptr_table; ...@@ -41,17 +41,18 @@ extern DLL_IMPORT_RTS snEntry *stable_ptr_table;
extern void freeStablePtr(StgStablePtr sp); extern void freeStablePtr(StgStablePtr sp);
#ifndef RTS_STABLE_C #if defined(__GNUC__)
# ifndef RTS_STABLE_C
extern inline extern inline
#endif # endif
StgPtr deRefStablePtr(StgStablePtr sp) StgPtr deRefStablePtr(StgStablePtr sp)
{ {
ASSERT(stable_ptr_table[(StgWord)sp].ref > 0); ASSERT(stable_ptr_table[(StgWord)sp].ref > 0);
return stable_ptr_table[(StgWord)sp].addr; return stable_ptr_table[(StgWord)sp].addr;
} }
#else
/* No deRefStableName, because the existence of a stable name doesn't /* No support for 'extern inline' */
* guarantee the existence of the object itself. extern StgPtr deRefStablePtr(StgStablePtr sp);
*/ #endif
#endif #endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Stg.h,v 1.56 2003/09/21 13:22:01 igloo Exp $ * $Id: Stg.h,v 1.57 2003/11/12 17:27:04 sof Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -82,6 +82,41 @@ ...@@ -82,6 +82,41 @@
# define LAZY_BLACKHOLING # define LAZY_BLACKHOLING
#endif #endif
#if defined(__GNUC__)
#define GNU_ATTRIBUTE(at) __attribute__((at))
#else
#define GNU_ATTRIBUTE(at)
#endif
/*
* Empty structures isn't supported by all, so to define
* empty structures, please protect the defn with an
* #if SUPPORTS_EMPTY_STRUCTS. Similarly for use,
* employ the macro MAYBE_EMPTY_STRUCT():
*
* MAYBE_EMPTY_STRUCT(structFoo, fieldName);
*/
#if SUPPORTS_EMPTY_STRUCTS
# define MAYBE_EMPTY_STRUCT(a,b) a b;
#else
# define MAYBE_EMPTY_STRUCT(a,b) /* empty */
#endif
/*
* 'Portable'
*/
#if defined(__GNUC__)
# define INLINE_HEADER static inline
# define INLINE_ME inline
# define STATIC_INLINE INLINE_HEADER
#elif defined(_MSC_VER)
# define INLINE_HEADER __inline static
# define INLINE_ME __inline
# define STATIC_INLINE INLINE_HEADER
#else
# error "Don't know how to inline functions with your C compiler."
#endif
/* TABLES_NEXT_TO_CODE says whether to assume that info tables are /* TABLES_NEXT_TO_CODE says whether to assume that info tables are
* assumed to reside just before the code for a function. * assumed to reside just before the code for a function.
* *
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: StgMacros.h,v 1.56 2003/08/05 14:01:34 simonpj Exp $ * $Id: StgMacros.h,v 1.57 2003/11/12 17:27:04 sof Exp $
* *
* (c) The GHC Team, 1998-1999 * (c) The GHC Team, 1998-1999
* *
...@@ -483,24 +483,24 @@ EXTFUN_RTS(stg_gen_block); ...@@ -483,24 +483,24 @@ EXTFUN_RTS(stg_gen_block);
guaranteed to be StgWord aligned. guaranteed to be StgWord aligned.
-------------------------------------------------------------------------- */ -------------------------------------------------------------------------- */
static inline void ASSIGN_FLT (W_ [], StgFloat); INLINE_HEADER void ASSIGN_FLT (W_ [], StgFloat);
static inline StgFloat PK_FLT (W_ []); INLINE_HEADER StgFloat PK_FLT (W_ []);
#if ALIGNMENT_FLOAT <= ALIGNMENT_LONG #if ALIGNMENT_FLOAT <= ALIGNMENT_LONG
static inline void ASSIGN_FLT(W_ p_dest[], StgFloat src) { *(StgFloat *)p_dest = src; } INLINE_HEADER void ASSIGN_FLT(W_ p_dest[], StgFloat src) { *(StgFloat *)p_dest = src; }
static inline StgFloat PK_FLT (W_ p_src[]) { return *(StgFloat *)p_src; } INLINE_HEADER StgFloat PK_FLT (W_ p_src[]) { return *(StgFloat *)p_src; }
#else /* ALIGNMENT_FLOAT > ALIGNMENT_UNSIGNED_INT */ #else /* ALIGNMENT_FLOAT > ALIGNMENT_UNSIGNED_INT */
static inline void ASSIGN_FLT(W_ p_dest[], StgFloat src) INLINE_HEADER void ASSIGN_FLT(W_ p_dest[], StgFloat src)
{ {
float_thing y; float_thing y;
y.f = src; y.f = src;
*p_dest = y.fu; *p_dest = y.fu;
} }
static inline StgFloat PK_FLT(W_ p_src[]) INLINE_HEADER StgFloat PK_FLT(W_ p_src[])
{ {
float_thing y; float_thing y;
y.fu = *p_src; y.fu = *p_src;
...@@ -511,11 +511,11 @@ static inline StgFloat PK_FLT(W_ p_src[]) ...@@ -511,11 +511,11 @@ static inline StgFloat PK_FLT(W_ p_src[])
#if ALIGNMENT_DOUBLE <= ALIGNMENT_LONG #if ALIGNMENT_DOUBLE <= ALIGNMENT_LONG
static inline void ASSIGN_DBL (W_ [], StgDouble); INLINE_HEADER void ASSIGN_DBL (W_ [], StgDouble);
static inline StgDouble PK_DBL (W_ []); INLINE_HEADER StgDouble PK_DBL (W_ []);
static inline void ASSIGN_DBL(W_ p_dest[], StgDouble src) { *(StgDouble *)p_dest = src; } INLINE_HEADER void ASSIGN_DBL(W_ p_dest[], StgDouble src) { *(StgDouble *)p_dest = src; }
static inline StgDouble PK_DBL (W_ p_src[]) { return *(StgDouble *)p_src; } INLINE_HEADER StgDouble PK_DBL (W_ p_src[]) { return *(StgDouble *)p_src; }
#else /* ALIGNMENT_DOUBLE > ALIGNMENT_LONG */ #else /* ALIGNMENT_DOUBLE > ALIGNMENT_LONG */
...@@ -541,8 +541,8 @@ static inline StgDouble PK_DBL (W_ p_src[]) { return *(StgDou ...@@ -541,8 +541,8 @@ static inline StgDouble PK_DBL (W_ p_src[]) { return *(StgDou
#else /* ! sparc_TARGET_ARCH */ #else /* ! sparc_TARGET_ARCH */
static inline void ASSIGN_DBL (W_ [], StgDouble); INLINE_HEADER void ASSIGN_DBL (W_ [], StgDouble);
static inline StgDouble PK_DBL (W_ []); INLINE_HEADER StgDouble PK_DBL (W_ []);
typedef struct typedef struct
{ StgWord dhi; { StgWord dhi;
...@@ -554,7 +554,7 @@ typedef union ...@@ -554,7 +554,7 @@ typedef union
unpacked_double du; unpacked_double du;
} double_thing; } double_thing;
static inline void ASSIGN_DBL(W_ p_dest[], StgDouble src) INLINE_HEADER void ASSIGN_DBL(W_ p_dest[], StgDouble src)
{ {
double_thing y; double_thing y;
y.d = src; y.d = src;
...@@ -570,7 +570,7 @@ static inline void ASSIGN_DBL(W_ p_dest[], StgDouble src) ...@@ -570,7 +570,7 @@ static inline void ASSIGN_DBL(W_ p_dest[], StgDouble src)
*(p_dest+1) = ((double_thing) src).du.dlo \ *(p_dest+1) = ((double_thing) src).du.dlo \
*/ */
static inline StgDouble PK_DBL(W_ p_src[]) INLINE_HEADER StgDouble PK_DBL(W_ p_src[])
{ {
double_thing y; double_thing y;
y.du.dhi = p_src[0]; y.du.dhi = p_src[0];
...@@ -599,7 +599,7 @@ typedef union ...@@ -599,7 +599,7 @@ typedef union
unpacked_double_word wu; unpacked_double_word wu;
} word64_thing; } word64_thing;
static inline void ASSIGN_Word64(W_ p_dest[], StgWord64 src) INLINE_HEADER void ASSIGN_Word64(W_ p_dest[], StgWord64 src)
{ {
word64_thing y; word64_thing y;
y.w = src; y.w = src;
...@@ -607,7 +607,7 @@ static inline void ASSIGN_Word64(W_ p_dest[], StgWord64 src) ...@@ -607,7 +607,7 @@ static inline void ASSIGN_Word64(W_ p_dest[], StgWord64 src)
p_dest[1] = y.wu.dlo; p_dest[1] = y.wu.dlo;
} }
static inline StgWord64 PK_Word64(W_ p_src[]) INLINE_HEADER StgWord64 PK_Word64(W_ p_src[])
{ {
word64_thing y; word64_thing y;
y.wu.dhi = p_src[0]; y.wu.dhi = p_src[0];
...@@ -615,7 +615,7 @@ static inline StgWord64 PK_Word64(W_ p_src[]) ...@@ -615,7 +615,7 @@ static inline StgWord64 PK_Word64(W_ p_src[])
return(y.w); return(y.w);
} }
static inline void ASSIGN_Int64(W_ p_dest[], StgInt64 src) INLINE_HEADER void ASSIGN_Int64(W_ p_dest[], StgInt64 src)
{ {
int64_thing y; int64_thing y;
y.i = src; y.i = src;
...@@ -623,7 +623,7 @@ static inline void ASSIGN_Int64(W_ p_dest[], StgInt64 src) ...@@ -623,7 +623,7 @@ static inline void ASSIGN_Int64(W_ p_dest[], StgInt64 src)
p_dest[1] = y.iu.dlo; p_dest[1] = y.iu.dlo;
} }
static inline StgInt64 PK_Int64(W_ p_src[]) INLINE_HEADER StgInt64 PK_Int64(W_ p_src[])
{ {
int64_thing y; int64_thing y;
y.iu.dhi = p_src[0]; y.iu.dhi = p_src[0];
...@@ -633,22 +633,22 @@ static inline StgInt64 PK_Int64(W_ p_src[]) ...@@ -633,22 +633,22 @@ static inline StgInt64 PK_Int64(W_ p_src[])
#elif SIZEOF_VOID_P == 8 #elif SIZEOF_VOID_P == 8
static inline void ASSIGN_Word64(W_ p_dest[], StgWord64 src) INLINE_HEADER void ASSIGN_Word64(W_ p_dest[], StgWord64 src)
{ {
p_dest[0] = src; p_dest[0] = src;
} }
static inline StgWord64 PK_Word64(W_ p_src[]) INLINE_HEADER StgWord64 PK_Word64(W_ p_src[])
{ {
return p_src[0]; return p_src[0];
} }
static inline void ASSIGN_Int64(W_ p_dest[], StgInt64 src) INLINE_HEADER void ASSIGN_Int64(W_ p_dest[], StgInt64 src)
{ {
p_dest[0] = src; p_dest[0] = src;
} }
static inline StgInt64 PK_Int64(W_ p_src[]) INLINE_HEADER StgInt64 PK_Int64(W_ p_src[])
{ {
return p_src[0]; return p_src[0];
} }
...@@ -710,7 +710,7 @@ extern DLL_IMPORT_RTS const StgPolyInfoTable stg_catch_frame_info; ...@@ -710,7 +710,7 @@ extern DLL_IMPORT_RTS const StgPolyInfoTable stg_catch_frame_info;
#if IN_STG_CODE #if IN_STG_CODE
static __inline__ void INLINE_HEADER void
SaveThreadState(void) SaveThreadState(void)
{ {
StgTSO *tso; StgTSO *tso;
...@@ -732,7 +732,7 @@ SaveThreadState(void) ...@@ -732,7 +732,7 @@ SaveThreadState(void)
#endif #endif
} }
static __inline__ void INLINE_HEADER void
LoadThreadState (void) LoadThreadState (void)
{ {
StgTSO *tso; StgTSO *tso;
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: StgProf.h,v 1.16 2001/12/12 14:59:41 simonmar Exp $ * $Id: StgProf.h,v 1.17 2003/11/12 17:27:04 sof Exp $
* *
* (c) The GHC Team, 1998 * (c) The GHC Team, 1998
* *
...@@ -20,7 +20,7 @@ typedef struct _CostCentre { ...@@ -20,7 +20,7 @@ typedef struct _CostCentre {
/* used for accumulating costs at the end of the run... */ /* used for accumulating costs at the end of the run... */
unsigned long time_ticks; unsigned long time_ticks;
unsigned long long mem_alloc; ullong mem_alloc;
char is_caf; char is_caf;