KS_HOLD0LOCKS(D3) KS_HOLD0LOCKS(D3)
NAME
KS_HOLD0LOCKS - determine if the current context holds no
basic or read/write locks
SYNOPSIS
#include <sys/types.h>
#include <sys/ksynch.h>
#include <sys/ddi.h>
bool_t KS_HOLD0LOCKS(lock_t *lock);
Arguments
None.
DESCRIPTION
Determine if the current context holds no basic or read/write
locks.
Return Values
KS_HOLD0LOCKS returns TRUE if the current context owns no
basic or read/write locks and FALSE otherwise. However, locks
are only counted if the files in which they are allocated and
acquired were compiled with DEBUG and _LOCKTEST defined.
USAGE
The KS_HOLD0LOCKS function is designed to assist in the
debugging of driver code. Production versions of drivers
should avoid calling this function (via use of conditional
compilation under DEBUG).
Level
Initialization, Base or Interrupt if flag is set to
KM_NOSLEEP.
Warnings
The meaning of the current calling context is specific to the
implementation of the operating system kernel. Depending upon
the operating system implementation, when KS_HOLD0LOCKS is
called from an interrupt routine, it may or may not return
TRUE when that interrupt routine is not holding any locks, but
some underlying level (base or interrupt level) is holding
some lock.
Synchronization Constraints
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function
Copyright 1994 Novell, Inc. Page 1
KS_HOLD0LOCKS(D3) KS_HOLD0LOCKS(D3)
REFERENCES
LOCK(D3), LOCK_OWNED(D3), UNLOCK(D3)
NOTICES
Portability
All processors
Applicability
ddi: 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2