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

lock_write_to_read Kernel Service

Purpose

Downgrades a complex lock from exclusive-write mode to shared-read mode.

Syntax

#include <sys/lock_def.h>
void lock_write_to_read (lock_addr)
complex_lock_t lock_addr;

Parameter

lock_addr Specifies the address of the lock word to be downgraded from exclusive-write to shared-read mode.

Description

The lock_write_to_read kernel service downgrades the specified complex lock from exclusive-write mode to shared-read mode. The calling kernel thread must hold the lock in exclusive-write mode.

Once the lock has been downgraded to shared-read mode, other kernel threads will also be able to acquire it in shared-read mode.

Execution Environment

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

Return Values

The lock_write_to_read kernel service has no return values.

Implementation Specifics

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

Related Information

The lock_init kernel service, lock_islocked kernel service, lock_done kernel service, lock_read_to_write kernel service, lock_try_read_to_write kernel service, lock_try_write kernel service, lock_write kernel service.

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


[ Previous | Next | Contents | Home | Search ]