This is an archive of the discontinued LLVM Phabricator instance.

[libc] Add implementation of POSIX setrlimit and getrlimit functions.
ClosedPublic

Authored by sivachandra on Sep 15 2022, 11:22 PM.

Diff Detail

Event Timeline

sivachandra created this revision.Sep 15 2022, 11:22 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 15 2022, 11:22 PM
sivachandra requested review of this revision.Sep 15 2022, 11:22 PM
lntue accepted this revision.Sep 16 2022, 12:53 PM
This revision is now accepted and ready to land.Sep 16 2022, 12:53 PM

Add a test for getrlimit.

Is this failure fixed yet:

/var/lib/buildkite-agent/builds/llvm-project/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp:43:19: error: variable has incomplete type 'struct rlimit_t'
  struct rlimit_t limits {
                  ^
/var/lib/buildkite-agent/builds/llvm-project/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp:43:10: note: forward declaration of 'rlimit_t'
  struct rlimit_t limits {
         ^
1 error generated.

Add the spec for the new functions to posix.td.

Is this failure fixed yet:

/var/lib/buildkite-agent/builds/llvm-project/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp:43:19: error: variable has incomplete type 'struct rlimit_t'
  struct rlimit_t limits {
                  ^
/var/lib/buildkite-agent/builds/llvm-project/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp:43:10: note: forward declaration of 'rlimit_t'
  struct rlimit_t limits {
         ^
1 error generated.

Not sure where this is coming from. But, I realized I did not add the new functions to posix.td - added now.

This revision was landed with ongoing or failed builds.Sep 16 2022, 1:50 PM
This revision was automatically updated to reflect the committed changes.