sim,misc: Rename Float namespace as as_float
As part of recent decisions regarding namespace naming conventions, all namespaces will be changed to snake case. sim_clock::Float became sim_clock::as_float. "as_float" was chosen because "float" is a reserved keywords, and this namespace acts as a selector of how to read the internal variables. Another possibility to resolve this would be to remove the namespaces "Float" and "Int" and use unions instead. Change-Id: I7b3d9c6e9ab547493d5596c7eda080a25509a730 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45435 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
d5ad966da5
commit
c487767cff
@@ -129,7 +129,7 @@ class BaseKvmTimer
|
||||
* @return Nanoseconds executed in VM converted to simulation ticks
|
||||
*/
|
||||
Tick ticksFromHostNs(uint64_t ns) {
|
||||
return ns * hostFactor * sim_clock::Float::ns;
|
||||
return ns * hostFactor * sim_clock::as_float::ns;
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -147,7 +147,7 @@ class BaseKvmTimer
|
||||
* @return Simulation ticks converted into nanoseconds on the host
|
||||
*/
|
||||
uint64_t hostNs(Tick ticks) {
|
||||
return ticks / (sim_clock::Float::ns * hostFactor);
|
||||
return ticks / (sim_clock::as_float::ns * hostFactor);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1248,7 +1248,7 @@ X86KvmCPU::kvmRunDrain()
|
||||
// Limit the run to 1 millisecond. That is hopefully enough to
|
||||
// reach an interrupt window. Otherwise, we'll just try again
|
||||
// later.
|
||||
return BaseKvmCPU::kvmRun(1 * sim_clock::Float::ms);
|
||||
return BaseKvmCPU::kvmRun(1 * sim_clock::as_float::ms);
|
||||
} else {
|
||||
DPRINTF(Drain, "kvmRunDrain: Delivering pending IO\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user