[nap] Formalise the CPU sleeping API
[people/mcb30/gpxe.git] / src / arch / i386 / interface / pcbios / bios_nap.c
1 #include <gpxe/nap.h>
2 #include <realmode.h>
3
4 /**
5  * Save power by halting the CPU until the next interrupt
6  *
7  */
8 static void bios_cpu_nap ( void ) {
9         __asm__ __volatile__ ( REAL_CODE ( "sti\n\t"
10                                            "hlt\n\t"
11                                            "cli\n\t" ) : : );
12 }
13
14 PROVIDE_NAP ( pcbios, cpu_nap, bios_cpu_nap );