|
Lines 73-79
Link Here
|
| 73 |
.Fn vm_map_lock_read |
73 |
.Fn vm_map_lock_read |
| 74 |
macro obtains a read-lock on |
74 |
macro obtains a read-lock on |
| 75 |
.Fa map . |
75 |
.Fa map . |
| 76 |
Currently this is implemented as an exclusive lock. |
|
|
| 77 |
.Pp |
76 |
.Pp |
| 78 |
The |
77 |
The |
| 79 |
.Fn vm_map_unlock_read |
78 |
.Fn vm_map_unlock_read |
|
Lines 93-115
Link Here
|
| 93 |
.Fa map . |
92 |
.Fa map . |
| 94 |
It returns FALSE if the lock cannot be immediately acquired; |
93 |
It returns FALSE if the lock cannot be immediately acquired; |
| 95 |
otherwise return TRUE with the lock acquired. |
94 |
otherwise return TRUE with the lock acquired. |
| 96 |
Currently this is implemented as an exclusive lock. |
|
|
| 97 |
.Pp |
95 |
.Pp |
| 98 |
The |
96 |
The |
| 99 |
.Fn vm_map_lock_upgrade |
97 |
.Fn vm_map_lock_upgrade |
| 100 |
macro attempts to atomically upgrade a read-lock on |
98 |
macro attempts to atomically upgrade a read-lock on |
| 101 |
.Fa map |
99 |
.Fa map |
| 102 |
to an exclusive lock. |
100 |
to an exclusive lock. |
| 103 |
As read-locks are currently implemented as exclusive locks, |
|
|
| 104 |
this macro is a no-op. |
| 105 |
.Pp |
101 |
.Pp |
| 106 |
The |
102 |
The |
| 107 |
.Fn vm_map_lock_downgrade |
103 |
.Fn vm_map_lock_downgrade |
| 108 |
macro attempts to downgrade an exclusive lock on |
104 |
macro attempts to downgrade an exclusive lock on |
| 109 |
.Fa map |
105 |
.Fa map |
| 110 |
to a read-lock. |
106 |
to a read-lock. |
| 111 |
As read-locks are currently implemented as exclusive locks, |
|
|
| 112 |
this macro is a no-op. |
| 113 |
.Sh IMPLEMENTATION NOTES |
107 |
.Sh IMPLEMENTATION NOTES |
| 114 |
Currently, all of the locking macros implement their locks as sleep locks. |
108 |
Currently, all of the locking macros implement their locks as sleep locks. |
| 115 |
.Sh SEE ALSO |
109 |
.Sh SEE ALSO |