lock_clear_recursive Kernel Service
Purpose
Prevents a complex lock from being acquired recursively.
Syntax
#include <sys/lock_def.h> void lock_clear_recursive (lock_addr)
complex_lock_t lock_addr;
complex_lock_t lock_addr;
Parameter
| Item | Description |
|---|---|
| lock_addr | Specifies the address of the lock word that will be protected from being acquired recursively. |
Description
The lock_clear_recursive kernel service prevents the specified complex lock from being acquired recursively. The complex lock must have been made recursive by using the lock_set_recursive kernel service. The calling thread must hold the specified complex lock in write-exclusive mode.
Note: The lock_set_recursive and lock_clear_recursive kernel services must be used in
pairs and must be called only when recursion is likely to occur. The lock_set_recursive
kernel service must be called after making a call to the lock_write kernel service and the
lock_clear_recursive kernel service must be called before making the call to the
lock_done kernel service in routines where recursion might occur down the call stack.
Execution Environment
The lock_clear_recursive kernel service can be called from the process environment only.
Return Values
The lock_clear_recursive kernel service has no return values.