sim: Make the drain state a global typed enum

The drain state enum is currently a part of the Drainable
interface. The same state machine will be used by the DrainManager to
identify the global state of the simulator. Make the drain state a
global typed enum to better cater for this usage scenario.
This commit is contained in:
Andreas Sandberg
2015-07-07 09:51:04 +01:00
parent 1dc5e63b88
commit e9c3d59aae
27 changed files with 103 additions and 103 deletions

View File

@@ -261,9 +261,9 @@ PciDevice::drain(DrainManager *dm)
unsigned int count;
count = pioPort.drain(dm) + dmaPort.drain(dm) + configPort.drain(dm);
if (count)
setDrainState(Drainable::Draining);
setDrainState(DrainState::Draining);
else
setDrainState(Drainable::Drained);
setDrainState(DrainState::Drained);
return count;
}