History log of /libcore/ojluni/src/main/java/java/lang/Thread.java
Revision Date Author Comments
087345a1b9523ee891289afebeb61368f6466f84 13-Apr-2017 Narayan Kamath <narayan@google.com> Thread: Improve exception message for bad priorities.

Bug: 37156607

Test: Manual inspection of exception messages. Automated tests that
verify a specific message are not desirable.

Change-Id: I94cc35f4c52ae9f9201d0a11bcebebca7b57873c
6975f84c2ed72e1e26d20190b6f318718c849008 01-Mar-2017 Tobias Thierer <tobiast@google.com> Make Android patch docs in ojluni more consistent with style guide

This CL consists of an automated and a manual part (originally
reviewed as separate CLs, then squashed together before submitting
in order to minimize the number of times each Android-changed line
is touch, since that makes future git archaeology on these simpler).

Automated part: Run the following command (performs regex replacements):

find ojluni -name \*\.java | xargs sed -i \
-e 's/Android[- ]changed/Android-changed/ig' \
-e 's/Android-changed :/Android-changed:/g' \
-e 's/Android-changed \(BEGIN\|END\)/\1 Android-changed/g' \
-e 's/Android-changed - /Android-changed: /g' \
-e 's/Android[- ]removed/Android-removed/ig' \
-e 's/Android-removed :/Android-removed:/g' \
-e 's/Android-removed \(BEGIN\|END\)/\1 Android-removed/g' \
-e 's/Android-removed - /Android-removed: /g' \
-e 's/Android[- ]added/Android-added/ig' \
-e 's/Android-added :/Android-added:/g' \
-e 's/Android-added \(BEGIN\|END\)/\1 Android-added/g' \
-e 's/Android-added - /Android-added: /g' \
-e 's/----- \(BEGIN\|END\) android\( -----\)\?/\1 Android-changed/g' \
-e 's/\/\* \(BEGIN\|END\) Android-changed \*\//\/\/ \1 Android-changed/g'

Manual part: Move BEGIN Android-* lines out of block comments

Some Android-{changed,removed,added} lines occurred inside block comments.
This CL targets places in ojluni that contained the String "* BEGIN Android-"

Changes made by this CL include:

- Move the "BEGIN Android-" line into a line comment (the style guide
mandates that "Android-" lines are always in line comments). In many
cases, that line comment is immediately followed by a block comment
holding commented-out upstream code.
- Add corresponding "// END Android-" line comments, where missing.
- Drop documented import changes altogether. These create noise for
little benefit:
(1.) Most import problems will be found at compile time
(2.) They generally correspond to documented changes elsewhere in
the file.
- In most cases, the phrasing of comments and the decision whether to
keep commented out upstream code was not changed by this CL.
- Some additional tweaks were made in line with the style guide.

No attempt was made to:

- Verify that commented-out upstream code actually matches the
current upstream.
- Make any fixes (eg. to comments) that would have required
git archaeology (looking up historic commits).

Bug: 35841464
Test: make droid cts update-api

Change-Id: Ibc60979cb6061cfb0e9c7096cc9dcab30ddfa733
fa5b565a3f6c6d7cbd6106ee8d360304c3a939a3 17-Feb-2017 Igor Murashkin <iam@google.com> jni: Switch to @FastNative for all JNI functions.

Switches all (248) methods that previously used !bang JNI in art/libcore
to all use @FastNative.

As a nice benefit, this should be about 1.5x faster than before for those method calls.
This measures out to a 3% startup time improvement for system_server.

Test: make test-art-host
Bug: 34955272
Change-Id: I0881f401c7660c79f275235362777bfa58241deb
4d8dc721410a0bf120893ded7a9bf684a962de54 26-Oct-2016 Artem Udovichenko <artem.u@samsung.com> Throw IllegalThreadStateException when Thread.start is used in wrong way

Test: run libcore.java.lang.ThreadTest

Change-Id: Ie9bb8aaed5aec6bbe22d4d868ea0b0fa4853ff18
b62710c762bf399ee1a45821eb0740b2d9c92f62 21-Jul-2016 Tobias Thierer <tobiast@google.com> Ensure apps cannot prevent uncaught exceptions being logged.

