You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/05/04 13:13:41 UTC
[incubator-nuttx] 02/04: arch: x86: Add hlt instruction to save
power in qemu_idle.c
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 11bbe3997eebc2c295b562cc264ab68f75a3b7af
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon May 4 17:28:42 2020 +0900
arch: x86: Add hlt instruction to save power in qemu_idle.c
---
arch/x86/src/qemu/qemu_idle.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/src/qemu/qemu_idle.c b/arch/x86/src/qemu/qemu_idle.c
index c1c9cb8..630fd44 100644
--- a/arch/x86/src/qemu/qemu_idle.c
+++ b/arch/x86/src/qemu/qemu_idle.c
@@ -83,5 +83,7 @@ void up_idle(void)
/* Sleep until an interrupt occurs to save power */
+ __asm__ __volatile__ ("hlt");
+
#endif
}