syscall-emul: Rewrite system call exit code
authorBrandon Potter <Brandon.Potter@amd.com>
Wed, 1 Mar 2017 20:52:23 +0000 (14:52 -0600)
committerBrandon Potter <Brandon.Potter@amd.com>
Thu, 9 Mar 2017 22:42:45 +0000 (22:42 +0000)
commit2c1286865fc2542a0586ca4ff40b00765d17b348
tree320c9e379c843a49a49555ccc4e075d3a3d4bf1e
parent6f7bf1b11fd9a2d7c2007fd0aca3ffa4885a215e
syscall-emul: Rewrite system call exit code

The changeset does a major refactor on the exit, exit_group, and
futex system calls regarding exit functionality.

A FutexMap class and related structures are added into a new
file. This increases code clarity by encapsulating the futex
operations and the futex state into an object.

Several exit conditions were added to allow the simulator to end
processes under certain conditions. Also, the simulation only
exits now when all processes have finished executing.

Change-Id: I1ee244caa9b5586fe7375e5b9b50fd3959b9655e
Reviewed-on: https://gem5-review.googlesource.com/2269
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
src/arch/riscv/registers.hh
src/sim/futex_map.hh [new file with mode: 0644]
src/sim/process.cc
src/sim/syscall_emul.cc
src/sim/syscall_emul.hh
src/sim/system.hh