The Pedigree Project 0.1
fanotify-syscalls.h
1/* Copyright (c) 2026, Pedigree Developers. */
2#ifndef POSIX_FANOTIFY_SYSCALLS_H
3#define POSIX_FANOTIFY_SYSCALLS_H
4
5#include "pedigree/kernel/process/Readiness.h"
6
7#include "descriptor-read.h"
8#include "modules/system/vfs/FileHandle.h"
9#include "modules/system/vfs/VFS.h"
10
11class FanotifyState;
12class FanotifyQueue;
13
15 public:
16 static SharedPointer<FanotifyInstance> create();
18 int changeMark(File&, const VFS::MountOperation&, const FileHandle&, const FileSystemId&,
19 uint64_t mask, bool remove);
20 int flushMarks();
21 void lastDescriptorClosed();
22 ssize_t readToUser(void*, size_t count, bool canBlock);
23 ssize_t readWithCopy(size_t count, bool canBlock, PosixDescriptorReadCopy, void*);
24 ReadyMask queryReady();
25 ReadinessSource* readinessSource();
26 int queuedMetadataBytes();
27
28 private:
30 void reapMarks();
31 FanotifyState* m_State = nullptr;
32 bool m_Quota = false;
33};
34
35int posix_fanotify_init(unsigned flags, unsigned eventFlags);
36int posix_fanotify_mark(int fd, unsigned flags, uint64_t mask, int dirfd, const char* path);
37#endif
Definition File.h:74