Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
f832c312
Commit
f832c312
authored
Feb 08, 2001
by
simonmar
Browse files
[project @ 2001-02-08 14:36:21 by simonmar]
Fix bitrot in SMP code.
parent
5d895e50
Changes
4
Hide whitespace changes
Inline
Side-by-side
ghc/includes/SMP.h
View file @
f832c312
/* ----------------------------------------------------------------------------
* $Id: SMP.h,v 1.
1 1999/11/02 15:05:52
simonmar Exp $
* $Id: SMP.h,v 1.
2 2001/02/08 14:36:21
simonmar Exp $
*
* (c) The GHC Team, 1999
*
...
...
@@ -66,15 +66,15 @@
#define LOCK_CLOSURE(c) \
({ \
const StgInfoTable *__info; \
__info = &WHITEHOLE_info;
\
__info = &
stg_
WHITEHOLE_info; \
do { \
XCHG(__info,((StgClosure *)(c))->header.info); \
} while (__info == &WHITEHOLE_info); \
} while (__info == &
stg_
WHITEHOLE_info); \
__info; \
})
#define LOCK_THUNK(__info) \
CMPXCHG(R1.cl->header.info, __info, &WHITEHOLE_info);
CMPXCHG(R1.cl->header.info, __info, &
stg_
WHITEHOLE_info);
#define ACQUIRE_LOCK(mutex) pthread_mutex_lock(mutex);
#define RELEASE_LOCK(mutex) pthread_mutex_unlock(mutex);
...
...
ghc/rts/RtsAPI.c
View file @
f832c312
/* ----------------------------------------------------------------------------
* $Id: RtsAPI.c,v 1.2
4
2001/0
1/11 17:25:56
simonmar Exp $
* $Id: RtsAPI.c,v 1.2
5
2001/0
2/08 14:36:21
simonmar Exp $
*
* (c) The GHC Team, 1998-2001
*
...
...
@@ -356,7 +356,7 @@ rts_evalLazyIO (HaskellObj p, unsigned int stack_size, /*out*/HaskellObj *ret)
return
waitThread
(
tso
,
ret
);
}
#if defined(PAR)
|| defined(SMP)
#if defined(PAR)
/*
Needed in the parallel world for non-Main PEs, which do not get a piece
of work to start with --- they have to humbly ask for it
...
...
ghc/rts/StgMiscClosures.hc
View file @
f832c312
/* -----------------------------------------------------------------------------
* $Id: StgMiscClosures.hc,v 1.6
2
2001/0
1/31 10:12:08
simonmar Exp $
* $Id: StgMiscClosures.hc,v 1.6
3
2001/0
2/08 14:36:21
simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
...
...
@@ -398,7 +398,7 @@ STGFUN(stg_BLACKHOLE_entry)
bdescr *bd = Bdescr(R1.p);
if (bd->back != (bdescr *)BaseReg) {
if (bd->gen->no >= 1 || bd->step->no >= 1) {
CMPXCHG(R1.cl->header.info, &BLACKHOLE_info, &WHITEHOLE_info);
CMPXCHG(R1.cl->header.info, &
stg_
BLACKHOLE_info, &
stg_
WHITEHOLE_info);
} else {
EXTFUN_RTS(stg_gc_enter_1_hponly);
JMP_(stg_gc_enter_1_hponly);
...
...
@@ -447,7 +447,7 @@ STGFUN(stg_BLACKHOLE_BQ_entry)
bdescr *bd = Bdescr(R1.p);
if (bd->back != (bdescr *)BaseReg) {
if (bd->gen->no >= 1 || bd->step->no >= 1) {
CMPXCHG(R1.cl->header.info, &BLACKHOLE_info, &WHITEHOLE_info);
CMPXCHG(R1.cl->header.info, &
stg_
BLACKHOLE_info, &
stg_
WHITEHOLE_info);
} else {
EXTFUN_RTS(stg_gc_enter_1_hponly);
JMP_(stg_gc_enter_1_hponly);
...
...
@@ -538,7 +538,7 @@ STGFUN(stg_CAF_BLACKHOLE_entry)
bdescr *bd = Bdescr(R1.p);
if (bd->back != (bdescr *)BaseReg) {
if (bd->gen->no >= 1 || bd->step->no >= 1) {
CMPXCHG(R1.cl->header.info, &CAF_BLACKHOLE_info, &WHITEHOLE_info);
CMPXCHG(R1.cl->header.info, &
stg_
CAF_BLACKHOLE_info, &
stg_
WHITEHOLE_info);
} else {
EXTFUN_RTS(stg_gc_enter_1_hponly);
JMP_(stg_gc_enter_1_hponly);
...
...
ghc/rts/Storage.h
View file @
f832c312
/* -----------------------------------------------------------------------------
* $Id: Storage.h,v 1.2
5
2001/0
1/29 17:23:4
1 simonmar Exp $
* $Id: Storage.h,v 1.2
6
2001/0
2/08 14:36:2
1 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
...
...
@@ -103,6 +103,13 @@ extern void markCafs( void );
-------------------------------------------------------------------------- */
/*
* Storage manager mutex
*/
#ifdef SMP
extern
pthread_mutex_t
sm_mutex
;
#endif
/* ToDo: shouldn't recordMutable and recordOldToNewPtrs acquire some
* kind of lock in the SMP case?
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment