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