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/sun | |
parent | 2842bb86fd3ac50af7309959d23d8e725683c91e (diff) | |
download | gcc-406c72ce52ff86d21f11bf0b90c4df6e34dcfb63.zip gcc-406c72ce52ff86d21f11bf0b90c4df6e34dcfb63.tar.gz gcc-406c72ce52ff86d21f11bf0b90c4df6e34dcfb63.tar.bz2 |
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/sun')
-rw-r--r-- | libjava/sun/misc/natUnsafe.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libjava/sun/misc/natUnsafe.cc b/libjava/sun/misc/natUnsafe.cc index cc57dd5..0bd2d21 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 () { |