]> gcc.gnu.org Git - gcc.git/commitdiff
natUnsafe.cc (spinlock contructor): Call sched_yield().
authorAndrew Haley <aph@redhat.com>
Mon, 12 Jan 2009 17:39:10 +0000 (17:39 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Mon, 12 Jan 2009 17:39:10 +0000 (17:39 +0000)
2009-01-12  Andrew Haley  <aph@redhat.com>

* sun/misc/natUnsafe.cc (spinlock contructor): Call sched_yield().

From-SVN: r143302

libjava/ChangeLog
libjava/sun/misc/natUnsafe.cc

index 72a075da3ee1b26c97012eb6cda5556f9be7f1f1..ebef09f23efce3b237513ced2873e86026d32d18 100644 (file)
@@ -1,3 +1,7 @@
+2009-01-12  Andrew Haley  <aph@redhat.com>
+
+       * sun/misc/natUnsafe.cc (spinlock contructor): Call sched_yield().
+
 2009-01-11  Matthias Klose  <doko@ubuntu.com>
 
        * Makefile.am (ecjx_LDADD): Add $(extra_ldflags).
index cc57dd5988949050a256f6443ece70334fc1c028..0bd2d21eac55740b2b7b35776193c66b6121b3ed 100644 (file)
@@ -1,6 +1,6 @@
 // natUnsafe.cc - Implementation of sun.misc.Unsafe native methods.
 
-/* Copyright (C) 2006
+/* Copyright (C) 2006, 2007
    Free Software Foundation
 
    This file is part of libgcj.
@@ -32,7 +32,7 @@ public:
 spinlock ()
   {
     while (! compare_and_swap (&lock, 0, 1))
-      ;
+      _Jv_ThreadYield ();
   }
   ~spinlock ()
   {
This page took 0.068848 seconds and 5 git commands to generate.