mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 11:06:10 +00:00
LibC+Userland: Add a proper syscall wrapper for purge()
This commit is contained in:
parent
c01f766fb2
commit
907b090ddf
Notes:
sideshowbarker
2024-07-19 10:25:51 +09:00
Author: https://github.com/awesomekling
Commit: 907b090ddf
3 changed files with 17 additions and 4 deletions
|
@ -47,4 +47,10 @@ int futex(int32_t* userspace_address, int futex_op, int32_t value, const struct
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int purge(int mode)
|
||||
{
|
||||
int rc = syscall(SC_purge, mode);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -58,4 +58,9 @@ int set_process_boost(pid_t, int amount);
|
|||
|
||||
int futex(int32_t* userspace_address, int futex_op, int32_t value, const struct timespec* timeout);
|
||||
|
||||
#define PURGE_ALL_VOLATILE 0x1
|
||||
#define PURGE_ALL_CLEAN_INODE 0x2
|
||||
|
||||
int purge(int mode);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue