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

unlock_enable Kernel Service

Purpose

Unlocks a simple lock if necessary, and restores the interrupt priority.

Syntax

#include <sys/lock_def.h>
void unlock_enable (int_pri, lock_addr)
int int_pri;
simple_lock_t lock_addr;

Parameters

int_pri Specifies the interrupt priority to restore. This must be set to the value returned by the corresponding call to the disable_lock kernel service.
lock_addr Specifies the address of the lock word to unlock.

Description

The unlock_enable kernel service unlocks a simple lock if necessary, and restores the interrupt priority, in order to provide optimized thread-interrupt critical section protection for the system on which it is executing. On a multiprocessor system, calling the unlock_enable kernel service is equivalent to calling the simple_unlock and i_enable kernel services. On a uniprocessor system, the call to the simple_unlock service is not necessary, and is omitted. However, you should still pass the valid lock address which was used with the corresponding call to the disable_lock kernel service. Never pass a NULL lock address.

Execution Environment

The unlock_enable kernel service can be called from either the process or interrupt environment.

Return Values

The unlock_enable kernel service has no return values.

Implementation Specifics

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

Related Information

The disable_lock kernel service, i_enable kernel service, simple_unlock kernel service.

Understanding Locking, Locking Kernel Services, Understanding Interrupts, I/O Kernel Services, Interrupt Environment in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]