The Pedigree Project
0.1
src
modules
subsys
posix
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
11
class
FanotifyState
;
12
class
FanotifyQueue
;
13
14
class
FanotifyInstance
{
15
public
:
16
static
SharedPointer<FanotifyInstance>
create();
17
~FanotifyInstance
();
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
:
29
FanotifyInstance
();
30
void
reapMarks();
31
FanotifyState
* m_State =
nullptr
;
32
bool
m_Quota =
false
;
33
};
34
35
int
posix_fanotify_init(
unsigned
flags,
unsigned
eventFlags);
36
int
posix_fanotify_mark(
int
fd,
unsigned
flags, uint64_t mask,
int
dirfd,
const
char
* path);
37
#endif
FanotifyInstance
Definition
fanotify-syscalls.h:14
FanotifyQueue
Definition
fanotify-queue.h:25
FanotifyState
Definition
fanotify-state.cc:129
File
Definition
File.h:74
ReadinessSource
Definition
Readiness.h:86
SharedPointer
Definition
SharedPointer.h:31
VFS::MountOperation
Definition
VFS.h:108
FileHandle
Definition
FileHandle.h:11
FileSystemId
Definition
FileHandle.h:17
Generated on Tue Sep 22 2026 06:05:42 for The Pedigree Project by
1.9.8