From a2d246b6b8379f9a74dbc56feefc155f615b5ea4 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 16 Oct 2014 05:49:51 -0400 Subject: arch: Use shared_ptr for all Faults This patch takes quite a large step in transitioning from the ad-hoc RefCountingPtr to the c++11 shared_ptr by adopting its use for all Faults. There are no changes in behaviour, and the code modifications are mostly just replacing "new" with "make_shared". --- src/arch/mips/mt.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/arch/mips/mt.hh') diff --git a/src/arch/mips/mt.hh b/src/arch/mips/mt.hh index b440eefa6..cc72d7a5d 100755 --- a/src/arch/mips/mt.hh +++ b/src/arch/mips/mt.hh @@ -165,7 +165,7 @@ forkThread(TC *tc, Fault &fault, int Rd_bits, int Rs, int Rt) tc->readMiscRegNoEffect(MISCREG_VPE_CONTROL); vpeControl.excpt = 1; tc->setMiscReg(MISCREG_VPE_CONTROL, vpeControl); - fault = new ThreadFault(); + fault = std::make_shared(); } } @@ -215,7 +215,7 @@ yieldThread(TC *tc, Fault &fault, int src_reg, uint32_t yield_mask) VPEControlReg vpeControl = tc->readMiscReg(MISCREG_VPE_CONTROL); vpeControl.excpt = 2; tc->setMiscReg(MISCREG_VPE_CONTROL, vpeControl); - fault = new ThreadFault(); + fault = std::make_shared(); } else { } } else if (src_reg != -2) { @@ -225,7 +225,7 @@ yieldThread(TC *tc, Fault &fault, int src_reg, uint32_t yield_mask) if (vpeControl.ysi == 1 && tcStatus.dt == 1 ) { vpeControl.excpt = 4; - fault = new ThreadFault(); + fault = std::make_shared(); } else { } } -- cgit v1.2.3