Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual522629-013
2-68
BINSEM_OPEN_ Procedure
set by the BINSEM_CREATE_ procedure. The corresponding errno
value is
EACCES.
4022 Invalid parameter. The
processhandle parameter does not specify a
process. A process that is being created or is terminating is treated as
though it does not exist. The corresponding
errno value is EINVAL.
4024 Process cannot open the binary semaphore. The process has reached the
maximum limit of binary semaphores it can open, or the process file
segment (PFS) has reached the maximum limit of available space. The
corresponding
errno value is EMFILE.
semid output
INT (32) .EXT:ref:1
returns the binary semaphore ID of this instance of the open binary semaphore.
The
semid parameter might have the same value as the proc-semid
parameter.
processhandle input
INT .EXT:ref:10
specifies the process handle of a process that has already opened the binary
semaphore. The
processhandle and proc-semid pair can be obtained by a
previous call to the BINSEM_CREATE_ or BINSEM_OPEN_ procedure.
proc-semid input
INT (32):value
specifies the binary semaphore ID of an open binary semaphore. The
processhandle and proc-semid pair can be obtained by a previous call to the
BINSEM_CREATE_ or BINSEM_OPEN_ procedure.
Considerations
The open operation and the state of the binary semaphore
The state of the binary semaphore remains unchanged from its original state.
For information about binary semaphores, see “General Considerations for Binary
Semaphores” for the BINSEM_CREATE_ procedure.
Example
error := BINSEM_OPEN_( semid, processhandle, proc^semid );
Note. There are additional considerations for privileged callers.