⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

fcntl_setlkw

Function fcntl_setlkw 

Source
pub fn fcntl_setlkw(inode: u64, lock: &FileLock) -> Result<(), KernelError>
Expand description

Set a byte-range lock with blocking (F_SETLKW semantics).

Performs simple cycle-based deadlock detection before blocking. If a deadlock is detected, returns a deadlock error. Since we lack a full wait-queue, this currently falls back to WouldBlock when the lock cannot be acquired and no deadlock is detected.