iPXE
unistd.h
Go to the documentation of this file.
1#ifndef _UNISTD_H
2#define _UNISTD_H
3
4FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
5FILE_SECBOOT ( PERMITTED );
6
7#include <stddef.h>
8#include <stdarg.h>
9
10extern 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
30static inline __always_inline void usleep ( unsigned long usecs ) {
31 udelay ( usecs );
32}
33
34#endif /* _UNISTD_H */
#define __always_inline
Declare a function to be always inline.
Definition compiler.h:611
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
iPXE timers
A command-line command.
Definition command.h:10
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
Definition timer.c:61
int execv(const char *command, char *const argv[])
Execute command.
Definition exec.c:61
static __always_inline void usleep(unsigned long usecs)
Definition unistd.h:30