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

disable_lock Kernel Service

Purpose

Raises the interrupt priority, and locks a simple lock if necessary.

Syntax

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

Parameters

int_pri Specifies the interrupt priority to set.
lock_addr Specifies the address of the lock word to lock.

Description

The disable_lock kernel service raises the interrupt priority, and locks a simple lock if necessary, in order to provide optimized thread-interrupt critical section protection for the system on which it is executing. On a multiprocessor system, calling the disable_lock kernel service is equivalent to calling the i_disable and simple_lock kernel services. On a uniprocessor system, the call to the simple_lock service is not necessary, and is omitted. However, you should still pass a valid lock address to the disable_lock kernel service. Never pass a NULL lock address.

Execution Environment

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

Return Values

The disable_lock kernel service returns the previous interrupt priority.

Implementation Specifics

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

Related Information

The i_disable kernel service, simple_lock_init kernel service, simple_lock kernel service, unlock_enable kernel service.

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


[ Previous | Next | Contents | Home | Search ]