HELPLIB.HLB  —  RTL Routines, PPL$  PPL$CREATE_SEMAPHORE
    The Create a Semaphore routine creates and initializes a
    semaphore with a waiting queue, and returns the semaphore
    identifier. You use the semaphore identifier to perform all
    operations on that semaphore.

    Format

      PPL$CREATE_SEMAPHORE  semaphore-id [,semaphore-name]

                            [,semaphore-maximum] [,semaphore-initial]

1  –  Arguments

 semaphore-id

    OpenVMS usage identifier
    type          longword (unsigned)
    access        write only
    mechanism     by reference
    Identifier of the semaphore. The semaphore-id argument is the
    address of an unsigned longword containing the identifier.
    Semaphore-id must be used in other calls to identify the
    semaphore.

 semaphore-name

    OpenVMS usage char_string
    type          character string
    access        read only
    mechanism     by descriptor
    Name of the semaphore. The semaphore-name argument is the address
    of a descriptor pointing to a character string containing
    the semaphore name. The name of the semaphore is entirely
    arbitrary. If you do not specify a value for semaphore-name,
    or if you specify 0, a new unnamed semaphore is created. An
    arbitrary number of unnamed semaphores may be created by a given
    application.

 semaphore-maximum

    OpenVMS usage word_signed
    type          word (signed)
    access        read only
    mechanism     by reference
    Maximum value of the semaphore. The semaphore-maximum argument
    is the address of a signed word containing the maximum value.
    This value must be nonnegative. If you do not supply a value for
    semaphore-maximum, a default value of 1 is used, thereby making
    it a binary semaphore.

 semaphore-initial

    OpenVMS usage word_signed
    type          word (signed)
    access        read only
    mechanism     by reference
    Initial value of the semaphore. The semaphore-initial argument is
    the address of a signed word containing the initial value. This
    value must be less than or equal to the semaphore-maximum value.
    If you do not supply a value for semaphore-initial, a default
    value equal to semaphore-maximum is used.
Close Help