Test: Allow CPU to enter low-power mode after tests
Changes the test thread functions to exit at the end instead of busy
looping. Changes the CMSIS idle thread to call WFE instead of busy
waiting. In combination, this allows the CPU to enter the idle thread
and then go into low power state once the tests finish.
As well as reducing power on real HW, this significantly improves FVP
performance where multiple CPUs are being simulated, since time is not
wasted simulating an idle CPU.
Change-Id: I405013b31deb211aba3e965a83550abef47bb8fd
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
diff --git a/lib/os_wrapper/thread.h b/lib/os_wrapper/thread.h
index 83633a6..7d23024 100644
--- a/lib/os_wrapper/thread.h
+++ b/lib/os_wrapper/thread.h
@@ -56,7 +56,7 @@
/**
* \brief Exits the calling thread
*/
-void os_wrapper_thread_exit(void);
+__attribute__((noreturn)) void os_wrapper_thread_exit(void);
/**
* \brief Set the event flags for synchronizing a thread specified by handle.