thread_context_impl.hh (12181:2150eff234c1) thread_context_impl.hh (12279:48bca1fee7a0)
1/*
1/*
2 * Copyright (c) 2010-2012, 2016 ARM Limited
2 * Copyright (c) 2010-2012, 2016-2017 ARM Limited
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating
9 * to a hardware implementation of the functionality of the software
10 * licensed hereunder. You may use the software subject to the license

--- 93 unchanged lines hidden (view full) ---

104O3ThreadContext<Impl>::suspend()
105{
106 DPRINTF(O3CPU, "Calling suspend on Thread Context %d\n",
107 threadId());
108
109 if (thread->status() == ThreadContext::Suspended)
110 return;
111
3 * Copyright (c) 2013 Advanced Micro Devices, Inc.
4 * All rights reserved
5 *
6 * The license below extends only to copyright in the software and shall
7 * not be construed as granting a license to any other intellectual
8 * property including but not limited to intellectual property relating
9 * to a hardware implementation of the functionality of the software
10 * licensed hereunder. You may use the software subject to the license

--- 93 unchanged lines hidden (view full) ---

104O3ThreadContext<Impl>::suspend()
105{
106 DPRINTF(O3CPU, "Calling suspend on Thread Context %d\n",
107 threadId());
108
109 if (thread->status() == ThreadContext::Suspended)
110 return;
111
112 if (cpu->isDraining()) {
113 DPRINTF(O3CPU, "Ignoring suspend on TC due to pending drain\n");
114 return;
115 }
116
112 thread->lastActivate = curTick();
113 thread->lastSuspend = curTick();
114
115 thread->setStatus(ThreadContext::Suspended);
116 cpu->suspendContext(thread->threadId());
117}
118
119template <class Impl>

--- 218 unchanged lines hidden ---
117 thread->lastActivate = curTick();
118 thread->lastSuspend = curTick();
119
120 thread->setStatus(ThreadContext::Suspended);
121 cpu->suspendContext(thread->threadId());
122}
123
124template <class Impl>

--- 218 unchanged lines hidden ---