thread_context_impl.hh (7763:ff2213d13e58) thread_context_impl.hh (7823:dac01f14f20f)
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

110{
111 DPRINTF(O3CPU, "Calling activate on Thread Context %d\n",
112 threadId());
113
114 if (thread->status() == ThreadContext::Active)
115 return;
116
117#if FULL_SYSTEM
1/*
2 * Copyright (c) 2010 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

110{
111 DPRINTF(O3CPU, "Calling activate on Thread Context %d\n",
112 threadId());
113
114 if (thread->status() == ThreadContext::Active)
115 return;
116
117#if FULL_SYSTEM
118 thread->lastActivate = curTick;
118 thread->lastActivate = curTick();
119#endif
120
121 thread->setStatus(ThreadContext::Active);
122
123 // status() == Suspended
124 cpu->activateContext(thread->threadId(), delay);
125}
126
127template <class Impl>
128void
129O3ThreadContext<Impl>::suspend(int delay)
130{
131 DPRINTF(O3CPU, "Calling suspend on Thread Context %d\n",
132 threadId());
133
134 if (thread->status() == ThreadContext::Suspended)
135 return;
136
137#if FULL_SYSTEM
119#endif
120
121 thread->setStatus(ThreadContext::Active);
122
123 // status() == Suspended
124 cpu->activateContext(thread->threadId(), delay);
125}
126
127template <class Impl>
128void
129O3ThreadContext<Impl>::suspend(int delay)
130{
131 DPRINTF(O3CPU, "Calling suspend on Thread Context %d\n",
132 threadId());
133
134 if (thread->status() == ThreadContext::Suspended)
135 return;
136
137#if FULL_SYSTEM
138 thread->lastActivate = curTick;
139 thread->lastSuspend = curTick;
138 thread->lastActivate = curTick();
139 thread->lastSuspend = curTick();
140#endif
141/*
142#if FULL_SYSTEM
143 // Don't change the status from active if there are pending interrupts
144 if (cpu->checkInterrupts()) {
145 assert(status() == ThreadContext::Active);
146 return;
147 }

--- 241 unchanged lines hidden ---
140#endif
141/*
142#if FULL_SYSTEM
143 // Don't change the status from active if there are pending interrupts
144 if (cpu->checkInterrupts()) {
145 assert(status() == ThreadContext::Active);
146 return;
147 }

--- 241 unchanged lines hidden ---