sim-se: Add prlimit system call
authorAlec Roelke <ar4jc@virginia.edu>
Sat, 28 Oct 2017 15:54:48 +0000 (11:54 -0400)
committerAlec Roelke <ar4jc@virginia.edu>
Mon, 6 Nov 2017 19:06:06 +0000 (19:06 +0000)
commit7e02ab1dc622081a30e5b8bec3a944bd1fc7fca6
tree2653fdde500754a04b4abb6ad5267f203f0abb63
parent8be75f49fd37712e7cf04c0853bb7504f69a04d6
sim-se: Add prlimit system call

Some ISAs (namely RISC-V) implement getrlimit and setrlimit using
prlimit. This patch adds an implementation for the prlimit system call.
Normally prlimit is supposed to provide the functionality of both
getrlimit and setrlimit, but because gem5 does not support setrlimit
this implementation of prlimit will simply display a warning and return
a failure code if the setrlimit mode is used. The same thing will happen
if a pid other than 0 is passed to it.

Change-Id: I653af2d5a60e716f4d6286196be7600409efcef8
Reviewed-on: https://gem5-review.googlesource.com/5321
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
src/sim/syscall_emul.hh