[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

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

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

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.

Related Information

The lock_init kernel service, lock_islocked kernel service, lock_read kernel service, lock_write kernel service, simple_lock kernel service.

Understanding Locking and Locking Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]