[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Technical Reference: Kernel and Subsystems, Volume 1
lock_free Kernel Service
Purpose
Frees the memory of a simple or complex lock.
Syntax
#include <sys/lock_def.h>
#include <sys/lock_alloc.h>
void lock_free ( lock_addr)
void *lock_addr;
Parameter
lock_addr |
Specifies the address of the lock word whose memory is to be freed. |
Description
The lock_free kernel service
frees the memory of a simple or complex lock. The memory freed is the internal
operating system memory which was allocated with the lock_alloc kernel service.
Note
It is only necessary to call the lock_free kernel service when the memory that the corresponding lock was protecting
is released. For example, if you allocate memory for an i-node which is to
be protected by a lock, you must allocate and initialize the lock before
using it. The memory may be used with several i-nodes, each taken from,
and returned to, the free i-node pool; the lock_init
kernel service must be called each time this is done.The lock_free kernel service must be called when the memory allocated for
the inode is finally freed.
Execution Environment
The lock_free kernel service
can be called from the process environment
only.
Return Values
The lock_free kernel service
has no return values.
Related Information
The lock_alloc 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 ]