diff options
author | Andrew Haley <aph@redhat.com> | 2009-01-12 17:39:10 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2009-01-12 17:39:10 +0000 |
commit | 406c72ce52ff86d21f11bf0b90c4df6e34dcfb63 (patch) | |
tree | 9e21431cfeb4ea0768440db36bdabd5c06c2709f /libjava | |
parent | 2842bb86fd3ac50af7309959d23d8e725683c91e (diff) | |
download | gcc-406c72ce52ff86d21f11bf0b90c4df6e34dcfb63.tar.gz |
natUnsafe.cc (spinlock contructor): Call sched_yield().
2009-01-12 Andrew Haley <aph@redhat.com>
* sun/misc/natUnsafe.cc (spinlock contructor): Call sched_yield().
From-SVN: r143302
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 4 | ||||
-rw-r--r-- | libjava/sun/misc/natUnsafe.cc | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 72a075da3ee..ebef09f23ef 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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). diff --git a/libjava/sun/misc/natUnsafe.cc b/libjava/sun/misc/natUnsafe.cc index cc57dd59889..0bd2d21eac5 100644 --- a/libjava/sun/misc/natUnsafe.cc +++ b/libjava/sun/misc/natUnsafe.cc @@ -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 () { |