diff options
author | Luca Barbieri <luca.barbieri@gmail.com> | 2005-04-26 21:49:23 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2005-04-26 21:49:23 +0000 |
commit | 31f0451e7eeba3e6d900d93fb058cb9094390693 (patch) | |
tree | 19a46052fc10b4d4fe8b260a4f8953b3648683ac /libjava/gnu/java/nio/channels | |
parent | 583db39167cba2b3ddfda3d0227c89d75fbbc6b3 (diff) | |
download | gcc-31f0451e7eeba3e6d900d93fb058cb9094390693.zip gcc-31f0451e7eeba3e6d900d93fb058cb9094390693.tar.gz gcc-31f0451e7eeba3e6d900d93fb058cb9094390693.tar.bz2 |
re PR libgcj/21136 ([4.0 only] tryLock waits for the lock, and lock doesn't)
2005-04-26 Luca Barbieri <luca.barbieri@gmail.com>
PR libgcj/21136:
* gnu/java/nio/channels/FileChannelImpl.java (tryLock): Pass
'false' to native lock().
(lock): Pass 'true' to native lock().
From-SVN: r98792
Diffstat (limited to 'libjava/gnu/java/nio/channels')
-rw-r--r-- | libjava/gnu/java/nio/channels/FileChannelImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libjava/gnu/java/nio/channels/FileChannelImpl.java b/libjava/gnu/java/nio/channels/FileChannelImpl.java index e5b02e9..9d978c9 100644 --- a/libjava/gnu/java/nio/channels/FileChannelImpl.java +++ b/libjava/gnu/java/nio/channels/FileChannelImpl.java @@ -419,7 +419,7 @@ public final class FileChannelImpl extends FileChannel try { begin(); - lock(position, size, shared, true); + lock(position, size, shared, false); completed = true; return new FileLockImpl(this, position, size, shared); } @@ -451,7 +451,7 @@ public final class FileChannelImpl extends FileChannel try { - boolean lockable = lock(position, size, shared, false); + boolean lockable = lock(position, size, shared, true); completed = true; return (lockable ? new FileLockImpl(this, position, size, shared) |