sim_object.cc (9254:f1b35c618252) sim_object.cc (9342:6fec8f26e56d)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

62SimObject::SimObject(const Params *p)
63 : EventManager(p->eventq), _params(p)
64{
65#ifdef DEBUG
66 doDebugBreak = false;
67#endif
68
69 simObjectList.push_back(this);
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * Copyright (c) 2010 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

62SimObject::SimObject(const Params *p)
63 : EventManager(p->eventq), _params(p)
64{
65#ifdef DEBUG
66 doDebugBreak = false;
67#endif
68
69 simObjectList.push_back(this);
70 state = Running;
71}
72
73void
74SimObject::init()
75{
76}
77
78void

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

146void
147debugObjectBreak(const char *objs)
148{
149 SimObject::debugObjectBreak(string(objs));
150}
151#endif
152
153unsigned int
70}
71
72void
73SimObject::init()
74{
75}
76
77void

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

145void
146debugObjectBreak(const char *objs)
147{
148 SimObject::debugObjectBreak(string(objs));
149}
150#endif
151
152unsigned int
154SimObject::drain(Event *drain_event)
153SimObject::drain(DrainManager *drain_manager)
155{
154{
156 state = Drained;
155 setDrainState(Drained);
157 return 0;
158}
159
156 return 0;
157}
158
160void
161SimObject::resume()
162{
163 state = Running;
164}
165
166SimObject *
167SimObject::find(const char *name)
168{
169 SimObjectList::const_iterator i = simObjectList.begin();
170 SimObjectList::const_iterator end = simObjectList.end();
171
172 for (; i != end; ++i) {
173 SimObject *obj = *i;
174 if (obj->name() == name)
175 return obj;
176 }
177
178 return NULL;
179}
159
160SimObject *
161SimObject::find(const char *name)
162{
163 SimObjectList::const_iterator i = simObjectList.begin();
164 SimObjectList::const_iterator end = simObjectList.end();
165
166 for (; i != end; ++i) {
167 SimObject *obj = *i;
168 if (obj->name() == name)
169 return obj;
170 }
171
172 return NULL;
173}