Fix arch_timing_cycles_get() to prevent overflow on the clock rollover.
The issue is observable on tests/benchmarks/wait_queues and
tests/benchmarks/sched_queues with BENCHMARK_NUM_ITERATIONS is large
enough, e.g. default 1000.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
In order to bring consistency in-tree, migrate all arch code to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to zephyrproject-rtos#45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Both operands of an operator in which the usual arithmetic
conversions are performed shall have the same essential
type category.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
We should not be initializing/starting/stoping timing functions
multiple times. So this changes how the timing functions are
structured to allow only one initialization, only start when
stopped, and only stop when started.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>