This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r117510 - in /branches/gcj-eclipse: gcc/java/Ch...
- From: aph at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Fri, 06 Oct 2006 17:00:38 -0000
- Subject: r117510 - in /branches/gcj-eclipse: gcc/java/Ch...
Author: aph
Date: Fri Oct 6 17:00:37 2006
New Revision: 117510
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117510
Log:
2006-10-06 Andrew Haley <aph@redhat.com>
* builtins.c (compareAndSwapInt_builtin): Check that we really do
have a compare_and_swap builtin.
(compareAndSwapLong_builtin): Likewise.
(compareAndSwapObject_builtin): Likewise.
2006-10-06 Andrew Haley <aph@redhat.com>
* posix-threads.cc (_Jv_ThreadUnpark, _Jv_ThreadPark): Moved here
from sun/misc/natUnsafe.cc.
* sun/misc/natUnsafe.cc (class spinlock): New class.
(compareAndSwap): New methods.
(compareAndSwapInt, compareAndSwapLong, compareAndSwapObject)
(putOrderedLong, putLongVolatile, putObjectVolatile, putLong)
(getIntVolatile, getObjectVolatile, getLong, getLongVolatile):
Rewrite to use gcj's own atomic functions rather than gcc
builtins.
(unpark): Moved to posix-threads.cc
(park): Likewise.
* include/jvm.h (struct natThread::alive_flag): Moved here from
Thread.java.
(struct natThread): Likewise.
* include/posix-threads.h: (_Jv_ThreadUnpark, _Jv_ThreadPark):
moved here from sun/misc/natUnsafe.cc.
* java/lang/natThread.cc (initialize_native): Set alive_flag here.
(isAlive): Moved here from Thread.java.
(interrupt): alive_flag is now in the natThread structure.
(interrupt): Call _Jv_ThreadUnpark().
(finish_): parkPermit and alive_flag are now in the natThread
structure.
(start): LIkewise.
(_Jv_AttachCurrentThread): Likewise.
* java/lang/Thread.java (alive_flag): Remove.
(parkPermit): Likewise.
(Thread): Don't set alive_flag.
(isAlive): Make native.
Modified:
branches/gcj-eclipse/gcc/java/ChangeLog
branches/gcj-eclipse/gcc/java/builtins.c
branches/gcj-eclipse/libjava/ChangeLog
branches/gcj-eclipse/libjava/include/jvm.h
branches/gcj-eclipse/libjava/include/posix-threads.h
branches/gcj-eclipse/libjava/java/lang/Thread.java
branches/gcj-eclipse/libjava/java/lang/natThread.cc
branches/gcj-eclipse/libjava/posix-threads.cc
branches/gcj-eclipse/libjava/sun/misc/natUnsafe.cc