From: Julian Seward Date: Wed, 15 Mar 2006 14:18:16 +0000 (+0000) Subject: Allow a thread to spin longer when yielding before switching to a X-Git-Tag: svn/VALGRIND_3_1_1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad7b3ecd4895f8614079ef2df46e7720610a71df;p=thirdparty%2Fvalgrind.git Allow a thread to spin longer when yielding before switching to a different thread. git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_1_BRANCH@5768 --- diff --git a/coregrind/m_scheduler/scheduler.c b/coregrind/m_scheduler/scheduler.c index 9bfc6ca58b..a562ed65e1 100644 --- a/coregrind/m_scheduler/scheduler.c +++ b/coregrind/m_scheduler/scheduler.c @@ -736,8 +736,8 @@ VgSchedReturnCode VG_(scheduler) ( ThreadId tid ) before swapping to another. That means that short term spins waiting for hardware to poke memory won't cause a thread swap. */ - if (VG_(dispatch_ctr) > 100) - VG_(dispatch_ctr) = 100; + if (VG_(dispatch_ctr) > 2000) + VG_(dispatch_ctr) = 2000; break; case VG_TRC_INNER_COUNTERZERO: