mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
Kernel: Implement multi-watch InodeWatcher :^)
This patch modifies InodeWatcher to switch to a one watcher, multiple watches architecture. The following changes have been made: - The watch_file syscall is removed, and in its place the create_iwatcher, iwatcher_add_watch and iwatcher_remove_watch calls have been added. - InodeWatcher now holds multiple WatchDescriptions for each file that is being watched. - The InodeWatcher file descriptor can be read from to receive events on all watched files. Co-authored-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
parent
2de11b0dc8
commit
fe5ca6ca27
16 changed files with 521 additions and 262 deletions
18
Kernel/API/InodeWatcherFlags.h
Normal file
18
Kernel/API/InodeWatcherFlags.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/EnumBits.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
enum class InodeWatcherFlags : u32 {
|
||||
None = 0,
|
||||
Nonblock = 1 << 0,
|
||||
CloseOnExec = 1 << 1,
|
||||
};
|
||||
|
||||
AK_ENUM_BITWISE_OPERATORS(InodeWatcherFlags);
|
Loading…
Add table
Add a link
Reference in a new issue