diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2021-05-12 19:17:51 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-05-12 22:38:20 +0200 |
commit | fe5ca6ca276ad452a16215031fb395b4f5bef048 (patch) | |
tree | 100ae8dbf8d2b1cee4125cf335017a021c63093f /Kernel/API/InodeWatcherFlags.h | |
parent | 2de11b0dc8bbaa0c264a7e6dbb32b5481a337fb8 (diff) | |
download | serenity-fe5ca6ca276ad452a16215031fb395b4f5bef048.zip |
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>
Diffstat (limited to 'Kernel/API/InodeWatcherFlags.h')
-rw-r--r-- | Kernel/API/InodeWatcherFlags.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Kernel/API/InodeWatcherFlags.h b/Kernel/API/InodeWatcherFlags.h new file mode 100644 index 0000000000..c9cdf42b1f --- /dev/null +++ b/Kernel/API/InodeWatcherFlags.h @@ -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); |