The NPROC option was not serviced by the getrlimit syscall.
This changeset adds in the necessary code to service the option.
Change-Id: I679d3949c3bbb0628188f4e33034028d7726fdcb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17109
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
rlp->rlim_max = TheISA::htog(rlp->rlim_max);
break;
+ case OS::TGT_RLIMIT_NPROC:
+ rlp->rlim_cur = rlp->rlim_max = tc->getSystemPtr()->numContexts();
+ rlp->rlim_cur = TheISA::htog(rlp->rlim_cur);
+ rlp->rlim_max = TheISA::htog(rlp->rlim_max);
+ break;
+
default:
warn("getrlimit: unimplemented resource %d", resource);
return -EINVAL;