diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-12 17:39:10 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-12 17:39:10 +0000 |
commit | a16c1ab035b6543fedf3a5bbbfeb732b8b02381e (patch) | |
tree | 9e21431cfeb4ea0768440db36bdabd5c06c2709f /libjava | |
parent | 55e0e460fb9075751b2e242f7e54e8b177138d49 (diff) | |
download | gcc-a16c1ab035b6543fedf3a5bbbfeb732b8b02381e.tar.gz |
2009-01-12 Andrew Haley <aph@redhat.com>
* sun/misc/natUnsafe.cc (spinlock contructor): Call sched_yield().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143302 138bc75d-0d04-0410-961f-82ee72b054a4
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 () { |