dg_sem_pend(2) DG/UX R4.11MU05 dg_sem_pend(2)
NAME
dgsempend - pend on a binary semaphore
SYNOPSIS
int dgsempend (int semid)
where:
semid The id of any binary semaphore in the set that was
previously allocated by the calling process
DESCRIPTION
The dgsempend system call will pend the calling thread on the
binary semaphore until it has been posted or the calling thread is
interrupted by a signal. The semid can be the identifier of any
binary semaphore in the set that was previously allocated by the
process.
Only one thread in a process can pend a binary semaphore.
ACCESS CONTROL
On a system with DG/UX information security, appropriate privilege is
required by having one or more specific capabilities enabled in the
effective capability set of the user. See capdefaults for the
default capabilities for this command.
RETURN VALUE
0 Completed successfully.
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EINVAL semid is not allocated to the process.
EINTR The thread was interrupted by a signal while waiting for the
binary semaphore to be posted.
EACCES The system supports DG/UX information security and the caller
does not have appropriate privilege.
SEE ALSO
dgsemgetid(2), dgsemreleaseid(2), dgsempost(2),
capdefaults(5).
Licensed material--property of copyright holder(s)