unistd.h

Go to the documentation of this file.
00001 #ifndef _UNISTD_H
00002 #define _UNISTD_H
00003 
00004 FILE_LICENCE ( GPL2_OR_LATER );
00005 
00006 #include <stddef.h>
00007 #include <stdarg.h>
00008 
00009 extern int execv ( const char *command, char * const argv[] );
00010 
00011 /**
00012  * Execute command
00013  *
00014  * @v command           Command name
00015  * @v arg ...           Argument list (starting with argv[0])
00016  * @ret rc              Command exit status
00017  *
00018  * This is a front end to execv().
00019  */
00020 #define execl( command, arg, ... ) ( {                                  \
00021                 char * const argv[] = { (arg), ## __VA_ARGS__ };        \
00022                 int rc = execv ( (command), argv );                     \
00023                 rc;                                                     \
00024         } )
00025 
00026 /* Pick up udelay() */
00027 #include <gpxe/timer.h>
00028 
00029 /*
00030  * sleep() prototype is defined by POSIX.1.  usleep() prototype is
00031  * defined by 4.3BSD.  udelay() and mdelay() prototypes are chosen to
00032  * be reasonably sensible.
00033  *
00034  */
00035 
00036 extern unsigned int sleep ( unsigned int seconds );
00037 extern void mdelay ( unsigned long msecs );
00038 
00039 static inline __always_inline void usleep ( unsigned long usecs ) {
00040         udelay ( usecs );
00041 }
00042 
00043 #endif /* _UNISTD_H */

Generated on Tue Apr 6 20:01:09 2010 for gPXE by  doxygen 1.5.7.1