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

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

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

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