dglockwait(2) DG/UX 4.30 dglockwait(2)
NAME
dg_lock_wait - Wait for previously delayed lock requests to
complete.
SYNOPSIS
int dg_lock_wait (client_id_ptr, client_id_in_use_ptr)
int * client_id_ptr;
int * client_id_in_use_ptr;
PARAMETERS
client_id_ptr Space to return the client id of the
completed request.
client_id_in_use_ptr
Space to return whether the lock client id is
in use.
DESCRIPTION
Dg_lock_wait() suspends the calling process until either a
signal is received, or a previously issued lock request that
has been delayed completes.
If a previously issued lock request completes, the
<client_id_ptr> argument identifies the client of the
completed request, and <client_id_in_use_ptr> indicates
whether client currently holds any locks or lock requests.
The return value may be 0 or -1, depending upon whether the
request was successful.
If a signal is received before any requests complete, then
dg_lock_wait() returns and both <client_id_ptr> and
<client_id_in_use_ptr> are invalid. In this case, the
return value is -1, and errno is set to EINTR.
The only process that uses this function is the network lock
server, rpc.lockd.
ACCESS CONTROL
The caller must be super-user.
RETURN VALUE
0 The dg_lock_wait operation was successful.
The <client_id_ptr> lock request was granted.
-1 An error occurred. Errno indicates the
error.
EXCEPTIONS
Errno may be set to one of the following error codes:
Licensed material--property of copyright holder(s) Page 1
dglockwait(2) DG/UX 4.30 dglockwait(2)
EPERM Must be super-user to use this system call.
The content of both <client_id_ptr> and
<client_id_in_use_ptr> are invalid.
EFAULT One of the arguments points outside the
process's readable address space. The
content of both <client_id_ptr> and
<client_id_in_use_ptr> are invalid.
EDEADLK The <client_id_ptr> lock request is refused
because it would cause a deadlock. Both
<client_id_ptr> and <client_id_in_use_ptr>
are valid.
EINTR A signal was received. The content of both
<client_id_ptr> and <client_id_in_use_ptr>
are invalid.
SEE ALSO
The related manual sections: fcntl(2), dg_lcntl(2),
dg_lock_reset(2),
lockf(3),
fcntl(5)
Licensed material--property of copyright holder(s) Page 2