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