Add a new @hide API to set an additional UncaughtExceptionHandler that
is called before dispatching to the regular handler. The framework
uses this to enforce logging.

Test: Ran ThreadTest.

Bug: 29624607
Change-Id: Ieb8d70662f7a37e9bfcdeb2818bf4863bb6c1890
4e73fd2bc22e704fe71465782b83be0471ac5e82 05-Jul-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Port java.lang from openJdk8, part 4

- New java.lang.ThreadLocal.withInitial method.
- Javadoc cosmetic and generics changes.
- Restored removed SecurityManager checks in System.
- Out and err streams can now change encoding depending
on properties.
- Out and err are now a BufferedOutputStream (size 128).
- Thread#UncaughtExceptionHandler is now a
FunctionalInterface
- Double checked locking for System#console()


Bug: 28666126
Change-Id: I4a715a785578185920e2ee5a16dbe06511c55c23
bf34d8378762aa4d97c30c86ef95502e5d85ed3e 27-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix Unsafe#park for large wait-time values.

jsr166.LockSupportTest#testParkNeg_parkUntilBlocker
fails if the delay between the tests
System.currentTimeMillis is called at least 2ms behind
the Unsafe#park. This is caused by underflow to
large positive value when subtracting current time
from the method argument.

This change fixes it by not doing subtraction before
comparison.

parkUntil takes arguments in milliseconds and is implemented
as a call to parkFor, which takes arguments in nanoseconds.
If parkUntil argument will overflow during conversion to
nanoseconds, it's clamped on max value (~292 years).

Bug: 29746125
Change-Id: Ie0b3923ce4567415bf6478552c51eb31ac4aec62
49965c1dc9da104344f4893a05e45795a5740d20 30-Jun-2016 Ganesh Mahendran <opensource.ganesh@gmail.com> remove x attribute of java file

java file does not need x attribute. This patch removes it.

Change-Id: I2a7170d99f4bee7a7b819621c84dd197ded37fa2
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
309f9df28350e15445b9135e8b710fa2b34b5dc1 25-Apr-2016 Yi Kong <yikong@google.com> Update URLs to Java technotes and platform docs

Fix links to {@docRoot}/../{technotes,platform} pages.

This is done by batch editing using the following script:
grep @docRoot -rl | xargs sed -i 's/\/..\/technotes/r\/openjdk-redirect.html?v=8\&path=\/technotes/g;s/\/..\/platform/openjdk-redirect.html?v=8\&path=\/platform/g'

Bug: 27540501
Change-Id: Ib5634cd461fbba37dd94ddad9660910dc9397fe7
(cherry picked from commit d2449bb576ad1e3a3877364e5e1ae28625f69e35)
d2449bb576ad1e3a3877364e5e1ae28625f69e35 25-Apr-2016 Yi Kong <yikong@google.com> Update URLs to Java technotes and platform docs

Fix links to {@docRoot}/../{technotes,platform} pages.

This is done by batch editing using the following script:
grep @docRoot -rl | xargs sed -i 's/\/..\/technotes/r\/openjdk-redirect.html?v=8\&path=\/technotes/g;s/\/..\/platform/openjdk-redirect.html?v=8\&path=\/platform/g'

Bug: 27540501
Change-Id: Ib5634cd461fbba37dd94ddad9660910dc9397fe7
2047ef0b5d272a03297dc1cd307a2dcfa42e280b 23-Mar-2016 Narayan Kamath <narayan@google.com> Thread: Don't set native names twice for attached threads.

ART already does this when a threads are attached. There's no need
to do it another time.

Also add a test that documents the behaviour wrt. to thread naming
for attached threads.

bug: 27748318

(cherry picked from commit 81888044c73382ef87285593afdf80e840288b06)

Change-Id: I8b1ac9407114d0fc399a3bc644d45e2f00ef7200
81888044c73382ef87285593afdf80e840288b06 23-Mar-2016 Narayan Kamath <narayan@google.com> Thread: Don't set native names twice for attached threads.

ART already does this when a threads are attached. There's no need
to do it another time.

Also add a test that documents the behaviour wrt. to thread naming
for attached threads.

bug: 27748318

Change-Id: I9075f0434b0168280662a1f8a4176f23724748a7
e8b323c7cb7d55be9a4df579231e44f04f53d766 11-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> JSR-166 update without java 1.9 method/classes

