package concurrency;

/* Semaphore.java */

/** An implementation of a binary semaphore with a FIFO queue, using Dijkstra's
 *  names for the operations
 */
public class BinarySemaphoreWithFIFOQueue extends java.util.concurrent.Semaphore
{
    /** Constructor
     */
    public BinarySemaphoreWithFIFOQueue()
    {
        super(1, true);
    }

    /** Dijskstra's P() operation
     */
    public void P()
    {
        acquireUninterruptibly();
    }

    /** Dijskstra's V() operation
     */
    public void V()
    {
        release();
    }
}
