Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual—522629-013
2-64
BINSEM_LOCK_ Procedure
BINSEM_LOCK_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Considerations
Example
Related Programming Manuals
Summary
The BINSEM_LOCK_ procedure locks a binary semaphore.
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
status returned value
INT
indicates the outcome of the call:
0 No error. The binary semaphore becomes locked.
4011 Operation timed out. The
timeout value was reached before the binary
semaphore could be locked. The corresponding
errno value is EAGAIN.
4022 Invalid parameter. The
semid parameter does not identify a binary
semaphore that is opened by the calling process. The corresponding
errno value is EINVAL.
4045 Deadlock. The binary semaphore was forsaken before the procedure call,
and it is now locked. The corresponding
errno value is EDEADLK.
semid input
INT (32):value
#include <cextdecs(BINSEM_LOCK_)>
short BINSEM_LOCK_ ( __int32_t semid
,__int32_t timeout );
status := BINSEM_LOCK_ ( semid ! i
,timeout ); ! i