Second attempt, in frist one I've submitted some code from openJdk 1.9
that shouldn't be here, orignial change can be found at
5328e07d282bef36ac8b757bbee16a761415b2c4

Adapted from sources taken from CVS using:
cvs -d ':pserver:anonymous@gee.cs.oswego.edu/home/jsr166/jsr166' checkout -D "03/03/2016 10:00:00 GMT" jsr166

This time with hidden/removed "@since 9" methods and classes

Bug: 27426599
Change-Id: Ibd8d26e13cba091bfd983c73d005e4f8d8f5946d
(cherry picked from commit b8b75116273ecfdb8ffdd1869b1c0dd04570a95e)
b8b75116273ecfdb8ffdd1869b1c0dd04570a95e 11-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> JSR-166 update without java 1.9 method/classes

Second attempt, in frist one I've submitted some code from openJdk 1.9
that shouldn't be here, orignial change can be found at
5328e07d282bef36ac8b757bbee16a761415b2c4

Adapted from sources taken from CVS using:
cvs -d ':pserver:anonymous@gee.cs.oswego.edu/home/jsr166/jsr166' checkout -D "03/03/2016 10:00:00 GMT" jsr166

This time with hidden/removed "@since 9" methods and classes

Bug: 27426599
Change-Id: Ibd8d26e13cba091bfd983c73d005e4f8d8f5946d
ed4f365789d43b1961657195df223a19bf4ef20f 15-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Revert "JSR-166 update"

I missed comments on framework/base change regarding "@since 9" parts
This reverts commit 5328e07d282bef36ac8b757bbee16a761415b2c4.

Change-Id: Iff71b8a17e79a0a5c1ecadc05bccadceabb83393
5328e07d282bef36ac8b757bbee16a761415b2c4 11-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> JSR-166 update

Adapted from sources taken from CVS using:
cvs -d ':pserver:anonymous@gee.cs.oswego.edu/home/jsr166/jsr166' checkout -D "03/03/2016 10:00:00 GMT" jsr166

Bug: 27426599
Change-Id: Ic9ba278929f8747d58b69e7d67ec325064588bff
2c87ad3a45cecf9e344487cad1abfdebe79f2c7c 21-Dec-2015 Narayan Kamath <narayan@google.com> Update file headers.

Change-Id: I8149f41585768a1a4b72ab7bb4a1452376c05cc2
232ed175b796126887c9a9517bc57b76fcb05318 28-Sep-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Rename a few internal methods to use the $ suffix.

Change-Id: I85f5171430928f05daf7748b18ba36652ce15755
46c38b30477d579beaa528386f71814c0191a48f 10-Aug-2015 Narayan Kamath <narayan@google.com> Deal with null thread names correctly.

Also includes a change to return a null thread group for
TERMINATED threads.

Change-Id: I2e86bef4b76f50173ecba7cbba27a5f9bc175ee6
a80f9aeb7b637fc241c75448eed08275245ec652 06-May-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of java.lang.* [part 2].

Change-Id: I938a2770320c2ed14ae70fb1681c88df594240c6
51b1b6997fd3f980076b8081f7f1165ccc2a4008 16-Feb-2015 Piotr Jastrzebski <haaawk@google.com> Initial import of OpenJdk files.

Create new libcore/ojluni directory with src/main/java and
src/main/native subdirectiories.

Build ojluni into core-oj jar.

Use openjdk classes from java.awt.font package.

Copy all files from jdk/src/share/classes and jdk/src/solaris/classes
directories in openjdk into libcore/ojluni/src/main/java.

