1 /* 2 * Copyright 2012, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 10 extern CpuidleModuleInfo *gIdle; 11 12 static inline void 13 x86_monitor(const void *addr, unsigned long ecx, unsigned long edx) 14 { 15 asm volatile("monitor" 16 :: "a" (addr), "c" (ecx), "d"(edx)); 17 } 18 19 static inline void 20 x86_mwait(unsigned long eax, unsigned long ecx) 21 { 22 asm volatile("mwait" 23 :: "a" (eax), "c" (ecx)); 24 } 25 26 status_t intel_cpuidle_init(void); 27 28 #ifdef __cplusplus 29 } 30 #endif 31