From 64d2f63295d25b55056c5c4698fcdb37150fbe05 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 16 Apr 2008 21:53:25 +0000 Subject: [PATCH] move usleep(1) to gc_thread_work() from any_work() --- rts/sm/GC.c | 4 +++- rts/sm/Scav.c | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) 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; } -- 1.7.10.4