[project @ 2002-10-27 21:46:27 by wolfgang]
[ghc-hetmet.git] / ghc / rts / Interpreter.c
index 27c3c5c..95ddc48 100644 (file)
@@ -5,11 +5,16 @@
  * Copyright (c) 1994-2000.
  *
  * $RCSfile: Interpreter.c,v $
- * $Revision: 1.31 $
- * $Date: 2001/11/08 12:46:31 $
+ * $Revision: 1.34 $
+ * $Date: 2002/02/15 22:15:08 $
  * ---------------------------------------------------------------------------*/
 
+#if !defined(SMP)
 #include "PosixSource.h"
+#else
+/* Hack and slash.. */
+#include "Stg.h"
+#endif
 #include "Rts.h"
 #include "RtsAPI.h"
 #include "RtsUtils.h"
@@ -775,9 +780,9 @@ StgThreadReturnCode interpretBCO ( Capability* cap )
                  int o_itbl                = BCO_NEXT;
                  void(*marshall_fn)(void*) = (void (*)(void*))BCO_LIT(o_itbl);
                  SAVE_STACK_POINTERS;
-                 tok = suspendThread(cap);
+                 tok = suspendThread(&cap->r,rtsFalse);
                  marshall_fn ( (void*)(& StackWord(0) ) );
-                 cap = resumeThread(tok);
+                 cap = (Capability *)((void *)resumeThread(tok,rtsFalse) - sizeof(StgFunTable));
                  LOAD_STACK_POINTERS;
                  goto nextInsn;
               }