You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

unistd.h 697B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _UNISTD_H
  2. #define _UNISTD_H
  3. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  4. #include <stddef.h>
  5. #include <stdarg.h>
  6. extern int execv ( const char *command, char * const argv[] );
  7. /**
  8. * Execute command
  9. *
  10. * @v command Command name
  11. * @v arg ... Argument list (starting with argv[0])
  12. * @ret rc Command exit status
  13. *
  14. * This is a front end to execv().
  15. */
  16. #define execl( command, arg, ... ) ( { \
  17. char * const argv[] = { (arg), ## __VA_ARGS__ }; \
  18. int rc = execv ( (command), argv ); \
  19. rc; \
  20. } )
  21. /* Pick up udelay() and sleep() */
  22. #include <ipxe/timer.h>
  23. static inline __always_inline void usleep ( unsigned long usecs ) {
  24. udelay ( usecs );
  25. }
  26. #endif /* _UNISTD_H */