Allocates system memory for a simple or complex lock.
#include <sys/lock_def.h> #include <sys/lock_alloc.h>
void lock_alloc ( lock_addr, flags, class, occurrence)
void *lock_addr;
int flags;
short class;
short occurrence;
lock_addr | Specifies a valid simple or complex lock address. |
flags | Specifies whether the memory allocated is to be pinned or pageable. Set this parameter as follows: |
The lock_alloc kernel service allocates system memory for a simple or complex lock. The lock_alloc kernel service must be called for each simple or complex before the lock is initialized and used. The memory allocated is for internal lock instrumentation use, and is not returned to the caller; no memory is allocated if instrumentation is not used.
The lock_alloc kernel service can be called from the process environment only.
The lock_alloc kernel service has no return values.
The lock_free kernel service, lock_init kernel service, simple_lock_init kernel service.
Understanding Locking and Locking Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts