thread_state.hh (10190:fb83d025d1c3) | thread_state.hh (10905:a6ca6831e775) |
---|---|
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; --- 42 unchanged lines hidden (view full) --- 51class Checkpoint; 52 53/** 54 * Struct for holding general thread state that is needed across CPU 55 * models. This includes things such as pointers to the process, 56 * memory, quiesce events, and certain stats. This can be expanded 57 * to hold more thread-specific stats within it. 58 */ | 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; --- 42 unchanged lines hidden (view full) --- 51class Checkpoint; 52 53/** 54 * Struct for holding general thread state that is needed across CPU 55 * models. This includes things such as pointers to the process, 56 * memory, quiesce events, and certain stats. This can be expanded 57 * to hold more thread-specific stats within it. 58 */ |
59struct ThreadState { | 59struct ThreadState : public Serializable { |
60 typedef ThreadContext::Status Status; 61 62 ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process); 63 64 virtual ~ThreadState(); 65 | 60 typedef ThreadContext::Status Status; 61 62 ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process); 63 64 virtual ~ThreadState(); 65 |
66 void serialize(std::ostream &os); | 66 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE; |
67 | 67 |
68 void unserialize(Checkpoint *cp, const std::string §ion); | 68 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE; |
69 70 int cpuId() const { return baseCpu->cpuId(); } 71 72 uint32_t socketId() const { return baseCpu->socketId(); } 73 74 int contextId() const { return _contextId; } 75 76 void setContextId(int id) { _contextId = id; } --- 125 unchanged lines hidden --- | 69 70 int cpuId() const { return baseCpu->cpuId(); } 71 72 uint32_t socketId() const { return baseCpu->socketId(); } 73 74 int contextId() const { return _contextId; } 75 76 void setContextId(int id) { _contextId = id; } --- 125 unchanged lines hidden --- |