X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FSelect.c;h=677fdd2c8198103a9e0c095efc532593c405b113;hb=3aa14dd83b4fdb99e68f428616c2a9207286b275;hp=da0e12469fbbb9b0e7c21c060a34048e025c515a;hpb=47e6674f14f0b414bbb3f37ffff8749302e0f4b2;p=ghc-hetmet.git diff --git a/ghc/rts/Select.c b/ghc/rts/Select.c index da0e124..677fdd2 100644 --- a/ghc/rts/Select.c +++ b/ghc/rts/Select.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Select.c,v 1.27 2003/03/29 00:00:41 sof Exp $ + * $Id: Select.c,v 1.29 2003/06/26 12:22:59 stolz Exp $ * * (c) The GHC Team 1995-2002 * @@ -31,6 +31,10 @@ #include #include +#ifdef HAVE_UNISTD_H +#include +#endif + /* last timestamp */ nat timestamp = 0; @@ -232,12 +236,14 @@ awaitEvent(rtsBool wait) * we could block for a long time before the signal is * serviced. */ +#if defined(RTS_USER_SIGNALS) if (signals_pending()) { RELEASE_LOCK(&sched_mutex); /* ToDo: kill */ startSignalHandlers(); ACQUIRE_LOCK(&sched_mutex); return; /* still hold the lock */ } +#endif /* we were interrupted, return to the scheduler immediately. */