/* -----------------------------------------------------------------------------
- * $Id: BlockAlloc.c,v 1.16 2003/02/18 05:47:53 sof Exp $
+ * $Id: BlockAlloc.c,v 1.17 2003/11/12 17:49:05 sof Exp $
*
* (c) The GHC Team 1998-2000
*
Allocation
-------------------------------------------------------------------------- */
-static inline void
+STATIC_INLINE void
initGroup(nat n, bdescr *head)
{
bdescr *bd;
* pointer to the newly enlarged group p.
*/
-static inline bdescr *
+STATIC_INLINE bdescr *
coalesce(bdescr *p)
{
bdescr *bd, *q;
/* -----------------------------------------------------------------------------
- * $Id: BlockAlloc.h,v 1.9 2001/05/03 16:32:55 simonmar Exp $
+ * $Id: BlockAlloc.h,v 1.10 2003/11/12 17:49:06 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
#define WORDS_PER_MBLOCK (BLOCKS_PER_MBLOCK * BLOCK_SIZE_W)
-static inline nat
+INLINE_HEADER nat
round_to_mblocks(nat words)
{
if (words > WORDS_PER_MBLOCK) {
fprintf(stderr,"worker thread (%p): released capability\n",
osThreadId()));
#endif
- return;
+ return;
}
#if defined(RTS_SUPPORTS_THREADS)
/* -----------------------------------------------------------------------------
- * $Id: Exception.h,v 1.6 2003/07/12 00:11:20 sof Exp $
+ * $Id: Exception.h,v 1.7 2003/11/12 17:49:07 sof Exp $
*
* (c) The GHC Team, 1998-2000
*
* indefinitely). Interruptible threads can be sent an exception with
* killThread# even if they have async exceptions blocked.
*/
-static __inline__ int
+INLINE_HEADER int
interruptible(StgTSO *t)
{
switch (t->why_blocked) {
/* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.162 2003/10/24 11:45:40 simonmar Exp $
+ * $Id: GC.c,v 1.163 2003/11/12 17:49:07 sof Exp $
*
* (c) The GHC Team 1998-2003
*
static bdescr *oldgen_scan_bd;
static StgPtr oldgen_scan;
-static inline rtsBool
+STATIC_INLINE rtsBool
mark_stack_empty(void)
{
return mark_sp == mark_stack;
}
-static inline rtsBool
+STATIC_INLINE rtsBool
mark_stack_full(void)
{
return mark_sp >= mark_splim;
}
-static inline void
+STATIC_INLINE void
reset_mark_stack(void)
{
mark_sp = mark_stack;
}
-static inline void
+STATIC_INLINE void
push_mark_stack(StgPtr p)
{
*mark_sp++ = p;
}
-static inline StgPtr
+STATIC_INLINE StgPtr
pop_mark_stack(void)
{
return *--mark_sp;
default:
barf("traverse_weak_ptr_list");
+ return rtsTrue;
}
}
*root = evacuate(*root);
}
-static __inline__ void
+STATIC_INLINE void
upd_evacuee(StgClosure *p, StgClosure *dest)
{
// Source object must be in from-space:
}
-static __inline__ StgClosure *
+STATIC_INLINE StgClosure *
copy(StgClosure *src, nat size, step *stp)
{
P_ to, from, dest;
-------------------------------------------------------------------------- */
-static inline void
+STATIC_INLINE void
evacuate_large(StgPtr p)
{
bdescr *bd = Bdescr(p);
* srt field in the info table. That's ok, because we'll
* never dereference it.
*/
-static inline void
+STATIC_INLINE void
scavenge_srt (StgClosure **srt, nat srt_bitmap)
{
nat bitmap;
}
-static inline void
+STATIC_INLINE void
scavenge_thunk_srt(const StgInfoTable *info)
{
StgThunkInfoTable *thunk_info;
scavenge_srt((StgClosure **)thunk_info->srt, thunk_info->i.srt_bitmap);
}
-static inline void
+STATIC_INLINE void
scavenge_fun_srt(const StgInfoTable *info)
{
StgFunInfoTable *fun_info;
scavenge_srt((StgClosure **)fun_info->srt, fun_info->i.srt_bitmap);
}
-static inline void
+STATIC_INLINE void
scavenge_ret_srt(const StgInfoTable *info)
{
StgRetInfoTable *ret_info;
in PAPs.
-------------------------------------------------------------------------- */
-static inline StgPtr
+STATIC_INLINE StgPtr
scavenge_arg_block (StgFunInfoTable *fun_info, StgClosure **args)
{
StgPtr p;
return p;
}
-static inline StgPtr
+STATIC_INLINE StgPtr
scavenge_PAP (StgPAP *pap)
{
StgPtr p;
}
}
-static inline StgPtr
+STATIC_INLINE StgPtr
scavenge_small_bitmap (StgPtr p, nat size, StgWord bitmap)
{
while (size > 0) {
void *gap_start, *next_gap_start, *gap_end;
nat chunk_size;
- next_gap_start = (void *)gap + sizeof(StgUpdateFrame);
+ next_gap_start = (void *)((unsigned char*)gap + sizeof(StgUpdateFrame));
sp = next_gap_start;
while ((StgPtr)gap > tso->sp) {
// we're working in *bytes* now...
gap_start = next_gap_start;
- gap_end = gap_start - gap->gap_size * sizeof(W_);
+ gap_end = (void*) ((unsigned char*)gap_start - gap->gap_size * sizeof(W_));
gap = gap->next_gap;
- next_gap_start = (void *)gap + sizeof(StgUpdateFrame);
+ next_gap_start = (void *)((unsigned char*)gap + sizeof(StgUpdateFrame));
- chunk_size = gap_end - next_gap_start;
- sp -= chunk_size;
+ chunk_size = (unsigned char*)gap_end - (unsigned char*)next_gap_start;
+ (unsigned char*)sp -= chunk_size;
memmove(sp, next_gap_start, chunk_size);
}
fputc('\n', stderr);
}
-static inline rtsBool
+STATIC_INLINE rtsBool
maybeLarge(StgClosure *closure)
{
StgInfoTable *info = get_itbl(closure);
/* -----------------------------------------------------------------------------
- * $Id: GCCompact.c,v 1.17 2003/10/22 11:11:59 simonmar Exp $
+ * $Id: GCCompact.c,v 1.18 2003/11/12 17:49:07 sof Exp $
*
* (c) The GHC Team 2001
*
// Turn off inlining when debugging - it obfuscates things
#ifdef DEBUG
-#define INLINE
-#else
-#define INLINE inline
+# undef STATIC_INLINE
+# define STATIC_INLINE static
#endif
/* -----------------------------------------------------------------------------
except for the info pointer.
-------------------------------------------------------------------------- */
-static INLINE void
+STATIC_INLINE void
thread( StgPtr p )
{
StgPtr q = (StgPtr)*p;
}
}
-static INLINE void
+STATIC_INLINE void
unthread( StgPtr p, StgPtr free )
{
StgPtr q = (StgPtr)*p, r;
*p = (StgWord)q;
}
-static INLINE StgInfoTable *
+STATIC_INLINE StgInfoTable *
get_threaded_info( StgPtr p )
{
StgPtr q = (P_)GET_INFO((StgClosure *)p);
// A word-aligned memmove will be faster for small objects than libc's or gcc's.
// Remember, the two regions *might* overlap, but: to <= from.
-static INLINE void
+STATIC_INLINE void
move(StgPtr to, StgPtr from, nat size)
{
for(; size > 0; --size) {
}
}
-static INLINE nat
+STATIC_INLINE nat
obj_sizeW( StgClosure *p, StgInfoTable *info )
{
switch (info->type) {
}
}
-static INLINE void
+STATIC_INLINE void
thread_large_bitmap( StgPtr p, StgLargeBitmap *large_bitmap, nat size )
{
nat i, b;
}
}
-static INLINE StgPtr
+STATIC_INLINE StgPtr
thread_arg_block (StgFunInfoTable *fun_info, StgClosure **args)
{
StgPtr p;
}
}
-static INLINE StgPtr
+STATIC_INLINE StgPtr
thread_PAP (StgPAP *pap)
{
StgPtr p;
return p;
}
-static INLINE StgPtr
+STATIC_INLINE StgPtr
thread_AP_STACK (StgAP_STACK *ap)
{
thread((StgPtr)&ap->fun);
}
}
-static INLINE StgPtr
+STATIC_INLINE StgPtr
thread_obj (StgInfoTable *info, StgPtr p)
{
switch (info->type) {
default:
barf("update_fwd: unknown/strange object %d", (int)(info->type));
+ return NULL;
}
}
/* -----------------------------------------------------------------------------
- * $Id: GCCompact.h,v 1.2 2001/07/30 13:06:18 simonmar Exp $
+ * $Id: GCCompact.h,v 1.3 2003/11/12 17:49:07 sof Exp $
*
* (c) The GHC Team 1998-1999
*
*
* ---------------------------------------------------------------------------*/
-static inline void
+INLINE_HEADER void
mark(StgPtr p, bdescr *bd)
{
nat offset_within_block = p - bd->start; // in words
*bitmap_word |= bit_mask;
}
-static inline void
+INLINE_HEADER void
unmark(StgPtr p, bdescr *bd)
{
nat offset_within_block = p - bd->start; // in words
*bitmap_word &= ~bit_mask;
}
-static inline int
+INLINE_HEADER int
is_marked(StgPtr p, bdescr *bd)
{
nat offset_within_block = p - bd->start; // in words
return (retcode);
-static inline StgPtr
+STATIC_INLINE StgPtr
allocate_UPD (int n_words)
{
return allocate(stg_max(sizeofW(StgHeader)+MIN_UPD_SIZE, n_words));
}
-static inline StgPtr
+STATIC_INLINE StgPtr
allocate_NONUPD (int n_words)
{
return allocate(stg_max(sizeofW(StgHeader)+MIN_NONUPD_SIZE, n_words));
#endif
// And restart the thread again, popping the RET_DYN frame.
- cap = (Capability *)((void *)resumeThread(tok,rtsFalse) - sizeof(StgFunTable));
+ cap = (Capability *)((void *)((unsigned char*)resumeThread(tok,rtsFalse) - sizeof(StgFunTable)));
LOAD_STACK_POINTERS;
Sp += ret_dyn_size;
/* -----------------------------------------------------------------------------
- * $Id: LdvProfile.c,v 1.5 2003/02/22 04:51:51 sof Exp $
+ * $Id: LdvProfile.c,v 1.6 2003/11/12 17:49:08 sof Exp $
*
* (c) The GHC Team, 2001
* Author: Sungwoo Park
* closure. Returns the size of the closure, including the profiling
* header portion, so that the caller can find the next closure.
* ----------------------------------------------------------------------- */
-static inline nat
+STATIC_INLINE nat
processHeapClosureForDead( StgClosure *c )
{
nat size;
/* -----------------------------------------------------------------------------
- * $Id: Printer.c,v 1.61 2003/10/16 20:54:12 sof Exp $
+ * $Id: Printer.c,v 1.62 2003/11/12 17:49:08 sof Exp $
*
* (c) The GHC Team, 1994-2000.
*
printClosure(obj);
}
-static inline void
+STATIC_INLINE void
printStdObjHdr( StgClosure *obj, char* tag )
{
fprintf(stderr,"%s(",tag);
/* -----------------------------------------------------------------------------
- * $Id: ProfHeap.c,v 1.49 2003/10/24 14:45:38 stolz Exp $
+ * $Id: ProfHeap.c,v 1.50 2003/11/12 17:49:08 sof Exp $
*
* (c) The GHC Team, 1998-2003
*
struct _counter *next;
} counter;
-static inline void
+STATIC_INLINE void
initLDVCtr( counter *ctr )
{
ctr->c.ldv.prim = 0;
* the band to which this closure's heap space is attributed in the
* heap profile.
* ------------------------------------------------------------------------- */
-static inline void *
+STATIC_INLINE void *
closureIdentity( StgClosure *p )
{
switch (RtsFlags.ProfFlags.doHeapProfile) {
* Profiling type predicates
* ----------------------------------------------------------------------- */
#ifdef PROFILING
-static inline rtsBool
+STATIC_INLINE rtsBool
doingLDVProfiling( void )
{
return (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_LDV
|| RtsFlags.ProfFlags.bioSelector != NULL);
}
-static inline rtsBool
+STATIC_INLINE rtsBool
doingRetainerProfiling( void )
{
return (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_RETAINER
/* --------------------------------------------------------------------------
* Initialize censuses[era];
* ----------------------------------------------------------------------- */
-static inline void
+STATIC_INLINE void
initEra(Census *census)
{
census->hash = allocHashTable();
/* -----------------------------------------------------------------------------
- * $Id: RetainerSet.c,v 1.4 2003/03/25 17:58:49 sof Exp $
+ * $Id: RetainerSet.c,v 1.5 2003/11/12 17:49:08 sof Exp $
*
* (c) The GHC Team, 2001
* Author: Sungwoo Park
/* -----------------------------------------------------------------------------
* calculate the size of a RetainerSet structure
* -------------------------------------------------------------------------- */
-static inline size_t
+STATIC_INLINE size_t
sizeofRetainerSet( int elems )
{
return (sizeof(RetainerSet) + elems * sizeof(retainer));
/* ----------------------------------------------------------------------------
- * $Id: RtsAPI.c,v 1.49 2003/10/01 10:49:07 wolfgang Exp $
+ * $Id: RtsAPI.c,v 1.50 2003/11/12 17:49:08 sof Exp $
*
* (c) The GHC Team, 1998-2001
*
HaskellObj
rts_mkInt64 (HsInt64 i)
{
- long long *tmp;
+ llong *tmp;
StgClosure *p = (StgClosure *)allocate(CONSTR_sizeW(0,2));
SET_HDR(p, I64zh_con_info, CCS_SYSTEM);
- tmp = (long long*)&(p->payload[0]);
+ tmp = (llong*)&(p->payload[0]);
*tmp = (StgInt64)i;
return p;
}
HaskellObj
rts_mkWord64 (HsWord64 w)
{
- unsigned long long *tmp;
+ ullong *tmp;
StgClosure *p = (StgClosure *)allocate(CONSTR_sizeW(0,2));
/* see mk_Int8 comment */
SET_HDR(p, W64zh_con_info, CCS_SYSTEM);
- tmp = (unsigned long long*)&(p->payload[0]);
+ tmp = (ullong*)&(p->payload[0]);
*tmp = (StgWord64)w;
return p;
}
/* -----------------------------------------------------------------------------
- * $Id: RtsFlags.c,v 1.71 2003/10/31 16:48:45 sof Exp $
+ * $Id: RtsFlags.c,v 1.72 2003/11/12 17:49:09 sof Exp $
*
* (c) The AQUA Project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999
0
};
-static inline rtsBool
+STATIC_INLINE rtsBool
strequal(const char *a, const char * b)
{
return(strcmp(a, b) == 0);
/* -----------------------------------------------------------------------------
- * $Id: RtsUtils.h,v 1.18 2003/09/26 12:11:18 panne Exp $
+ * $Id: RtsUtils.h,v 1.19 2003/11/12 17:49:10 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
extern void *stgCallocBytes(int n, int m, char *msg);
extern void stgFree(void* p);
-extern void barf(char *s, ...) __attribute__((__noreturn__)) ;
+extern void barf(char *s, ...) GNU_ATTRIBUTE(__noreturn__);
extern void belch(char *s, ...);
extern void prog_belch(char *s, ...);
extern nat stg_strlen(char *str);
-/*Defined in Main.c, but made visible here*/
-extern void stg_exit(int n) __attribute__((noreturn));
-
char *time_str(void);
char *ullong_format_string(ullong, char *, rtsBool);
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.179 2003/10/05 20:18:36 panne Exp $
+ * $Id: Schedule.c,v 1.180 2003/11/12 17:49:10 sof Exp $
*
* (c) The GHC Team, 1998-2000
*
/* in a GranSim setup the TSO stays on the run queue */
t = CurrentTSO;
/* Take a thread from the run queue. */
- t = POP_RUN_QUEUE(); // take_off_run_queue(t);
+ POP_RUN_QUEUE(t); // take_off_run_queue(t);
IF_DEBUG(gran,
fprintf(stderr, "GRAN: About to run current thread, which is\n");
ASSERT(run_queue_hd != END_TSO_QUEUE);
/* Take a thread from the run queue, if we have work */
- t = POP_RUN_QUEUE(); // take_off_run_queue(END_TSO_QUEUE);
+ POP_RUN_QUEUE(t); // take_off_run_queue(END_TSO_QUEUE);
IF_DEBUG(sanity,checkTSO(t));
/* ToDo: write something to the log-file
/* grab a thread from the run queue */
ASSERT(run_queue_hd != END_TSO_QUEUE);
- t = POP_RUN_QUEUE();
+ POP_RUN_QUEUE(t);
// Sanity check the thread we're about to run. This can be
// expensive if there is lots of thread switching going on...
IF_DEBUG(sanity,checkTSO(t));
/* assume that *reg is a pointer to the StgRegTable part
* of a Capability.
*/
- cap = (Capability *)((void *)reg - sizeof(StgFunTable));
+ cap = (Capability *)((void *)((unsigned char*)reg - sizeof(StgFunTable)));
ACQUIRE_LOCK(&sched_mutex);
if (tso->stack_size >= tso->max_stack_size) {
IF_DEBUG(gc,
- belch("@@ threadStackOverflow of TSO %d (%p): stack too large (now %ld; max is %ld",
+ belch("@@ threadStackOverflow of TSO %d (%p): stack too large (now %ld; max is %ld)",
tso->id, tso, tso->stack_size, tso->max_stack_size);
/* If we're debugging, just print out the top of the stack */
printStackChunk(tso->sp, stg_min(tso->stack+tso->stack_size,
------------------------------------------------------------------------ */
#if defined(GRAN)
-static inline void
+STATIC_INLINE void
unblockCount ( StgBlockingQueueElement *bqe, StgClosure *node )
{
}
#elif defined(PAR)
-static inline void
+STATIC_INLINE void
unblockCount ( StgBlockingQueueElement *bqe, StgClosure *node )
{
/* write RESUME events to log file and
#endif
#if defined(GRAN) || defined(PAR)
-inline StgBlockingQueueElement *
+INLINE_ME StgBlockingQueueElement *
unblockOne(StgBlockingQueueElement *bqe, StgClosure *node)
{
ACQUIRE_LOCK(&sched_mutex);
return bqe;
}
#else
-inline StgTSO *
+INLINE_ME StgTSO *
unblockOne(StgTSO *tso)
{
ACQUIRE_LOCK(&sched_mutex);
/* -----------------------------------------------------------------------------
- * $Id: Schedule.h,v 1.41 2003/10/01 10:57:43 wolfgang Exp $
+ * $Id: Schedule.h,v 1.42 2003/11/12 17:49:11 sof Exp $
*
* (c) The GHC Team 1998-1999
*
/* Pop the first thread off the runnable queue.
*/
-#define POP_RUN_QUEUE() \
- ({ StgTSO *t = run_queue_hd; \
- if (t != END_TSO_QUEUE) { \
- run_queue_hd = t->link; \
- t->link = END_TSO_QUEUE; \
+#define POP_RUN_QUEUE(pt) \
+ do { StgTSO *__tmp_t = run_queue_hd; \
+ if (__tmp_t != END_TSO_QUEUE) { \
+ run_queue_hd = __tmp_t->link; \
+ __tmp_t->link = END_TSO_QUEUE; \
if (run_queue_hd == END_TSO_QUEUE) { \
run_queue_tl = END_TSO_QUEUE; \
} \
} \
- t; \
- })
+ pt = __tmp_t; \
+ } while(0)
/* Add a thread to the end of the blocked queue.
*/
/* ---------------------------------------------------------------------------
- * $Id: Sparks.c,v 1.6 2003/03/25 17:58:50 sof Exp $
+ * $Id: Sparks.c,v 1.7 2003/11/12 17:49:11 sof Exp $
*
* (c) The GHC Team, 2000
*
Granularity info transformers.
Applied to the GRAN_INFO field of a spark.
*/
-static inline nat ID(nat x) { return(x); };
-static inline nat INV(nat x) { return(-x); };
-static inline nat IGNORE(nat x) { return (0); };
-static inline nat RAND(nat x) { return ((random() % MAX_RAND_PRI) + 1); }
+STATIC_INLINE nat ID(nat x) { return(x); };
+STATIC_INLINE nat INV(nat x) { return(-x); };
+STATIC_INLINE nat IGNORE(nat x) { return (0); };
+STATIC_INLINE nat RAND(nat x) { return ((random() % MAX_RAND_PRI) + 1); }
/* NB: size_info and par_info are currently unused (what a shame!) -- HWL */
//@cindex newSpark
/* -----------------------------------------------------------------------------
- * $Id: Stable.c,v 1.26 2003/06/24 13:45:49 stolz Exp $
+ * $Id: Stable.c,v 1.27 2003/11/12 17:49:11 sof Exp $
*
* (c) The GHC Team, 1998-2002
*
#define INIT_SPT_SIZE 64
-static inline void
+STATIC_INLINE void
initFreeList(snEntry *table, nat n, snEntry *free)
{
snEntry *p;
}
}
-static inline void
+STATIC_INLINE void
freeStableName(snEntry *sn)
{
ASSERT(sn->sn_obj == NULL);
/* -----------------------------------------------------------------------------
- * $Id: Storage.h,v 1.52 2003/04/22 16:25:12 simonmar Exp $
+ * $Id: Storage.h,v 1.53 2003/11/12 17:49:11 sof Exp $
*
* (c) The GHC Team, 1998-2002
*
extern StgPtr allocatePinned ( nat n );
extern lnat allocated_bytes ( void );
-static inline rtsBool
+INLINE_HEADER rtsBool
doYouWantToGC( void )
{
return (alloc_blocks >= alloc_blocks_lim);
/* ToDo: shouldn't recordMutable and recordOldToNewPtrs acquire some
* kind of lock in the SMP case?
*/
-static inline void
+INLINE_HEADER void
recordMutable(StgMutClosure *p)
{
bdescr *bd;
}
}
-static inline void
+INLINE_HEADER void
recordOldToNewPtrs(StgMutClosure *p)
{
bdescr *bd;
}
#if defined(TICKY_TICKY) || defined(PROFILING)
-static inline void
+INLINE_HEADER void
updateWithPermIndirection(const StgInfoTable *info, StgClosure *p1, StgClosure *p2)
{
bdescr *bd;
Macros for calculating how big a closure will be (used during allocation)
-------------------------------------------------------------------------- */
-static __inline__ StgOffset PAP_sizeW ( nat n_args )
+INLINE_HEADER StgOffset PAP_sizeW ( nat n_args )
{ return sizeofW(StgPAP) + n_args; }
-static __inline__ StgOffset AP_STACK_sizeW ( nat size )
+INLINE_HEADER StgOffset AP_STACK_sizeW ( nat size )
{ return sizeofW(StgAP_STACK) + size; }
-static __inline__ StgOffset CONSTR_sizeW( nat p, nat np )
+INLINE_HEADER StgOffset CONSTR_sizeW( nat p, nat np )
{ return sizeofW(StgHeader) + p + np; }
-static __inline__ StgOffset THUNK_SELECTOR_sizeW ( void )
+INLINE_HEADER StgOffset THUNK_SELECTOR_sizeW ( void )
{ return sizeofW(StgHeader) + MIN_UPD_SIZE; }
-static __inline__ StgOffset BLACKHOLE_sizeW ( void )
+INLINE_HEADER StgOffset BLACKHOLE_sizeW ( void )
{ return sizeofW(StgHeader) + MIN_UPD_SIZE; }
/* --------------------------------------------------------------------------
Sizes of closures
------------------------------------------------------------------------*/
-static __inline__ StgOffset sizeW_fromITBL( const StgInfoTable* itbl )
+INLINE_HEADER StgOffset sizeW_fromITBL( const StgInfoTable* itbl )
{ return sizeofW(StgClosure)
+ sizeofW(StgPtr) * itbl->layout.payload.ptrs
+ sizeofW(StgWord) * itbl->layout.payload.nptrs; }
-static __inline__ StgOffset ap_stack_sizeW( StgAP_STACK* x )
+INLINE_HEADER StgOffset ap_stack_sizeW( StgAP_STACK* x )
{ return AP_STACK_sizeW(x->size); }
-static __inline__ StgOffset pap_sizeW( StgPAP* x )
+INLINE_HEADER StgOffset pap_sizeW( StgPAP* x )
{ return PAP_sizeW(x->n_args); }
-static __inline__ StgOffset arr_words_sizeW( StgArrWords* x )
+INLINE_HEADER StgOffset arr_words_sizeW( StgArrWords* x )
{ return sizeofW(StgArrWords) + x->words; }
-static __inline__ StgOffset mut_arr_ptrs_sizeW( StgMutArrPtrs* x )
+INLINE_HEADER StgOffset mut_arr_ptrs_sizeW( StgMutArrPtrs* x )
{ return sizeofW(StgMutArrPtrs) + x->ptrs; }
-static __inline__ StgWord tso_sizeW ( StgTSO *tso )
+INLINE_HEADER StgWord tso_sizeW ( StgTSO *tso )
{ return TSO_STRUCT_SIZEW + tso->stack_size; }
-static __inline__ StgWord bco_sizeW ( StgBCO *bco )
+INLINE_HEADER StgWord bco_sizeW ( StgBCO *bco )
{ return bco->size; }
/* -----------------------------------------------------------------------------
Sizes of stack frames
-------------------------------------------------------------------------- */
-static inline StgWord stack_frame_sizeW( StgClosure *frame )
+INLINE_HEADER StgWord stack_frame_sizeW( StgClosure *frame )
{
StgRetInfoTable *info;
/* -----------------------------------------------------------------------------
- * $Id: StoragePriv.h,v 1.24 2002/12/19 14:33:23 simonmar Exp $
+ * $Id: StoragePriv.h,v 1.25 2003/11/12 17:49:11 sof Exp $
*
* (c) The GHC Team, 1998-1999
*
extern lnat calcLive ( void );
extern lnat calcNeeded ( void );
-static inline void
+INLINE_HEADER void
dbl_link_onto(bdescr *bd, bdescr **list)
{
bd->link = *list;