Brandon Potter has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/17109
Change subject: sim-se: add new option to getrlimit syscall
......................................................................
sim-se: add new option to getrlimit syscall
The NPROC option was not serviced by the getrlimit syscall.
This changeset adds in the necessary code to service the option.
Change-Id: I679d3949c3bbb0628188f4e33034028d7726fdcb
---
M src/sim/syscall_emul.hh
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index d59fa72..1d4f399 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -1959,6 +1959,12 @@
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;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17109
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I679d3949c3bbb0628188f4e33034028d7726fdcb
Gerrit-Change-Number: 17109
Gerrit-PatchSet: 1
Gerrit-Owner: Brandon Potter <brandon.pot...@amd.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev