/* -----------------------------------------------------------------------------
- * $Id: PrimOps.hc,v 1.67 2001/01/15 09:55:41 sewardj Exp $
+ * $Id: PrimOps.hc,v 1.71 2001/02/11 17:51:07 simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
classes CCallable and CReturnable don't really exist, but the
compiler insists on generating dictionaries containing references
to GHC_ZcCCallable_static_info etc., so we provide dummy symbols
- for these.
+ for these. Some C compilers can't cope with zero-length static arrays,
+ so we have to make these one element long.
*/
-W_ GHC_ZCCCallable_static_info[0];
-W_ GHC_ZCCReturnable_static_info[0];
-
-
+StgWord GHC_ZCCCallable_static_info[1];
+StgWord GHC_ZCCReturnable_static_info[1];
+
/* -----------------------------------------------------------------------------
Macros for Hand-written primitives.
-------------------------------------------------------------------------- */
#endif
if (info == &stg_FULL_MVAR_info) {
-#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;
Bytecode object primitives
------------------------------------------------------------------------- */
-#ifdef GHCI
FN_(newBCOzh_fast)
{
/* R1.p = instrs
RET_P(ap);
FE_
}
-#endif
/* -----------------------------------------------------------------------------
Thread I/O blocking primitives
ACQUIRE_LOCK(&sched_mutex);
- target = (R1.i / (TICK_MILLISECS*1000)) + timestamp + ticks_since_timestamp;
+ target = (R1.i / (TICK_MILLISECS*1000)) + getourtimeofday();
CurrentTSO->block_info.target = target;
/* Insert the new thread in the sleeping queue. */