mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:28:12 +00:00
Kernel+LibC: Add msync() system call
This allows userspace to trigger a full (FIXME) flush of a shared file mapping to disk. We iterate over all the mapped pages in the VMObject and write them out to the underlying inode, one by one. This is rather naive, and there's lots of room for improvement. Note that shared file mappings are currently not possible since mmap() returns ENOTSUP for PROT_WRITE+MAP_SHARED. That restriction will be removed in a subsequent commit. :^)
This commit is contained in:
parent
f2d5548d7a
commit
32aa37d5dc
8 changed files with 51 additions and 0 deletions
|
@ -34,6 +34,10 @@ extern "C" {
|
|||
#define MADV_SET_VOLATILE 0x100
|
||||
#define MADV_SET_NONVOLATILE 0x200
|
||||
|
||||
#define MS_SYNC 1
|
||||
#define MS_ASYNC 2
|
||||
#define MS_INVALIDATE 4
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue