From 66cfe3cedfb885796a3f4cd2609017808d200ea1 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 25 Nov 2005 13:06:25 +0000 Subject: [PATCH 1/1] [project @ 2005-11-25 13:06:25 by simonmar] define wb() and xchg() for non-SMP versions of the RTS --- ghc/includes/SMP.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ghc/includes/SMP.h b/ghc/includes/SMP.h index d8f2aa1..88fc339 100644 --- a/ghc/includes/SMP.h +++ b/ghc/includes/SMP.h @@ -113,6 +113,18 @@ unlockClosure(StgClosure *p, StgInfoTable *info) #endif } -#endif /* SMP */ +#else /* !SMP */ + +#define wb() /* nothing */ + +INLINE_HEADER StgWord +xchg(StgPtr p, StgWord w) +{ + StgWord old = *p; + *p = w; + return old; +} + +#endif /* !SMP */ #endif /* SMP_H */ -- 1.7.10.4