Guardian Procedure Calls Reference Manual

BINSEM_FORCELOCK_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
Example
Related Programming Manuals
Summary
The BINSEM_FORCELOCK_ procedure forces a lock on a binary semaphore. This procedure is
used when it is not possible to lock a binary semaphore with the BINSEM_LOCK_ procedure.
Syntax for C Programmers
#include <cextdecs(BINSEM_FORCELOCK_)>
short BINSEM_FORCELOCK_ ( __int32_t semid
,short *processhandle );
Syntax for TAL Programmers
status := BINSEM_FORCELOCK_ ( semid ! i
,processhandle ); ! o
Parameters
semid
input
INT (32):value
specifies the binary semaphore ID.
processhandle
output
INT .EXT:ref:10
returns the process handle of the process that previously held the lock on the binary semaphore.
A null process handle (-1 in each word) is returned if the binary semaphore was previously
unlocked. If status is 4045 or 4103, processhandle is not updated.
Returned Value
INT
Outcome of the call:
Bounds error. The processhandle parameter cannot be written to by the calling process.22
Invalid parameter. The semid parameter does not identify a binary semaphore that is opened by the calling
process. The corresponding errno value is EINVAL.
4022
BINSEM_FORCELOCK_ Procedure 91