/* -----------------------------------------------------------------------------
- * $Id: PrimOps.hc,v 1.43 2000/02/28 13:59:43 simonmar Exp $
+ * $Id: PrimOps.hc,v 1.49 2000/03/21 11:33:12 rrt Exp $
*
- * (c) The GHC Team, 1998-1999
+ * (c) The GHC Team, 1998-2000
*
* Primitive functions / data
*
#include "StablePriv.h"
#include "HeapStackCheck.h"
#include "StgRun.h"
+#include "Itimer.h"
+#include "Prelude.h"
/* ** temporary **
#endif
if (info == &FULL_MVAR_info) {
- barf("putMVar#: MVar already full");
+#ifdef INTERPRETER
+ fprintf(stderr, "fatal: put on a full MVar in Hugs; aborting\n" );
+ exit(1);
+#else
+ R1.cl = (StgClosure *)PutFullMVar_closure;
+ JMP_(raisezh_fast);
+#endif
}
mvar->value = R2.cl;
/* Add on ticks_since_select, since these will be subtracted at
* the next awaitEvent call.
*/
+#if defined(HAVE_SETITIMER) || defined(mingw32_TARGET_OS)
CurrentTSO->block_info.delay = R1.i + ticks_since_select;
+#else
+ CurrentTSO->block_info.target = R1.i + getourtimeofday();
+#endif
APPEND_TO_BLOCKED_QUEUE(CurrentTSO);