Guardian Procedure Calls Reference Manual
◦ BINSEM_LOCK_ which locks a binary semaphore.
◦ BINSEM_UNLOCK_ which unlocks a binary semaphore.
◦ BINSEM_CLOSE_ which closes access to a binary semaphore.
◦ BINSEM_FORCELOCK_ which takes the lock from a process that has the lock.
◦ BINSEM_ISMINE_ which returns whether or not the caller is the current owner of the
binary semaphore.
NOTE: The BINSEM_ISMINE_procedure is supported on systems running H06.12 and later
H-series RVUs and J06.03 and later J-series RVUs.
• Binary semaphore procedures synchronize processes in the same processor
The binary semaphore procedures cannot be used to synchronize processes on different
processors. To synchronize distributed processes, use interprocess messages or file locks as
described in the Guardian Programmer's Guide.
• Binary semaphore resource requirements
On systems running H06.16/J06.05 and earlier RVUs, the maximum number of binary
semaphores a process can have is 64, and the maximum number of binary semaphores a
processor can have open is equal to the number of processes.
On systems running H06.17/J06.06 and later RVUs, the maximum number of binary
semaphores a process can have is 8192, and the maximum number of binary semaphores a
processor can have open is 65536.
Considerations
NOTE: There are additional considerations for privileged callers.
• The create operation and the state of the binary semaphore
The binary semaphore is opened and locked by the calling process when the binary semaphore
is created.
Example
error := BINSEM_CREATE_( semid, security );
Related Programming Manuals
For programming information about the BINSEM_CREATE_ procedure, see the Guardian
Programmer's Guide.
90 Guardian Procedure Calls (A-B)