Copy following native files from openjdk to
libcore/ojluni/src/main/native:
jdk/src/solaris/native/java/io/canonicalize_md.c
build/linux-amd64/include/classfile_constants.h
jdk/src/share/native/java/net/DatagramPacket.c
jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
jdk/src/share/native/java/lang/Double.c
jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h
jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
jdk/src/solaris/native/java/io/FileDescriptor_md.c
jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
jdk/src/share/native/java/io/FileInputStream.c
jdk/src/solaris/native/sun/nio/ch/FileKey.c
jdk/src/solaris/native/java/io/FileOutputStream_md.c
jdk/src/solaris/native/java/io/FileSystem_md.c
jdk/src/share/native/java/lang/Float.c
jdk/src/share/native/java/net/Inet4Address.c
jdk/src/solaris/native/java/net/Inet4AddressImpl.c
jdk/src/share/native/java/net/Inet6Address.c
jdk/src/solaris/native/java/net/Inet6AddressImpl.c
jdk/src/share/native/java/net/InetAddress.c
jdk/src/solaris/native/java/net/InetAddressImplFactory.c
jdk/src/share/native/java/io/io_util.c
jdk/src/solaris/native/sun/nio/ch/IOUtil.c
jdk/src/share/native/java/io/io_util.h
jdk/src/solaris/native/java/io/io_util_md.c
jdk/src/solaris/native/java/io/io_util_md.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/java_io_FileDescriptor.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileInputStream.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileOutputStream.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileSystem.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_ObjectStreamClass.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_UnixFileSystem.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Double.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Float.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Integer.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Long.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Runtime.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Shutdown.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_StrictMath.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_String.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_System.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Thread.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Throwable.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_DatagramPacket.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4Address.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4AddressImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6Address.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6AddressImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddress.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddressImplFactory.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_NetworkInterface.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainDatagramSocketImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainSocketImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketInputStream.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOptions.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOutputStream.h
jdk/src/share/native/java/lang/java_props.h
jdk/src/solaris/native/java/lang/java_props_md.c
jdk/src/share/native/java/util/zip/Adler32.c as java_util_zip_Adler32.c
jdk/src/share/native/java/util/zip/CRC32.c as java_util_zip_CRC32.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_CRC32.h
jdk/src/share/native/java/util/zip/Deflater.c as java_util_zip_Deflater.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Deflater.h
jdk/src/share/native/java/util/zip/Inflater.c as java_util_zip_Inflater.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Inflater.h
jdk/src/share/native/java/util/zip/ZipFile.c as java_util_zip_ZipFile.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_ZipFile.h
jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
jdk/src/share/native/common/jlong.h
jdk/src/solaris/native/common/jlong_md.h
jdk/src/share/native/common/jni_util.c
jdk/src/share/native/common/jni_util.h
jdk/src/solaris/native/common/jni_util_md.c
jdk/src/share/javavm/export/jvm.h
jdk/src/solaris/javavm/export/jvm_md.h
jdk/src/solaris/native/java/net/linux_close.c
jdk/src/share/native/sun/misc/NativeSignalHandler.c
jdk/src/solaris/native/sun/nio/ch/NativeThread.c
jdk/src/share/native/java/net/net_util.c
jdk/src/share/native/java/net/net_util.h
jdk/src/solaris/native/java/net/net_util_md.c
jdk/src/solaris/native/java/net/net_util_md.h
jdk/src/solaris/native/java/net/NetworkInterface.c
jdk/src/share/native/sun/nio/ch/nio.h
jdk/src/solaris/native/sun/nio/ch/nio_util.h
jdk/src/share/native/java/io/ObjectStreamClass.c
jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
jdk/src/solaris/native/java/net/PlainSocketImpl.c
jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c
jdk/src/share/native/java/lang/Runtime.c
jdk/src/share/native/java/lang/Shutdown.c
jdk/src/share/native/sun/misc/Signal.c
jdk/src/solaris/native/java/net/SocketInputStream.c
jdk/src/solaris/native/java/net/SocketOutputStream.c
jdk/src/share/native/java/lang/StrictMath.c
jdk/src/share/native/java/lang/String.c
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_NativeSignalHandler.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_Signal.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/sun_net_spi_DefaultProxySelector.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileChannelImpl.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileDispatcherImpl.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileKey.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOStatus.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOUtil.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_NativeThread.h
jdk/src/share/native/java/lang/System.c
jdk/src/share/native/java/lang/Thread.c
jdk/src/share/native/java/lang/Throwable.c
jdk/src/solaris/native/java/io/UnixFileSystem_md.c
jdk/src/solaris/native/java/lang/UNIXProcess_md.c
jdk/src/share/native/java/util/zip/zip_util.c
jdk/src/share/native/java/util/zip/zip_util.h

Change-Id: Ib237df4e1b7b5b4d9f12e74d189e6ec9eed3c31d