summaryrefslogtreecommitdiffstats
path: root/luni-kernel/src
Commit message (Collapse)AuthorAgeFilesLines
* Throw meaningful IOException instances from native code.Elliott Hughes2009-09-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Java side of OSFileSystem was throwing IOExceptions with no detail message. If we throw from the native side instead, we can supply meaningful explanations. This turned up a couple of bugs: * read, readDirect, readv, writev, and ttyRead would only throw IOException if they returned < -1, which is impossible. (writev was probably a copy & paste from readv, and the reads were probably confused by the impedence mismatch between Unix's use of 0 to mean end of file and -1 to mean error, and Java's use of -1 for end of file.) * inconsistent checking for null byte[]s passed in. * read and write would retry on EINTR, but readDirect and writeDirect wouldn't. * we'd silently truncate seek/lock/truncate offsets that didn't fit in 32 bits; we now throw an IOException instead. It also means a few native functions become "void" because errors are now reported by throwing exceptions, and the Java functions that used to call them are no longer needed. Also change ProcessManager to use jniThrowIOException, remove the unused throwIOExceptionStr from OSNetworkSystem.cpp, and remove the KnownFailure from FileTest's test_delete, now we have a fixed version of yaffs that won't rmdir(2) non-empty directories. Bug: 1542253
* Phantom fun.Andy McFadden2009-09-101-4/+4
| | | | | | Mark PhantomReference fields as volatile, since the GC can alter them. Added a simple phantom reference exerciser.
* Fix Package.isCompatibleWith.Elliott Hughes2009-09-041-3/+2
| | | | | | | Note that this doesn't help us because to Dalvik, all packages have version "0.0". Bug: 2099697
* Merge change 23208 into eclairAndroid (Google) Code Review2009-09-031-5/+11
|\ | | | | | | | | * changes: Fix Class.getConstructor("whatever", (Class[]) null).
| * Fix Class.getConstructor("whatever", (Class[]) null).Elliott Hughes2009-09-031-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The RI treats null parameterTypes the same as an empty array. This behavior is specified for getMethod, but only implied for getConstructor. This patch: * Fixes getConstructor. * Improves javadoc for Class methods taking "Class... parameterTypes". * Adds tests for both getConstructor and getMethod (which was already correct). * Removes a line of debugging output to System.out. Bug: 1824973
* | DO NOT MERGE: Fix implementation of Thread.isAliveAndy McFadden2009-09-021-3/+1
|/ | | | | | | | | | | | | | | | | (Originally submitted to master, pulling over to eclair.) The implementation of Thread.isAlive() was changed a couple of years ago as part of the Harmony integration. The current version relies on the thread's state value to determine its liveness, but the VM was originally written to be like JamVM, which used GNU ClassPath, which uses the vmThread field instead. It looks like it's possible for Thread.join() to get stuck, though as far as I know this hasn't happened. We're essentially rolling back part of 27774-p9. For internal bug 1966734. Also: ran --update on test 044.
* Integrate luni module (but not tests) to Harmony r772995.Jesse Wilson2009-07-242-103/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable changes - Stripped "@since Android 1.0" from many files. Most files are now 100% the same in Dalvik and Harmony. - AbstractStringBuilder.reverse() supports surrogates - AbstractStringBuilder shares less to waste less memory - Bitset optimized - BufferedInputStream changed to support unsynchronized close() - BufferedOutputStream does flushInternal - BufferedReader supports EBCDIC NEL - Collections.synchronizedList().indexOf() does a copy for more concurrency - Classes in nio module changed: DatagramChannelImpl, SocketChannelImpl and ServerSocketChannelImpl (these depend on internal APIs changed in this update) - DataInputStream/DataOutputStream now use a small buffer to limit the number of times the underlying stream is accessed - Date now has a minutes offset, more efficient toString() - ExposedByteArrayInputStream: new internal class - DeleteOnExit moved to top-level class - FileDescriptor.isValid() now non-native - Float, Double lessThan optimized (fix for compare(-0.0F, 0.0F) still pending) - FileURLConnection now guesses content types from streams - HashMap iterator changes - Hashtable iterator changes - INetworkSystem - removes bind2(), createMulticastSocket, sendStream(), - renames createSocket to createStreamSocket - JarURLConnection rewritten - LinkedHashMap: new iterator - Locale, Currency, TimeZone: now use ICU in Harmony, plain Java in Dalvik - ObjectInputStream: Accessor objects in Harmony, direct native in Dalvik - ProxyClassFile - many changes - String - optimized ascii for toLowerCase, toUpperCase, compare - Timer - rewritten - TreeMap - rewritten - URLClassLoader - new - URLConnection - new guessContentTypeFromStream(), uses org.apache.harmony.awt.www.content to lookup content type handlers
* Fixing wakeups caused by Thread.join() interacting with LockSupport.unpark.Jesse Wilson2009-07-161-11/+49
| | | | | | | | This caused several concurrency tests to fail when run with timeouts, since the tests cause park and unpark to happen frequently. Also fixing a tiny issue with CoreTestRunnable to use the proper tmp directory and to include the program of a failed external execution.
* am 4ce12e65: Fixes deadlock in Runtime.exec(). We can\'t malloc() or free() ↵crazybob2009-07-021-18/+14
|\ | | | | | | | | | | | | | | | | after fork() because the heap lock may be held by a thread that is no longer running. Merge commit '4ce12e65bb5fb7cb0eaa131e8b5c0b740e8e359e' * commit '4ce12e65bb5fb7cb0eaa131e8b5c0b740e8e359e': Fixes deadlock in Runtime.exec(). We can't malloc() or free() after fork() because the heap lock may be held by a thread that is no longer running.
| * Fixes deadlock in Runtime.exec(). We can't malloc() or free() after fork() ↵crazybob2009-07-011-18/+14
| | | | | | | | because the heap lock may be held by a thread that is no longer running.
* | am 5f9aa938: Merge change 4334 into donutAndroid (Google) Code Review2009-06-161-0/+2
|\ \ | |/ | | | | | | | | | | Merge commit '5f9aa93881e796a66c2a625ced1ee89292c2b570' * commit '5f9aa93881e796a66c2a625ced1ee89292c2b570': Modified Thread to copy the context class loader from parent to child threads. Re-enabled test that covers this. Removed security-related code from test since it was invalid (the security check
| * Modified Thread to copy the context class loader from parent to child ↵crazybob2009-06-161-0/+2
| | | | | | | | | | | | threads. Re-enabled test that covers this. Removed security-related code from test since it was invalid (the security check doesn't occur if the calling code's class loader is an ancestor of the context class loader).
* | am 4e3cc66: am 4645b7c: AI 147732: fix broken linksScott Main2009-04-293-3/+3
|\ \ | |/ | | | | | | | | | | Merge commit '4e3cc66298b8e6d97670d3ed0b4170fb161d36f3' * commit '4e3cc66298b8e6d97670d3ed0b4170fb161d36f3': AI 147732: fix broken links
| * am 4645b7c: AI 147732: fix broken linksScott Main2009-04-283-3/+3
| |\ | | | | | | | | | | | | | | | | | | Merge commit '4645b7c3a461769281a0b2b846a26c79e806aaa0' into donut * commit '4645b7c3a461769281a0b2b846a26c79e806aaa0': AI 147732: fix broken links
| | * AI 147732: fix broken linksScott Main2009-04-243-3/+3
| | | | | | | | | | | | | | | | | | BUG=1810005 Automated import of CL 147732
| | * AI 145288: Removing tabs from tests.Urs Grob2009-04-091-3/+4
| | | | | | | | | | | | | | | | | | BUG=1285921 Automated import of CL 145288
| | * AI 143453: Bringing the luni tests down to zero failures.Jorg Pleumann2009-03-301-0/+7
| | | | | | | | | | | | | | | | | | BUG=1285921 Automated import of CL 143453
* | | am 1c7ba87: Fix an infinite loop in ClassLoader.isAncestorOf()Urs Grob2009-04-291-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | Merge commit '1c7ba87b216ec3de563ac4d70548313da9b9bc1b' * commit '1c7ba87b216ec3de563ac4d70548313da9b9bc1b': Fix an infinite loop in ClassLoader.isAncestorOf()
| * | Fix an infinite loop in ClassLoader.isAncestorOf()Urs Grob2009-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The current version loops endlessly if the callers ClassLoader is not the same as the system ClassLoader. The cause for this is a loop variable that is not changed during the loop. BUG=1732214
| * | AI 145612: am: CL 145288 Removing tabs from tests.Urs Grob2009-04-091-3/+4
| | | | | | | | | | | | | | | | | | | | | Original author: ursg Merged from: //branches/cupcake/... Automated import of CL 145612
| * | AI 143626: am: CL 143453 Bringing the luni tests down to zero failures.Jorg Pleumann2009-03-311-0/+7
| |/ | | | | | | | | | | | | Original author: jorgp Merged from: //branches/cupcake/... Automated import of CL 143626
* | AI 145649: am: CL 145612 am: CL 145288 Removing tabs from tests.Urs Grob2009-04-091-3/+4
| | | | | | | | | | | | | | | | Original author: ursg Merged from: //branches/cupcake/... Original author: android-build Automated import of CL 145649
* | AI 145086: Use process groups to avoid a collision between dexopt and ↵Andy McFadden2009-04-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProcessManager. If the ProcessManager thread was waiting for a child process to finish, it could inadvertently capture the exit status of dexopt. This confused the VM somewhat. With this change the dexopt child runs in its own process group, and the ProcessManager only waits for children in the parent's process group. I also now create a new process in the DexClassLoader test to check for clashes. (It's a race, but it nearly always hits on the device, and occasionally hits on desktop.) BUG=1777736 Automated import of CL 145086
* | AI 143657: am: CL 143626 am: CL 143453 Bringing the luni tests down to zero ↵Jorg Pleumann2009-03-311-0/+7
|/ | | | | | | | | | | failures. Original author: jorgp Merged from: //branches/cupcake/... Original author: android-build Merged from: //branches/donutburger/... Automated import of CL 143657
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0334-0/+15454
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0334-15454/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-106-44/+85
|
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-154-6/+18
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-093-69/+199
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-1727-2882/+4482
|
* Initial ContributionThe Android Open Source Project2008-10-2134-0/+13671