sources.am, [...]: Rebuilt.

* sources.am, Makefile.in: Rebuilt.
	* java/util/logging/LogManager.java: Removed.
	* java/util/logging/Logger.java (resetLogger): New method, from
	Classpath.
	* java/io/RandomAccessFile.java: Removed.
	* gnu/java/nio/channels/FileChannelImpl.java (create): New
	method.
	(FileChannelImpl): Now private.
	* java/io/FileInputStream.java: Removed.
	* java/io/FileOutputStream.java: Removed.
	* java/security/AccessControlContext.java: Removed.
	* java/lang/ThreadLocal.java: Removed.
	* java/lang/InheritableThreadLocal.java: Removed.
	* java/lang/Thread.java (locals): New field.
	(getThreadLocals): New method.
	* java/lang/natThread.cc (finish_): Clear 'locals'.

From-SVN: r113735
This commit is contained in:
Tom Tromey 2006-05-13 02:16:22 +00:00 committed by Tom Tromey
parent a2038cd64d
commit 143145daa4
14 changed files with 102 additions and 2925 deletions

View file

@ -1,5 +1,5 @@
/* Thread -- an independent thread of executable code
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation
This file is part of GNU Classpath.
@ -41,6 +41,8 @@ package java.lang;
import gnu.gcj.RawData;
import gnu.gcj.RawDataManaged;
import gnu.java.util.WeakIdentityHashMap;
import java.util.Map;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
@ -125,6 +127,11 @@ public class Thread implements Runnable
/** The context classloader for this Thread. */
private ClassLoader contextClassLoader;
/** Thread local storage. Package accessible for use by
* InheritableThreadLocal.
*/
WeakIdentityHashMap locals;
// This describes the top-most interpreter frame for this thread.
RawData interp_frame;
@ -914,4 +921,18 @@ public class Thread implements Runnable
private final native void initialize_native();
private final native static String gen_name();
/**
* Returns the map used by ThreadLocal to store the thread local values.
*/
static Map getThreadLocals()
{
Thread thread = currentThread();
Map locals = thread.locals;
if (locals == null)
{
locals = thread.locals = new WeakIdentityHashMap();
}
return locals;
}
}