diff options
author | Michael Brown <mcb30@etherboot.org> | 2008-10-12 23:34:45 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2008-10-12 23:36:53 +0100 |
commit | c0835339d06716b133aa653847023742a967f188 (patch) | |
tree | 25f22e63175c7919c8de678f5a5f1513bed516c8 /src/core | |
parent | 658c6dba597402c82d9558448bd928cd4c202657 (diff) | |
download | ipxe-c0835339d06716b133aa653847023742a967f188.tar.gz |
[nap] Formalise the CPU sleeping API
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/console.c | 6 | ||||
-rw-r--r-- | src/core/gdbudp.c | 2 | ||||
-rw-r--r-- | src/core/null_nap.c | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/core/console.c b/src/core/console.c index 653f689d0..c9773f713 100644 --- a/src/core/console.c +++ b/src/core/console.c @@ -1,11 +1,10 @@ #include "stddef.h" #include "console.h" #include <gpxe/process.h> +#include <gpxe/nap.h> /** @file */ -#include "bios.h" - static struct console_driver console_drivers[0] __table_start ( struct console_driver, console ); static struct console_driver console_drivers_end[0] @@ -82,9 +81,6 @@ static struct console_driver * has_input ( void ) { * * The character read will not be echoed back to any console. * - * @bug We need a cleaner way to pick up cpu_nap(). It makes a - * real-mode call, and so we don't want to use it with LinuxBIOS. - * */ int getchar ( void ) { struct console_driver *console; diff --git a/src/core/gdbudp.c b/src/core/gdbudp.c index c49a1bca3..26feb38a7 100644 --- a/src/core/gdbudp.c +++ b/src/core/gdbudp.c @@ -19,7 +19,6 @@ #include <stdio.h> #include <string.h> #include <byteswap.h> -#include <bios.h> #include <gpxe/iobuf.h> #include <gpxe/in.h> #include <gpxe/if_arp.h> @@ -27,6 +26,7 @@ #include <gpxe/ip.h> #include <gpxe/udp.h> #include <gpxe/netdevice.h> +#include <gpxe/nap.h> #include <gpxe/gdbstub.h> #include <gpxe/gdbudp.h> diff --git a/src/core/null_nap.c b/src/core/null_nap.c new file mode 100644 index 000000000..a3b01eb10 --- /dev/null +++ b/src/core/null_nap.c @@ -0,0 +1,3 @@ +#include <gpxe/nap.h> + +PROVIDE_NAP_INLINE ( null, cpu_nap ); |