lkinfo(D4DK) —
.IX \f4lkinfo\fP(D4DK)
NAME
lkinfo − lock information structure
SYNOPSIS
#include <sys/ksynch.h>
DESCRIPTION
Various lock allocation functions [LOCK_ALLOC(D3DK), RW_ALLOC(D3DK), and SLEEP_ALLOC(D3DK)] take as arguments a pointer to a lkinfo structure which describes attributes of the lock being allocated. The same lkinfo structure may be shared among multiple basic locks and read/write locks but an lkinfo structure may not be shared between a basic lock and a sleep lock.
The lkinfo structure is defined as type lkinfo_t.
STRUCTURE MEMBERS
The currently defined members of the lkinfo structure are shown below.
| char | ∗lk_name; | /∗ lock name ∗/ |
| int | lk_flags; | /∗ bit flags ∗/ |
| long | lk_pad[2]; | /∗ reserved for future use ∗/ |
The lk_name member of the structure must be initialized by the driver to point to a character string defining a name for the lock. The name should begin with the driver prefix. See the description of the individual allocation functions (for example, LOCK_ALLOC) for additional guidelines on naming and rules for sharing of lkinfo structures among locks.
The lk_flags member is a bit field for flags. The only bit flag currently defined for use in this field is the LK_NOSTATS flag which, when passed to SLEEP_ALLOC, specifies that statistics are not to be collected for this lock under the _MPSTATS compilation option. There are no flags defined within lk_flags for use with the LOCK_ALLOC and RW_ALLOC functions (LK_NOSTATS is not defined for use with these functions) and the lk_flags member must be zeroed out by the driver before passing the lkinfo structure to LOCK_ALLOC or RW_ALLOC.
The lk_pad member is reserved for future use and must be zeroed out by the driver before passing the lkinfo structure to LOCK_ALLOC, RW_ALLOC, or SLEEP_ALLOC.
SEE ALSO
LOCK_ALLOC(D3DK), RW_ALLOC(D3DK), SLEEP_ALLOC(D3DK)
DDI/DKI