sim: Add a returnInto function to the SyscallDesc class.
authorGabe Black <gabeblack@google.com>
Tue, 10 Dec 2019 00:55:36 +0000 (16:55 -0800)
committerGabe Black <gabeblack@google.com>
Thu, 12 Mar 2020 07:21:13 +0000 (07:21 +0000)
commit57e792b858f4f78bf3fd49989ec9e58aa8085fd7
tree4b414243c3815bd87b74bfe81470c64501e61408
parentf44b7729a3fb190578dfdf294999ed90e7a6e742
sim: Add a returnInto function to the SyscallDesc class.

This method lets system call implementations return values into
ThreadContexts other than the one they were called from. That's useful
for, for instance, clone() which creates new ThreadContexts.

By making it a virtual function in the SyscallDesc, we can delegate the
actual implementation to the SyscallDescABI subclass which knows the
ABI and how to use it to set the return value.

Change-Id: I61c6e60e4c2a8863c885cd818e4ff053fc3312ee
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23503
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabeblack@google.com>
src/sim/syscall_desc.hh