aboutsummaryrefslogtreecommitdiff
path: root/src/include/ipxe/nap.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2010-04-19 20:16:01 +0100
committerMichael Brown <mcb30@ipxe.org>2010-04-19 23:43:39 +0100
commit8406115834d38bb743e01f35bfd36e835532415e (patch)
treeee1e3106e2cdc645d911ba5643f8414b21fc4c3e /src/include/ipxe/nap.h
parent2a36703af228bd10d50a31daec96072fe3a992a3 (diff)
downloadipxe-8406115834d38bb743e01f35bfd36e835532415e.zip
ipxe-8406115834d38bb743e01f35bfd36e835532415e.tar.gz
ipxe-8406115834d38bb743e01f35bfd36e835532415e.tar.bz2
[build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/nap.h')
-rw-r--r--src/include/ipxe/nap.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/include/ipxe/nap.h b/src/include/ipxe/nap.h
new file mode 100644
index 0000000..90bd958
--- /dev/null
+++ b/src/include/ipxe/nap.h
@@ -0,0 +1,56 @@
+#ifndef _IPXE_NAP_H
+#define _IPXE_NAP_H
+
+/** @file
+ *
+ * CPU sleeping
+ *
+ */
+
+FILE_LICENCE ( GPL2_OR_LATER );
+
+#include <ipxe/api.h>
+#include <config/nap.h>
+
+/**
+ * Calculate static inline CPU sleeping API function name
+ *
+ * @v _prefix Subsystem prefix
+ * @v _api_func API function
+ * @ret _subsys_func Subsystem API function
+ */
+#define NAP_INLINE( _subsys, _api_func ) \
+ SINGLE_API_INLINE ( NAP_PREFIX_ ## _subsys, _api_func )
+
+/**
+ * Provide an CPU sleeping API implementation
+ *
+ * @v _prefix Subsystem prefix
+ * @v _api_func API function
+ * @v _func Implementing function
+ */
+#define PROVIDE_NAP( _subsys, _api_func, _func ) \
+ PROVIDE_SINGLE_API ( NAP_PREFIX_ ## _subsys, _api_func, _func )
+
+/**
+ * Provide a static inline CPU sleeping API implementation
+ *
+ * @v _prefix Subsystem prefix
+ * @v _api_func API function
+ */
+#define PROVIDE_NAP_INLINE( _subsys, _api_func ) \
+ PROVIDE_SINGLE_API_INLINE ( NAP_PREFIX_ ## _subsys, _api_func )
+
+/* Include all architecture-independent I/O API headers */
+#include <ipxe/null_nap.h>
+
+/* Include all architecture-dependent I/O API headers */
+#include <bits/nap.h>
+
+/**
+ * Sleep until next CPU interrupt
+ *
+ */
+void cpu_nap ( void );
+
+#endif /* _IPXE_NAP_H */