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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user