mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
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
This commit is contained in:
committed by
Tom Tromey
parent
583db39167
commit
31f0451e7e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user