 |
Index for Section 3 |
|
 |
Alphabetical listing for D |
|
 |
Bottom of page |
|
dlm_get_lkinfo(3)
NAME
dlm_get_lkinfo - Obtains information about a lock request associated with a
process
LIBRARY
Distributed Lock Manager Library (libdlm.a)
SYNOPSIS
#include <sys/dlm.h>
dlm_status_t dlm_get_lkinfo (
dlm_lkid_t *lkid_p,
dlm_lkinfo_t *lkinfo );
PARAMETERS
lkid_p Specifies the lock ID of the lock for which information is to be
returned.
lkinfo Specifies the address of a buffer to which dlm_get_lkinfo copies
the contents of the dlm_lkinfo_t structure for the lock.
DESCRIPTION
The dlm_get_lkinfo() function returns lock information about a lock request
associated with a given process. It uses the specified lock ID to locate
the lock request, then returns the dlm_lkinfo_t structure for the lock
request to the buffer specified by the lkinfo parameter.
You must be the superuser or the lock owner to obtain information about a
lock.
The dlm_lkinfo_t structure is defined by dlm.h, as follows:
typedef struct {
char resnam[DLM_RESNAMELEN];
ushort_t resnlen;
dlm_lkid_t parlkid;
dlm_lkmode_t rqmode;
dlm_valb_t *valb;
dlm_flags_t flags;
callback_arg_t notprm;
callback_arg_t hint;
blk_callback_t blkrtn;
uint_t timeout;
cpl_callback_t cplrtn;
int sig;
dlm_lkmode_t grmode;
usr_lk_states_t lkstate;
pid_t lk_pid;
} dlm_lkinfo_t;
The following table describes the members of the dlm_lkinfo_t structure:
________________________________________
Member Definition
________________________________________
resnam
Resource name, as provided in
the lock request.
resnlen
Resource name length, as
provided in the lock request.
parlkid
Parent lock ID, as provided in
the lock request.
rqmode
Requested mode of lock, as
provided in the lock request.
valb
Address of process's lock
value block, as provided in
the lock request.
flags
Flags provided in the lock
request.
notprm
Parameter to be passed to the
blocking notification routine,
as provided in the lock
request.
hint
Parameter to be passed to the
blocking notification routine
of another lock that blocks
this lock, as provided in the
lock request.
blkrtn
Address of blocking
notification routine, as
provided in the lock request.
timeout
Lock request timeout value, as
provided in the lock request.
cplrtn
Address of completion routine,
as provided in lock request.
sig
Signal the distributed lock
manager (DLM) uses to deliver
completion and blocking
notifications. A call to
dlm_set_signal specifies this
signal.
grmode
Current granted mode of the
lock request. The
dlm_get_lkinfo function
returns a DLM_NOMODE value to
this member if the lock has
not yet been granted.
lkstate
Current state of the lock
request. A lock can be in an
internal intermediate state
(INTRANSIT), in the granted
queue (GRANTED), in the
conversion queue (CONVERTING),
or in the wait queue
(WAITING).
lk_pid
Process ID (PID) of the
process that currently owns
the lock.
________________________________________
RETURN VALUES
Upon completion, the dlm_get_lkinfo() function returns one of the following
values:
DLM_SUCCESS
The lock information request was successfully completed.
DLM_BADPARAM
The lkinfo parameter was not specified.
DLM_EFAULT
An error occurred in the copy operation to or from the DLM
database.
DLM_ENOSYS
The DLM is not enabled.
DLM_IVLOCKID
You specified an invalid or nonexistent lock ID.
DLM_NOACCESS
This process is not permitted access to the lock request.
FILES
/usr/include/sys/dlm.h
DLM library header file.
/usr/examples/cluster/api_ex_master.c|api_ex_client.c
Source files for an example showing lock conversion and value
block usage.
RELATED INFORMATION
Functions: dlm_cancel(3), dlm_cvt(3), dlm_detach(3), dlm_get_rsbinfo(3),
dlm_glc_attach(3), dlm_glc_create(3), dlm_glc_detach(3),
dlm_glc_destroy(3), dlm_lock(3), dlm_notify(3), dlm_nsjoin(3),
dlm_nsleave(3),dlm_perrno(3), dlm_quecvt(3), dlm_quelock(3),
dlm_rd_attach(3), dlm_rd_collect(3), dlm_rd_detach(3), dlm_rd_validate(3),
dlm_set_signal(3), dlm_unlock(3)
File: dlm(4)
TruCluster Server Cluster Highly Available Applications
 |
Index for Section 3 |
|
 |
Alphabetical listing for D |
|
 |
Top of page |
|