Locks a complex lock in exclusive-write mode.
Item | Description |
---|---|
lock_addr | Specifies the address of the lock word to lock. |
The lock_write kernel service locks the specified complex lock in exclusive-write mode; it blocks if the lock is busy. The lock must have been previously initialized with the lock_init kernel service. The lock_write kernel service has no return values.
The lock_try_write kernel service tries to lock the specified complex lock in exclusive-write mode; it returns immediately without blocking if the lock is busy. The lock must have been previously initialized with the lock_init kernel service.
The lock_write and lock_try_write kernel services can be called from the process environment only.
The lock_try_write kernel service has the following parameters:
Item | Description |
---|---|
TRUE | Indicates that the lock was successfully acquired. |
FALSE | Indicates that the lock was not acquired. |