nap.h

Go to the documentation of this file.
00001 #ifndef _GPXE_NAP_H
00002 #define _GPXE_NAP_H
00003 
00004 /** @file
00005  *
00006  * CPU sleeping
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER );
00011 
00012 #include <gpxe/api.h>
00013 #include <config/nap.h>
00014 
00015 /**
00016  * Calculate static inline CPU sleeping API function name
00017  *
00018  * @v _prefix           Subsystem prefix
00019  * @v _api_func         API function
00020  * @ret _subsys_func    Subsystem API function
00021  */
00022 #define NAP_INLINE( _subsys, _api_func ) \
00023         SINGLE_API_INLINE ( NAP_PREFIX_ ## _subsys, _api_func )
00024 
00025 /**
00026  * Provide an CPU sleeping API implementation
00027  *
00028  * @v _prefix           Subsystem prefix
00029  * @v _api_func         API function
00030  * @v _func             Implementing function
00031  */
00032 #define PROVIDE_NAP( _subsys, _api_func, _func ) \
00033         PROVIDE_SINGLE_API ( NAP_PREFIX_ ## _subsys, _api_func, _func )
00034 
00035 /**
00036  * Provide a static inline CPU sleeping API implementation
00037  *
00038  * @v _prefix           Subsystem prefix
00039  * @v _api_func         API function
00040  */
00041 #define PROVIDE_NAP_INLINE( _subsys, _api_func ) \
00042         PROVIDE_SINGLE_API_INLINE ( NAP_PREFIX_ ## _subsys, _api_func )
00043 
00044 /* Include all architecture-independent I/O API headers */
00045 #include <gpxe/null_nap.h>
00046 
00047 /* Include all architecture-dependent I/O API headers */
00048 #include <bits/nap.h>
00049 
00050 /**
00051  * Sleep until next CPU interrupt
00052  *
00053  */
00054 void cpu_nap ( void );
00055 
00056 #endif /* _GPXE_NAP_H */

Generated on Tue Apr 6 20:00:51 2010 for gPXE by  doxygen 1.5.7.1