DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

KS_HOLD0LOCKS(D3)


KS_HOLD0LOCKS -- determine that 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();

Description

Determine whether the current context holds any basic or read/write locks.

Arguments

None.

Return values

KS_HOLD0LOCKS( ) returns TRUE if the current context owns no basic or read/write locks and FALSE otherwise. Locks are counted only if the files in which they are allocated and acquired were compiled with DEBUG and _LOCKTEST defined.

Usage

The KS_HOLD0LOCKS( ) function is used when debugging driver code. Production versions of drivers should avoid calling this function (via use of conditional compilation under DEBUG).

Context and synchronization

Non-blockable, user or blockable context.

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 interrupt context, it may or may not return TRUE when that interrupt context is not holding any locks, but some underlying level (base or interrupt level) is holding some lock.

Hardware applicability

All

Version applicability

ddi: 5, 5mp, 6, 6mp, 7, 7mp, 8, 8mp

References

LOCK(D3), LOCK_OWNED(D3), UNLOCK(D3)

``Spin locks (DDI)'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005