Searched refs:permits (Results 1 – 2 of 2) sorted by relevance
140 Sync(int permits) { in Sync() argument141 setState(permits); in Sync()195 NonfairSync(int permits) { in NonfairSync() argument196 super(permits); in NonfairSync()210 FairSync(int permits) { in FairSync() argument211 super(permits); in FairSync()235 public Semaphore(int permits) { in Semaphore() argument236 sync = new NonfairSync(permits); in Semaphore()250 public Semaphore(int permits, boolean fair) { in Semaphore() argument251 sync = fair ? new FairSync(permits) : new NonfairSync(permits); in Semaphore()[all …]
23 PublicSemaphore(int permits) { super(permits); } in PublicSemaphore() argument24 PublicSemaphore(int permits, boolean fair) { super(permits, fair); } in PublicSemaphore() argument94 void acquire(Semaphore s, int permits) throws InterruptedException { in acquireN() argument95 s.acquire(permits); in acquireN()104 void acquire(Semaphore s, int permits) { in acquireUninterruptiblyN() argument105 s.acquireUninterruptibly(permits); in acquireUninterruptiblyN()114 void acquire(Semaphore s, int permits) { in tryAcquireN() argument115 assertTrue(s.tryAcquire(permits)); in tryAcquireN()124 void acquire(Semaphore s, int permits) throws InterruptedException { in acquire() argument125 assertTrue(s.tryAcquire(permits, 2 * LONG_DELAY_MS, MILLISECONDS)); in acquire()[all …]