[sundance] Add reset completion check
[gpxe.git] / src / include / unistd.h
blobdc1f67f6e4ff955ab90b028242ffe53a610ea728
1 #ifndef _UNISTD_H
2 #define _UNISTD_H
4 #include <stddef.h>
5 #include <stdarg.h>
7 extern int execv ( const char *command, char * const argv[] );
9 /**
10 * Execute command
12 * @v command Command name
13 * @v arg ... Argument list (starting with argv[0])
14 * @ret rc Command exit status
16 * This is a front end to execv().
18 #define execl( command, arg, ... ) ( { \
19 char * const argv[] = { (arg), ## __VA_ARGS__ }; \
20 int rc = execv ( (command), argv ); \
21 rc; \
22 } )
24 /* Pick up udelay() */
25 #include <gpxe/timer.h>
28 * sleep() prototype is defined by POSIX.1. usleep() prototype is
29 * defined by 4.3BSD. udelay() and mdelay() prototypes are chosen to
30 * be reasonably sensible.
34 extern unsigned int sleep ( unsigned int seconds );
35 extern void mdelay ( unsigned long msecs );
37 static inline __always_inline void usleep ( unsigned long usecs ) {
38 udelay ( usecs );
41 #endif /* _UNISTD_H */