Deleted Added
sdiff udiff text old ( 8799:dac1e33e07b0 ) new ( 8806:669e93d79ed9 )
full compact
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

63
64void
65ThreadState::serialize(std::ostream &os)
66{
67 SERIALIZE_ENUM(_status);
68 // thread_num and cpu_id are deterministic from the config
69 SERIALIZE_SCALAR(funcExeInst);
70
71 if (FullSystem) {
72 Tick quiesceEndTick = 0;
73 if (quiesceEvent->scheduled())
74 quiesceEndTick = quiesceEvent->when();
75 SERIALIZE_SCALAR(quiesceEndTick);
76 if (kernelStats)
77 kernelStats->serialize(os);
78 }
79}
80
81void
82ThreadState::unserialize(Checkpoint *cp, const std::string &section)
83{
84
85 UNSERIALIZE_ENUM(_status);
86 // thread_num and cpu_id are deterministic from the config
87 UNSERIALIZE_SCALAR(funcExeInst);
88
89 if (FullSystem) {
90 Tick quiesceEndTick;
91 UNSERIALIZE_SCALAR(quiesceEndTick);
92 if (quiesceEndTick)
93 baseCpu->schedule(quiesceEvent, quiesceEndTick);
94 if (kernelStats)
95 kernelStats->unserialize(cp, section);
96 }
97}
98
99void
100ThreadState::initMemProxies(ThreadContext *tc)
101{
102 // Note that this only refers to the port on the CPU side and can
103 // safely be done at init() time even if the CPU is not connected
104 // (i.e. due to restoring from a checkpoint and later switching

--- 34 unchanged lines hidden ---