source: bootcd/isolinux/syslinux-6.03/gpxe/src/include/unistd.h

Last change on this file was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 949 bytes
RevLine 
[e16e8f2]1#ifndef _UNISTD_H
2#define _UNISTD_H
3
4FILE_LICENCE ( GPL2_OR_LATER );
5
6#include <stddef.h>
7#include <stdarg.h>
8
9extern 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() */
27#include <gpxe/timer.h>
28
29/*
30 * sleep() prototype is defined by POSIX.1.  usleep() prototype is
31 * defined by 4.3BSD.  udelay() and mdelay() prototypes are chosen to
32 * be reasonably sensible.
33 *
34 */
35
36extern unsigned int sleep ( unsigned int seconds );
37extern void mdelay ( unsigned long msecs );
38
39static inline __always_inline void usleep ( unsigned long usecs ) {
40        udelay ( usecs );
41}
42
43#endif /* _UNISTD_H */
Note: See TracBrowser for help on using the repository browser.