lock_mine Kernel Service

Purpose

Checks whether a simple or complex lock is owned by the caller.

Syntax

#include <sys/lock_def.h>

boolean_t lock_mine ( lock_addr)
void *lock_addr;

Parameter

Item Description
lock_addr Specifies the address of the lock word to check.

Description

The lock_mine kernel service checks whether the specified simple or complex lock is owned by the calling kernel thread. Because a complex lock held in shared-read mode has no owner, the service returns FALSE in this case. This kernel service is provided to assist with debugging.

Execution Environment

The lock_mine kernel service can be called from the process environment only.

Return Values

Item Description
TRUE Indicates that the calling kernel thread owns the lock.
FALSE Indicates that the calling kernel thread does not own the lock, or that a complex lock is held in shared-read mode.