mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:47:45 +00:00
Kernel+LibC: Implement fcntl(2) advisory locks
Advisory locks don't actually prevent other processes from writing to the file, but they do prevent other processes looking to acquire and advisory lock on the file. This implementation currently only adds non-blocking locks, which are all I need for now.
This commit is contained in:
parent
fbc56461da
commit
3fa2816642
8 changed files with 186 additions and 7 deletions
|
@ -127,6 +127,9 @@ public:
|
|||
|
||||
FileBlockCondition& block_condition();
|
||||
|
||||
KResult apply_flock(Process const&, Userspace<flock const*>);
|
||||
KResult get_flock(Userspace<flock*>) const;
|
||||
|
||||
private:
|
||||
friend class VirtualFileSystem;
|
||||
explicit FileDescription(File&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue