X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsAPI.c;h=1a0620f9d2559493b212a2777d54e6d8c9ff11c0;hb=cc50ad9890a5de79103236a01003e1908c7e75cf;hp=2722bf447decf319c7236b0312256388ae4f6f6a;hpb=448ee8f6a794d23fa20fcdb47843d985a58ee871;p=ghc-hetmet.git diff --git a/ghc/rts/RtsAPI.c b/ghc/rts/RtsAPI.c index 2722bf4..1a0620f 100644 --- a/ghc/rts/RtsAPI.c +++ b/ghc/rts/RtsAPI.c @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: RtsAPI.c,v 1.39 2003/01/25 15:54:49 wolfgang Exp $ + * $Id: RtsAPI.c,v 1.40 2003/01/27 11:08:16 wolfgang Exp $ * * (c) The GHC Team, 1998-2001 * @@ -468,10 +468,10 @@ rts_checkSchedStatus ( char* site, SchedulerStatus rc ) } } -#ifdef RTS_SUPPORTS_THREADS void rts_lock() { +#ifdef RTS_SUPPORTS_THREADS Capability *cap; ACQUIRE_LOCK(&sched_mutex); @@ -490,11 +490,13 @@ rts_lock() // If there is already a task available (waiting for the work capability), // this will do nothing. startSchedulerTask(); +#endif } void rts_unlock() { +#ifdef RTS_SUPPORTS_THREADS RELEASE_LOCK(&sched_mutex); -} #endif +}