Constant cloudabi::LOCK_KERNEL_MANAGED [] [src]

pub const LOCK_KERNEL_MANAGED: lock = lock(2147483648)

Bitmask indicating that the lock is either read locked or write locked, and that one or more threads have their execution suspended, waiting to acquire the lock. The last owner of the lock must call the kernel to unlock.

When the lock is acquired for reading and this bit is set, it means that one or more threads are attempting to acquire this lock for writing. In that case, other threads should only acquire additional read locks if suspending execution would cause a deadlock. It is preferred to suspend execution, as this prevents starvation of writers.