Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the stubs for getrlimit and setrlimit with actual implementations wrapping the rlimits system call, alongside header updates in include/sys/resource.h. Key feedback includes a warning that implicitly changing RUSAGE_CHILDREN to 1 via an enum breaks compatibility, a recommendation to use 0 instead of RLIMIT_SELF for the target PID, and a suggestion to define these wrappers as static inline functions in the header to optimize code size.
Unit Test Results13 287 tests 12 469 ✅ 57m 18s ⏱️ Results for commit 1e68b90. ♻️ This comment has been updated with latest results. |
TASK: RTOS-1346
|
Are there any tests for these syscalls? |
| #define PRIO_PROCESS 0 | ||
| #define PRIO_PGRP 1 | ||
| #define PRIO_USER 2 | ||
| extern int rlimits(limit_target_t target, int resource, struct rlimit *oldLimit, const struct rlimit *newLimit); |
There was a problem hiding this comment.
Don't add extern to function declarations. Instead, remove all extern qualifiers from function declarations in this file.
| extern int getrusage(int who, struct rusage *usage); | ||
|
|
||
|
|
||
| static inline int getrlimit(int resource, struct rlimit *rlp) |
There was a problem hiding this comment.
Do not use static inline. See phoenix-rtos/phoenix-rtos-project#1722.
TASK: RTOS-1346
Description
Implement POSIX getrlimit/setrlimit functions, declare a new syscall signature.
Motivation and Context
POSIX API compliance, Foundation API
Types of changes
How Has This Been Tested?
Checklist:
Special treatment