Upgrades a complex lock from shared-read mode to exclusive-write mode.
Item | Description |
---|---|
lock_addr | Specifies the address of the lock word to be converted from read-shared to write-exclusive mode. |
The lock_read_to_write and lock_try_read_to_write kernel services try to upgrade the specified complex lock from shared-read mode to exclusive-write mode. The lock is successfully upgraded if no other thread has already requested write-exclusive access for this lock. If the lock cannot be upgraded, it is no longer held on return from the lock_read_to_write kernel service; it is still held in shared-read mode on return from the lock_try_read_to_write kernel service.
The calling kernel thread must hold the lock in shared-read mode.
The lock_read_to_write and lock_try_read_to_write kernel services can be called from the process environment only.
The following only apply to lock_read_to_write:
Item | Description |
---|---|
TRUE | Indicates that the lock was not upgraded and is no longer held. |
FALSE | Indicates that the lock was successfully upgraded to exclusive-write mode. |
The following only apply to lock_try_read_to_write:
Item | Description |
---|---|
TRUE | Indicates that the lock was successfully upgraded to exclusive-write mode. |
FALSE | Indicates that the lock was not upgraded and is held in read mode. |