Guardian Procedure Calls Reference Manual
BINSEM_OPEN_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
Example
Related Programming Manuals
Summary
The BINSEM_OPEN_ procedure opens a binary semaphore.
Syntax for C Programmers
#include <cextdecs(BINSEM_OPEN_)>
short BINSEM_OPEN_ ( __int32_t *semid
,short *processhandle
,__int32_t proc-semid );
Or alternatively, as of the H06.25, J06.14, and subsequent RVUs:
#include <kbinsem.h>
short BINSEM_OPEN_ ( binSemID_p semid
,binSemPHan_p processhandle
,binSemID_t proc-semid );
Syntax for TAL Programmers
error := BINSEM_OPEN_ ( semid ! o
,processhandle ! i
,proc-semid ); ! i
Parameters
semid
output
INT (32) .EXT:ref:1
returns the binary semaphore ID that identifies the open binary semaphore locally in this process.
The semid result need not 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 must designate the process in which the proc-semid value is locally
defined. In C/C++, kbinsem.h declares this parameter as of type binSemPhan_p, which can
be either a pointer to an NSK_PHandle structure or a pointer to a short. CEXTDECS declares
this parameter as of type short*. See the Binary Semaphore Interface Declarations section
in the Guardian Programmer's Guide.
BINSEM_OPEN_ Procedure 101