mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
Kernel: Add a mechanism for listening for changes to an inode.
The syscall is quite simple: int watch_file(const char* path, int path_length); It returns a file descriptor referring to a "InodeWatcher" object in the kernel. It becomes readable whenever something changes about the inode. Currently this is implemented by hooking the "metadata dirty bit" in Inode which isn't perfect, but it's a start. :^)
This commit is contained in:
parent
a9adf4c95b
commit
c8e2bb5605
12 changed files with 200 additions and 3 deletions
|
@ -297,6 +297,8 @@ static u32 handle(RegisterDump& regs, u32 function, u32 arg1, u32 arg2, u32 arg3
|
|||
}
|
||||
case Syscall::SC_dump_backtrace:
|
||||
return current->process().sys$dump_backtrace();
|
||||
case Syscall::SC_watch_file:
|
||||
return current->process().sys$watch_file((const char*)arg1, (int)arg2);
|
||||
default:
|
||||
kprintf("<%u> int0x82: Unknown function %u requested {%x, %x, %x}\n", current->process().pid(), function, arg1, arg2, arg3);
|
||||
return -ENOSYS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue