base: adding a scheduleTrapEvent

This function centralize setting up a new trapEvent making sure that
the contextId match with the ThreadContext use for the Event.

Change-Id: I2a5f77da049d140b9ceffd42011fd8a1da59092e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/63532
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2 files changed