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

Technical Reference: Kernel and Subsystems, 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.

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 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

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