Mark `getrlimit` and `setrlimit` as fully supported

This commit is contained in:
Tao Su 2025-12-04 10:17:59 +00:00 committed by Tate, Hongliang Tian
parent b5a05cba00
commit 9783149673
2 changed files with 10 additions and 3 deletions

View File

@ -117,7 +117,7 @@ which are summarized in the table below.
| 94 | lchown | ✅ | 💯 |
| 95 | umask | ✅ | 💯 |
| 96 | gettimeofday | ✅ | 💯 |
| 97 | getrlimit | ✅ | |
| 97 | getrlimit | ✅ | 💯 |
| 98 | getrusage | ✅ | [⚠️](syscall-flag-coverage/system-information-and-misc/#getrusage) |
| 99 | sysinfo | ✅ | 💯 |
| 100 | times | ❌ | N/A |
@ -180,7 +180,7 @@ which are summarized in the table below.
| 157 | prctl | ✅ | [⚠️](syscall-flag-coverage/namespaces-cgroups-and-security/#prctl) |
| 158 | arch_prctl | ✅ | [⚠️](syscall-flag-coverage/system-information-and-misc/#arch_prctl) |
| 159 | adjtimex | ❌ | N/A |
| 160 | setrlimit | ✅ | |
| 160 | setrlimit | ✅ | 💯 |
| 161 | chroot | ✅ | 💯 |
| 162 | sync | ✅ | 💯 |
| 163 | acct | ❌ | N/A |

View File

@ -38,8 +38,15 @@ getppid();
sched_setaffinity(pid, cpusetsize, mask);
sched_getaffinity(pid, cpusetsize, mask);
limit_resources = RLIMIT_AS | RLIMIT_CORE | RLIMIT_CPU | RLIMIT_DATA | RLIMIT_FSIZE |
RLIMIT_LOCKS | RLIMIT_MEMLOCK | RLIMIT_MSGQUEUE | RLIMIT_NICE |
RLIMIT_NOFILE | RLIMIT_NPROC | RLIMIT_RSS | RLIMIT_RTPRIO |
RLIMIT_RTTIME | RLIMIT_SIGPENDING | RLIMIT_STACK;
// Get or set resource limits
prlimit64(pid, resource, new_limit, old_limit);
prlimit64(pid, resource = <limit_resources>, new_limit, old_limit);
getrlimit(resource = <limit_resources>, rlim);
setrlimit(resource = <limit_resources>, rlim);
// Yield the processor
sched_yield();