From cdf4ff398d1d7f16b27de9accf5dfd5dd2196fd0 Mon Sep 17 00:00:00 2001 From: Cautreoxit Date: Tue, 23 Dec 2025 09:44:33 +0000 Subject: [PATCH] Add SCML for fadvise64 --- book/src/kernel/linux-compatibility/README.md | 2 +- .../file-descriptor-and-io-control/README.md | 21 ++++++++++++++++++- .../fadvise64.scml | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/fadvise64.scml diff --git a/book/src/kernel/linux-compatibility/README.md b/book/src/kernel/linux-compatibility/README.md index a86a63450..9ef0aa595 100644 --- a/book/src/kernel/linux-compatibility/README.md +++ b/book/src/kernel/linux-compatibility/README.md @@ -241,7 +241,7 @@ which are summarized in the table below. | 218 | set_tid_address | ✅ | 💯 | | 219 | restart_syscall | ❌ | N/A | | 220 | semtimedop | ✅ | [⚠️](syscall-flag-coverage/inter-process-communication/#semop-and-semtimedop) | -| 221 | fadvise64 | ✅ | ❓ | +| 221 | fadvise64 | ✅ | [⚠️](syscall-flag-coverage/file-descriptor-and-io-control/#fadvise64) | | 222 | timer_create | ✅ | [⚠️](syscall-flag-coverage/signals-and-timers/#timer_create) | | 223 | timer_settime | ✅ | 💯 | | 224 | timer_gettime | ✅ | 💯 | diff --git a/book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/README.md b/book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/README.md index 46e3620b9..45e00c673 100644 --- a/book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/README.md +++ b/book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/README.md @@ -3,7 +3,7 @@ @@ -86,6 +86,25 @@ Unsupported flags: For more information, see [the man page](https://man7.org/linux/man-pages/man2/memfd_create.2.html). +### `fadvise64` + +Supported functionality in SCML: + +```c +{{#include fadvise64.scml}} +``` + +Silently-ignored flags: +* `POSIX_FADV_NORMAL` +* `POSIX_FADV_RANDOM` +* `POSIX_FADV_SEQUENTIAL` +* `POSIX_FADV_WILLNEED` +* `POSIX_FADV_DONTNEED` +* `POSIX_FADV_NOREUSE` + +For more information, +see [the man page](https://man7.org/linux/man-pages/man2/posix_fadvise.2.html). + ### `epoll_ctl` Supported functionality in SCML: diff --git a/book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/fadvise64.scml b/book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/fadvise64.scml new file mode 100644 index 000000000..cb4c00ba7 --- /dev/null +++ b/book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/fadvise64.scml @@ -0,0 +1,2 @@ +// Announce an intention to access file data in a specific pattern in the future +fadvise64(fd, offset, len, advice = 0);