From 53e777d6838ac3ca80e6557626f9e99fd93dd0f7 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 7 Aug 2015 09:59:13 +0100 Subject: base: Declare a type for context IDs Context IDs used to be declared as ad hoc (usually as int). This changeset introduces a typedef for ContextIDs and a constant for invalid context IDs. --- src/mem/ruby/system/Sequencer.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/mem/ruby/system/Sequencer.cc') diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index 32e4c107c..01b868017 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -667,10 +667,8 @@ void Sequencer::issueRequest(PacketPtr pkt, RubyRequestType secondary_type) { assert(pkt != NULL); - int proc_id = -1; - if (pkt->req->hasContextId()) { - proc_id = pkt->req->contextId(); - } + ContextID proc_id = pkt->req->hasContextId() ? + pkt->req->contextId() : InvalidContextID; // If valid, copy the pc to the ruby request Addr pc = 0; -- cgit v1.2.3