From: Simon Marlow Date: Wed, 16 Apr 2008 21:53:25 +0000 (+0000) Subject: move usleep(1) to gc_thread_work() from any_work() X-Git-Tag: Before_cabalised-GHC~227 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=64d2f63295d25b55056c5c4698fcdb37150fbe05 move usleep(1) to gc_thread_work() from any_work() --- diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 934c91f..fa58905 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -11,7 +11,7 @@ * * ---------------------------------------------------------------------------*/ -#include "PosixSource.h" +// #include "PosixSource.h" #include "Rts.h" #include "RtsFlags.h" #include "RtsUtils.h" @@ -51,6 +51,7 @@ #include "Sparks.h" #include // for memset() +#include /* ----------------------------------------------------------------------------- Global variables @@ -1057,6 +1058,7 @@ loop: gct->thread_index, r); while (gc_running_threads != 0) { + usleep(1); if (any_work()) { inc_running(); goto loop; diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c index fc63a85..d8d158a 100644 --- a/rts/sm/Scav.c +++ b/rts/sm/Scav.c @@ -11,8 +11,6 @@ * * ---------------------------------------------------------------------------*/ -#include - #include "Rts.h" #include "RtsFlags.h" #include "Storage.h" @@ -1575,7 +1573,6 @@ any_work (void) } gct->no_work++; - usleep(1); return rtsFalse; }