drw_lock_write_to_read Kernel Service

Purpose

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

Syntax

#include <sys/lock_def.h>

void  drw_lock_write_to_read( lock_addr)
drw_lock_t   lock_addr ;    

Parameters

Item Description
lock_addr Specifies the address of the lock word to lock.

Description

The drw_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 read-shared mode.

Execution Environment

The drw_lock_write_to_read kernel service may be called from either the process environment or the interrupt environment. However, if called from the process environment, interrupts must be disabled to some interrupt priority other than INTBASE.

Return Values

None