/* ----------------------------------------------------------------------------
- * $Id: SMP.h,v 1.1 1999/11/02 15:05:52 simonmar Exp $
*
* (c) The GHC Team, 1999
*
#if defined(SMP)
-#if defined(INTERPRETER) \
- || defined(PROFILING) \
- || defined(TICKY_TICKY)
+#if defined(PROFILING) || defined(TICKY_TICKY)
#error Build options incompatible with SMP.
#endif
* (because another thread is altering it in parallel), we just jump
* to the new entry point.
*/
-#if defined(i386_TARGET_ARCH) && defined(TABLES_NEXT_TO_CODE)
+#if defined(i386_HOST_ARCH) && defined(TABLES_NEXT_TO_CODE)
#define CMPXCHG(p, cmp, new) \
__asm__ __volatile__ ( \
"lock ; cmpxchg %1, %0\n" \
#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);
-
-#define ACQUIRE_LOCK(mutex) pthread_mutex_lock(mutex);
-#define RELEASE_LOCK(mutex) pthread_mutex_unlock(mutex);
+ CMPXCHG(R1.cl->header.info, __info, &stg_WHITEHOLE_info);
#else /* !SMP */
#define LOCK_CLOSURE(c) /* nothing */
#define LOCK_THUNK(__info) /* nothing */
-#define ACQUIRE_LOCK(mutex) /* nothing */
-#define RELEASE_LOCK(mutex) /* nothing */
#endif /* SMP */