60a0a96f334f159418763cab17c48a09c97cbd2f |
13-Aug-2010 |
Elliott Hughes <enh@google.com> |
Fix reading from an empty non-blocking pipe. The active ingredient here is getting rid of the lines that threw InterruptedIOException in "OSFileSystem.cpp". I don't think that code was ever right, but until I rewrote Pipe it wasn't possible to exercise that code. The other changes are cosmetic, made while understanding this code well enough to find the bug, plus a new test for this behavior. Bug: 2901552 Change-Id: Id9cd3cdd6a97b225bbf7c352a6e0c535e9f9da1d
hannels.java
elector.java
|
7365de1056414750d0a7d1fdd26025fd247f0d04 |
12-Aug-2010 |
Jesse Wilson <jessewilson@google.com> |
Sorting imports. Change-Id: I8347bc625480a1c37a1ed9976193ddfedeb00bbc
atagramChannel.java
electionKey.java
ocketChannel.java
|
036ffc75d2b7ece42bcd97f290c026e215868ba9 |
05-Aug-2010 |
Elliott Hughes <enh@google.com> |
Rationalize and simplify our "connect" implementations. We don't need to copy a context structure back and forth between native code and Java: it didn't contain anything but temporaries anyway. We don't need a convenience method for a blocking connect with no timeout. We don't need a separate codepath for datagram and stream sockets' connect calls. There are further simplifications that could be made, I think. I think we could implement "connect" in Java in terms of "connectNonBlocking" and "isConnected" (since that's how our native implementation works anyway). I also think we can fix the 100ms polling too, though I haven't investigated and that may require that we fix the general "interrupt on close" problem. Change-Id: Ib5989fa05f5dd7dd24b681fab70f856cd0bc5c56
electionKey.java
|
99a89dd6f0a0e1396aa9b3feebf15ea31f703d3a |
04-Aug-2010 |
Elliott Hughes <enh@google.com> |
Rewrite the nio Pipe to use a Unix pipe behind the scenes. We were using an AF_INET or AF_INET6 socket to implement the nio Pipe, which was causing trouble for people on systems where IPv6 wasn't working yet. This patch switches over to pipe(2). My first implementation used socketpair(2) and retained the SocketChannelImpls, but it still seemed a bit off to be asking for a full-duplex pipe to implement a unidirectional channel, and it required hacks in the networking code to cope with the AF_LOCAL family, and in the BlockGuard for the isLingeringSocket test. This implementation uses pipe(2) and FileChannelImpl. It breaks a few tests, but the tests are wrong, and it actually brings us closer to the RI's behavior of throwing IOException "broken pipe" when writing to a broken pipe. Rather than keep throwing junk into the FileSystem/NetworkSystem classes, and resolving the question of which of those setNonBlocking belonged in (answer: neither; this is a false Windows-style dichotomy that isn't helpful here), I've added a new IoUtils with a few generally useful methods. The remainder of this patch switches over existing code. We could probably make FileDescriptor.descriptor private now I've exposed accessors, but this change is large enough already... Bug: 2735373 Bug: http://code.google.com/p/android/issues/detail?id=9431 Change-Id: I6b6d1e50bdddd435e71c31105a73c9d4fd135d7e
ipe.java
|
4e4000ed98f9056639fba0713a3fd3caacf9746c |
27-Jul-2010 |
Elliott Hughes <enh@google.com> |
Let the kernel handle network timeouts by setting SO_RCVTIMEO. As far as I can tell, the reason other implementations use select(2) instead of SO_RCVTIMEO is that traditionally the latter wasn't implemented. Stevens is unusually unspecific about the portability of SO_RCVTIMEO, but the web says that Linux didn't support it until 2.4, and Solaris was late and buggy too. Modern versions of Linux, Mac OS, and Windows all support SO_RCVTIMEO, though, so portability should not be a concern for us. This patch causes a regression; several of the blocking network I/O methods that used to be interruptible by virtue of their select(2)-based manual implementation of timeouts are no longer interruptible. Making all network I/O interruptible is work in progress, covered by http://b/2823977. Bug: http://b/2512069 Change-Id: I0a2812ca1537bd171c4205343d6b3b526b72b2b2
pi/AbstractSelectableChannel.java
|
753dcd862b31e85766225590d90ba0b9f481176f |
02-Jun-2010 |
Elliott Hughes <enh@google.com> |
Refactor some of the OSNetworkSystem stuff to more appropriate homes. Also rewrite PlainDatagramSocketImpl.peek in terms of existing primitives rather than requiring its own. I still don't see how it can get called, but at least now it doesn't require its own native code. Bug: 2686833 Change-Id: I0453add66dab4c7095ee2a3f51a49efbd1205598
pi/SelectorProvider.java
|
f33eae7e84eb6d3b0f4e86b59605bb3de73009f3 |
13-May-2010 |
Elliott Hughes <enh@google.com> |
Remove all trailing whitespace from the dalvik team-maintained parts of libcore. Gentlemen, you may now set your editors to "strip trailing whitespace"... Change-Id: I85b2f6c80e5fbef1af6cab11789790b078c11b1b
lreadyConnectedException.java
synchronousCloseException.java
yteChannel.java
ancelledKeyException.java
hannel.java
hannels.java
losedByInterruptException.java
losedChannelException.java
losedSelectorException.java
onnectionPendingException.java
atagramChannel.java
ileChannel.java
ileLock.java
ileLockInterruptionException.java
atheringByteChannel.java
llegalBlockingModeException.java
llegalSelectorException.java
nterruptibleChannel.java
oConnectionPendingException.java
onReadableChannelException.java
onWritableChannelException.java
otYetBoundException.java
otYetConnectedException.java
verlappingFileLockException.java
ipe.java
eadableByteChannel.java
catteringByteChannel.java
electableChannel.java
electionKey.java
elector.java
erverSocketChannel.java
ocketChannel.java
nresolvedAddressException.java
nsupportedAddressTypeException.java
ritableByteChannel.java
pi/AbstractInterruptibleChannel.java
pi/AbstractSelectableChannel.java
pi/AbstractSelectionKey.java
pi/AbstractSelector.java
pi/SelectorProvider.java
|
fd6bb3510c2f94d636f3572dcf5f7f4dcd1a2726 |
13-May-2010 |
Elliott Hughes <enh@google.com> |
Remove //$NON-NLS-\d$ cruft. Mostly done by perl(1), with manual cleanup of the few misspelled instances. This makes our trailing whitespace slightly worse, but I'll fix all that with a follow-on change. Change-Id: I0b4ca98819be6f9519c4ba980d759bd1ee1a0303
ileChannel.java
pi/AbstractInterruptibleChannel.java
pi/SelectorProvider.java
|
5f37da05bb48298568f8abd7c97c3d11552e1867 |
11-May-2010 |
Elliott Hughes <enh@google.com> |
Documentation improvements. Remove a bunch of content-free "package.html" files, and rewrite the Pattern documentation. Change-Id: Ieb4eee940dbbeab21828b8d7b2f172732f9dd6de
ackage.html
pi/package.html
|
edc2dae4345ea305f092ade00419685d77c8eee9 |
08-May-2010 |
Elliott Hughes <enh@google.com> |
Trivia. Remove unused parameters from NetworkInterface's native methods. Remove commented-out static initializers. Fix FileChannel.force so that force(true) doesn't do _less_ than force(false). Note that force(true) still doesn't do _more_ than force(false) because bionic doesn't implement fdatasync(2). I've raised a bug against bionic about that. Change-Id: Ia5e827638606a7919e3bcf324810747ee6bcbb9a
atagramChannel.java
ocketChannel.java
|
3ff29eb11a241d58c54ecc84230bb0672f4aa148 |
23-Apr-2010 |
Peter Hallam <peterhal@google.com> |
More merging of nio into luni Change-Id: Ib4356b3cd57490df8ff246ea6a4bc1c269ba848b
lreadyConnectedException.java
synchronousCloseException.java
yteChannel.java
ancelledKeyException.java
hannel.java
hannels.java
losedByInterruptException.java
losedChannelException.java
losedSelectorException.java
onnectionPendingException.java
atagramChannel.java
ileChannel.java
ileLock.java
ileLockInterruptionException.java
atheringByteChannel.java
llegalBlockingModeException.java
llegalSelectorException.java
nterruptibleChannel.java
oConnectionPendingException.java
onReadableChannelException.java
onWritableChannelException.java
otYetBoundException.java
otYetConnectedException.java
verlappingFileLockException.java
ipe.java
eadableByteChannel.java
catteringByteChannel.java
electableChannel.java
electionKey.java
elector.java
erverSocketChannel.java
ocketChannel.java
nresolvedAddressException.java
nsupportedAddressTypeException.java
ritableByteChannel.java
ackage.html
pi/AbstractInterruptibleChannel.java
pi/AbstractSelectableChannel.java
pi/AbstractSelectionKey.java
pi/AbstractSelector.java
pi/SelectorProvider.java
pi/package.html
|