2c2
< * Copyright (c) 2012 ARM Limited
---
> * Copyright (c) 2012, 2015 ARM Limited
48c48
< class Event;
---
> class Drainable;
49a50
> #ifndef SWIG // SWIG doesn't support strongly typed enums
50a52,76
> * Object drain/handover states
> *
> * An object starts out in the Running state. When the simulator
> * prepares to take a snapshot or prepares a CPU for handover, it
> * calls the drain() method to transfer the object into the Draining
> * or Drained state. If any object enters the Draining state
> * (Drainable::drain() returning >0), simulation continues until it
> * all objects have entered the Drained state.
> *
> * Before resuming simulation, the simulator calls resume() to
> * transfer the object to the Running state.
> *
> * \note Even though the state of an object (visible to the rest of
> * the world through Drainable::getState()) could be used to determine
> * if all objects have entered the Drained state, the protocol is
> * actually a bit more elaborate. See Drainable::drain() for details.
> */
> enum class DrainState {
> Running, /** Running normally */
> Draining, /** Draining buffers pending serialization/handover */
> Drained /** Buffers drained, ready for serialization/handover */
> };
> #endif
>
> /**
144,167d169
< /**
< * Object drain/handover states
< *
< * An object starts out in the Running state. When the simulator
< * prepares to take a snapshot or prepares a CPU for handover, it
< * calls the drain() method to transfer the object into the
< * Draining or Drained state. If any object enters the Draining
< * state (drain() returning >0), simulation continues until it all
< * objects have entered the Drained state.
< *
< * Before resuming simulation, the simulator calls resume() to
< * transfer the object to the Running state.
< *
< * \note Even though the state of an object (visible to the rest
< * of the world through getState()) could be used to determine if
< * all objects have entered the Drained state, the protocol is
< * actually a bit more elaborate. See drain() for details.
< */
< enum State {
< Running, /** Running normally */
< Draining, /** Draining buffers pending serialization/handover */
< Drained /** Buffers drained, ready for serialization/handover */
< };
<
228c230
< State getDrainState() const { return _drainState; }
---
> DrainState getDrainState() const { return _drainState; }
231c233
< void setDrainState(State new_state) { _drainState = new_state; }
---
> void setDrainState(DrainState new_state) { _drainState = new_state; }
233d234
<
235,236c236
< State _drainState;
<
---
> DrainState _drainState;