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

flock

Function flock 

Source
pub fn flock(inode: u64, pid: u64, operation: u32) -> Result<(), KernelError>
Expand description

Apply a whole-file advisory lock (flock semantics).

operation is a combination of LOCK_SH/LOCK_EX/LOCK_UN and optionally LOCK_NB. Returns WouldBlock when LOCK_NB is set and the lock cannot be acquired immediately.