ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/Semaphore.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/Semaphore.java (file contents):
Revision 1.38 by dl, Sat Jan 10 20:37:03 2004 UTC vs.
Revision 1.39 by dl, Sun Jan 11 16:02:17 2004 UTC

# Line 287 | Line 287 | public class Semaphore implements java.i
287       *
288       */
289      public void acquireUninterruptibly() {
290 <        sync.acquireSharedUninterruptibly(1);
290 >        sync.acquireShared(1);
291      }
292  
293      /**
# Line 360 | Line 360 | public class Semaphore implements java.i
360       */
361      public boolean tryAcquire(long timeout, TimeUnit unit)
362          throws InterruptedException {
363 <        return sync.acquireSharedNanos(1, unit.toNanos(timeout));
363 >        return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
364      }
365  
366      /**
# Line 449 | Line 449 | public class Semaphore implements java.i
449       */
450      public void acquireUninterruptibly(int permits) {
451          if (permits < 0) throw new IllegalArgumentException();
452 <        sync.acquireSharedUninterruptibly(permits);
452 >        sync.acquireShared(permits);
453      }
454  
455      /**
# Line 538 | Line 538 | public class Semaphore implements java.i
538      public boolean tryAcquire(int permits, long timeout, TimeUnit unit)
539          throws InterruptedException {
540          if (permits < 0) throw new IllegalArgumentException();
541 <        return sync.acquireSharedNanos(permits, unit.toNanos(timeout));
541 >        return sync.tryAcquireSharedNanos(permits, unit.toNanos(timeout));
542      }
543  
544      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines