Guardian Programming Reference Summary for C

Functions Summary (A-C)
Guardian Programming Reference Summary for C522630-001
4-8
BINSEM_FORCELOCK_
Forces a lock on a binary semaphore
return value:
BINSEM_LOCK_
Locks a binary semaphore.
return value:
#include <cextdecs(BINSEM_FORCELOCK_)>
short BINSEM_FORCELOCK_ ( long semid /* i */
,short *processhandle );/* o */
0=No error.
22 = Bounds error. The processhandle parameter cannot be written to by the
calling process.
4022 = Invalid parameter. The semid parameter does not identify a binary
semaphore that is opened by the calling process. The corresponding OSS
errno value is EINVAL.
4045 = Deadlock. The binary semaphore was forsaken before the procedure call,
and it is now locked. The corresponding OSS errno value is EDEADLK.
4103 = Already locked. The binary semaphore was locked by the calling process
before the procedure call, and it remains locked. The corresponding OSS
errno value is EALREADY.
#include <cextdecs(BINSEM_LOCK_)>
short BINSEM_LOCK_ ( long semid /* i */
,long timeout );/* i */
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 OSS 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 OSS
errno value is EINVAL.
4045 = Deadlock. The binary semaphore was forsaken before the procedure call,
and it is now locked. The corresponding OSS errno value is EDEADLK.