ThreadGroup.java (add(Thread)): Rename to addThread() to comply with classpath VM spec.
2000-06-21 Bryce McKinlay <bryce@albatross.co.nz> * java/lang/ThreadGroup.java (add(Thread)): Rename to addThread() to comply with classpath VM spec. (add(Group)): Rename to addGroup(). * java/lang/Thread.java (Thread): Use addThread(). * java/lang/natThread.cc (finish_): Use removeThread(). From-SVN: r34627
This commit is contained in:
parent
063a4b851f
commit
0ee935e162
4 changed files with 42 additions and 17 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2000-06-21 Bryce McKinlay <bryce@albatross.co.nz>
|
||||||
|
|
||||||
|
* java/lang/ThreadGroup.java (add(Thread)): Rename to addThread() to
|
||||||
|
comply with classpath VM spec.
|
||||||
|
(add(Group)): Rename to addGroup().
|
||||||
|
* java/lang/Thread.java (Thread): Use addThread().
|
||||||
|
* java/lang/natThread.cc (finish_): Use removeThread().
|
||||||
|
|
||||||
2000-06-20 Bryce McKinlay <bryce@albatross.co.nz>
|
2000-06-20 Bryce McKinlay <bryce@albatross.co.nz>
|
||||||
|
|
||||||
* java/lang/ThreadGroup.java: Merged with classpath.
|
* java/lang/ThreadGroup.java: Merged with classpath.
|
||||||
|
@ -591,6 +599,7 @@
|
||||||
* include/i386-signal.h (MAKE_THROW_FRAME): Ditto.
|
* include/i386-signal.h (MAKE_THROW_FRAME): Ditto.
|
||||||
* include/ppc-signal.h: New file.
|
* include/ppc-signal.h: New file.
|
||||||
|
|
||||||
|
>>>>>>> 1.385
|
||||||
2000-05-18 Bryce McKinlay <bryce@albatross.co.nz>
|
2000-05-18 Bryce McKinlay <bryce@albatross.co.nz>
|
||||||
|
|
||||||
* java/lang/Thread.java: Declare `data' as Object, not RawData.
|
* java/lang/Thread.java: Declare `data' as Object, not RawData.
|
||||||
|
|
|
@ -220,7 +220,7 @@ public class Thread implements Runnable
|
||||||
throw new NullPointerException ();
|
throw new NullPointerException ();
|
||||||
|
|
||||||
name = n;
|
name = n;
|
||||||
group.add(this);
|
group.addThread(this);
|
||||||
runnable = r;
|
runnable = r;
|
||||||
|
|
||||||
data = null;
|
data = null;
|
||||||
|
|
|
@ -1,11 +1,28 @@
|
||||||
/* java.lang.ThreadGroup
|
/* java.lang.ThreadGroup
|
||||||
Copyright (C) 1998, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1998, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
This software is copyrighted work licensed under the terms of the
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
it under the terms of the GNU General Public License as published by
|
||||||
details. */
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
|
02111-1307 USA.
|
||||||
|
|
||||||
|
As a special exception, if you link this library with other files to
|
||||||
|
produce an executable, this library does not by itself cause the
|
||||||
|
resulting executable to be covered by the GNU General Public License.
|
||||||
|
This exception does not however invalidate any other reasons why the
|
||||||
|
executable file might be covered by the GNU General Public License. */
|
||||||
|
|
||||||
package java.lang;
|
package java.lang;
|
||||||
|
|
||||||
|
@ -42,8 +59,7 @@ public class ThreadGroup
|
||||||
private Vector groups = new Vector();
|
private Vector groups = new Vector();
|
||||||
private boolean daemon_flag = false;
|
private boolean daemon_flag = false;
|
||||||
private boolean destroyed_flag = false;
|
private boolean destroyed_flag = false;
|
||||||
|
private int maxpri = Thread.MAX_PRIORITY;
|
||||||
int maxpri = Thread.MAX_PRIORITY;
|
|
||||||
|
|
||||||
private ThreadGroup()
|
private ThreadGroup()
|
||||||
{
|
{
|
||||||
|
@ -76,7 +92,7 @@ public class ThreadGroup
|
||||||
this.name = name;
|
this.name = name;
|
||||||
maxpri = parent.maxpri;
|
maxpri = parent.maxpri;
|
||||||
daemon_flag = parent.daemon_flag;
|
daemon_flag = parent.daemon_flag;
|
||||||
parent.add(this);
|
parent.addGroup(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get the name of this ThreadGroup.
|
/** Get the name of this ThreadGroup.
|
||||||
|
@ -416,7 +432,7 @@ public class ThreadGroup
|
||||||
throw new IllegalThreadStateException("Already destroyed.");
|
throw new IllegalThreadStateException("Already destroyed.");
|
||||||
checkDestroy ();
|
checkDestroy ();
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
parent.remove(this);
|
parent.removeGroup(this);
|
||||||
destroyed_flag = true;
|
destroyed_flag = true;
|
||||||
parent = null;
|
parent = null;
|
||||||
|
|
||||||
|
@ -515,7 +531,7 @@ public class ThreadGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is called to add a Thread to our internal list.
|
// This is called to add a Thread to our internal list.
|
||||||
final void add(Thread t)
|
final void addThread(Thread t)
|
||||||
{
|
{
|
||||||
if (destroyed_flag)
|
if (destroyed_flag)
|
||||||
throw new IllegalThreadStateException ("ThreadGroup is destroyed");
|
throw new IllegalThreadStateException ("ThreadGroup is destroyed");
|
||||||
|
@ -524,7 +540,7 @@ public class ThreadGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is called to remove a Thread from our internal list.
|
// This is called to remove a Thread from our internal list.
|
||||||
final void remove(Thread t)
|
final void removeThread(Thread t)
|
||||||
{
|
{
|
||||||
if (destroyed_flag)
|
if (destroyed_flag)
|
||||||
throw new IllegalThreadStateException ();
|
throw new IllegalThreadStateException ();
|
||||||
|
@ -535,19 +551,19 @@ public class ThreadGroup
|
||||||
{
|
{
|
||||||
// We inline destroy to avoid the access check.
|
// We inline destroy to avoid the access check.
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
parent.remove(this);
|
parent.removeGroup(this);
|
||||||
destroyed_flag = true;
|
destroyed_flag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is called to add a ThreadGroup to our internal list.
|
// This is called to add a ThreadGroup to our internal list.
|
||||||
final void add(ThreadGroup g)
|
final void addGroup(ThreadGroup g)
|
||||||
{
|
{
|
||||||
groups.addElement(g);
|
groups.addElement(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is called to remove a ThreadGroup from our internal list.
|
// This is called to remove a ThreadGroup from our internal list.
|
||||||
final void remove(ThreadGroup g)
|
final void removeGroup(ThreadGroup g)
|
||||||
{
|
{
|
||||||
groups.removeElement(g);
|
groups.removeElement(g);
|
||||||
// Daemon groups are automatically destroyed when all their threads die.
|
// Daemon groups are automatically destroyed when all their threads die.
|
||||||
|
@ -555,7 +571,7 @@ public class ThreadGroup
|
||||||
{
|
{
|
||||||
// We inline destroy to avoid the access check.
|
// We inline destroy to avoid the access check.
|
||||||
if (parent != null)
|
if (parent != null)
|
||||||
parent.remove(this);
|
parent.removeGroup(this);
|
||||||
destroyed_flag = true;
|
destroyed_flag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@ java::lang::Thread::finish_ ()
|
||||||
{
|
{
|
||||||
natThread *nt = (natThread *) data;
|
natThread *nt = (natThread *) data;
|
||||||
|
|
||||||
group->remove (this);
|
group->removeThread (this);
|
||||||
|
|
||||||
#ifdef ENABLE_JVMPI
|
#ifdef ENABLE_JVMPI
|
||||||
if (_Jv_JVMPI_Notify_THREAD_END)
|
if (_Jv_JVMPI_Notify_THREAD_END)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue