[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

simple_unlock Kernel Service

Purpose

Unlocks a simple lock.

Syntax

#include <sys/lock_def.h>
void simple_unlock (lock_addr)
simple_lock_t lock_addr;

Parameter

lock_addr Specifies the address of the lock word to unlock.

Description

The simple_unlock kernel service unlocks the specified simple lock. The lock must be held by the thread which calls the simple_unlock kernel service. Once the simple lock is unlocked, the highest priority thread (if any) which is waiting for it is made runnable, and may compete for the lock again. If at least one kernel thread was waiting for the lock, the priority of the calling kernel thread is recomputed.

Note: When using simple locks to protect thread-interrupt critical sections, it is recommended that you use the unlock_enable kernel service instead of calling the simple_unlock kernel service directly.

Execution Environment

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

Return Values

The simple_unlock kernel service has no return values.

Implementation Specifics

The simple_unlock kernel service is part of the Base Operating System (BOS) Runtime.

Related Information

The lock_mine kernel service, simple_lock_init kernel service, simple_lock kernel service, simple_lock_try kernel service, unlock_enable kernel service.

Understanding Locking and Locking Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts


[ Previous | Next | Contents | Home | Search ]