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

Item Description
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.