iPXE
unistd.h
Go to the documentation of this file.
1 #ifndef _UNISTD_H
2 #define _UNISTD_H
3 
4 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
5 
6 #include <stddef.h>
7 #include <stdarg.h>
8 
9 extern int execv ( const char *command, char * const argv[] );
10 
11 /**
12  * Execute command
13  *
14  * @v command Command name
15  * @v arg ... Argument list (starting with argv[0])
16  * @ret rc Command exit status
17  *
18  * This is a front end to execv().
19  */
20 #define execl( command, arg, ... ) ( { \
21  char * const argv[] = { (arg), ## __VA_ARGS__ }; \
22  int rc = execv ( (command), argv ); \
23  rc; \
24  } )
25 
26 /* Pick up udelay() and sleep() */
27 #include <ipxe/timer.h>
28 
29 static inline __always_inline void usleep ( unsigned long usecs ) {
30  udelay ( usecs );
31 }
32 
33 #endif /* _UNISTD_H */
A command-line command.
Definition: command.h:9
static __always_inline void usleep(unsigned long usecs)
Definition: unistd.h:29
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
iPXE timers
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
Definition: timer.c:60
#define __always_inline
Declare a function to be always inline.
Definition: compiler.h:611
int execv(const char *command, char *const argv[])
Execute command.
Definition: exec.c:60