Home
last modified time | relevance | path

Searched refs:permits (Results 1 – 2 of 2) sorted by relevance

/libcore/luni/src/main/java/java/util/concurrent/
DSemaphore.java140 Sync(int permits) { in Sync() argument
141 setState(permits); in Sync()
195 NonfairSync(int permits) { in NonfairSync() argument
196 super(permits); in NonfairSync()
210 FairSync(int permits) { in FairSync() argument
211 super(permits); in FairSync()
235 public Semaphore(int permits) { in Semaphore() argument
236 sync = new NonfairSync(permits); in Semaphore()
250 public Semaphore(int permits, boolean fair) { in Semaphore() argument
251 sync = fair ? new FairSync(permits) : new NonfairSync(permits); in Semaphore()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DSemaphoreTest.java23 PublicSemaphore(int permits) { super(permits); } in PublicSemaphore() argument
24 PublicSemaphore(int permits, boolean fair) { super(permits, fair); } in PublicSemaphore() argument
94 void acquire(Semaphore s, int permits) throws InterruptedException { in acquireN() argument
95 s.acquire(permits); in acquireN()
104 void acquire(Semaphore s, int permits) { in acquireUninterruptiblyN() argument
105 s.acquireUninterruptibly(permits); in acquireUninterruptiblyN()
114 void acquire(Semaphore s, int permits) { in tryAcquireN() argument
115 assertTrue(s.tryAcquire(permits)); in tryAcquireN()
124 void acquire(Semaphore s, int permits) throws InterruptedException { in acquire() argument
125 assertTrue(s.tryAcquire(permits, 2 * LONG_DELAY_MS, MILLISECONDS)); in acquire()
[all …]