vm_map_trylock_read9
Vm_map locking macros
Part of vm_map_lock(9).
Usage
void
void
void
void
int
int
int
int
Overview
The vm_map_lock() macro obtains an exclusive lock on map.
The vm_map_unlock() macro releases an exclusive lock on map.
The vm_map_lock_read() macro obtains a read-lock on map.
The vm_map_unlock_read() macro releases a read-lock on map.
The vm_map_trylock() macro attempts to obtain an exclusive lock on map. It returns FALSE if the lock cannot be immediately acquired; otherwise return TRUE with the lock acquired.
The vm_map_trylock_read() macro attempts to obtain a read-lock on map. It returns FALSE if the lock cannot be immediately acquired; otherwise return TRUE with the lock acquired.
The vm_map_lock_upgrade() macro attempts to atomically upgrade a read-lock on map to an exclusive lock.
The vm_map_lock_downgrade() macro attempts to downgrade an exclusive lock on map to a read-lock.
Implementation notes
Currently, all of the locking macros implement their locks as sleep locks.
History
- FreeBSD 16.0-CURRENT (2026-10-27) to FreeBSD 13.3-RELEASE: the text shown here
- FreeBSD 13.2-RELEASE to FreeBSD 13.0-RELEASE
- FreeBSD 12.4-RELEASE
- FreeBSD 12.3-RELEASE
- FreeBSD 12.2-RELEASE
- FreeBSD 12.1-RELEASE
- FreeBSD 12.0-RELEASE
- FreeBSD 11.4-RELEASE
- FreeBSD 11.3-RELEASE
- FreeBSD 11.2-RELEASE
- FreeBSD 11.1-RELEASE
- FreeBSD 11.0-RELEASE
- FreeBSD 10.4-RELEASE
- FreeBSD 10.3-RELEASE
- FreeBSD 10.2-RELEASE
- FreeBSD 10.1-RELEASE
- FreeBSD 10.0-RELEASE
- FreeBSD 9.3-RELEASE
- FreeBSD 9.2-RELEASE
- FreeBSD 9.1-RELEASE
- FreeBSD 9.0-RELEASE
- FreeBSD 8.4-RELEASE
- FreeBSD 8.3-RELEASE
- FreeBSD 8.2-RELEASE
- FreeBSD 8.1-RELEASE
- FreeBSD 8.0-RELEASE
- FreeBSD 7.4-RELEASE
- FreeBSD 7.3-RELEASE
- FreeBSD 7.2-RELEASE
- FreeBSD 7.1-RELEASE
- FreeBSD 7.0-RELEASE
- FreeBSD 6.4-RELEASE
- FreeBSD 6.3-RELEASE to FreeBSD 6.0-RELEASE
- FreeBSD 5.5-RELEASE to FreeBSD 5.3-RELEASE
- FreeBSD 5.2.1-RELEASE to FreeBSD 5.2-RELEASE