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 916B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef _UNISTD_H
  2. #define _UNISTD_H
  3. #include <stddef.h>
  4. #include <stdarg.h>
  5. extern int execv ( const char *command, char * const argv[] );
  6. /**
  7. * Execute command
  8. *
  9. * @v command Command name
  10. * @v arg ... Argument list (starting with argv[0])
  11. * @ret rc Command exit status
  12. *
  13. * This is a front end to execv().
  14. */
  15. #define execl( command, arg, ... ) ( { \
  16. char * const argv[] = { (arg), ## __VA_ARGS__ }; \
  17. int rc = execv ( (command), argv ); \
  18. rc; \
  19. } )
  20. /* Pick up udelay() */
  21. #include <gpxe/timer.h>
  22. /*
  23. * sleep() prototype is defined by POSIX.1. usleep() prototype is
  24. * defined by 4.3BSD. udelay() and mdelay() prototypes are chosen to
  25. * be reasonably sensible.
  26. *
  27. */
  28. extern unsigned int sleep ( unsigned int seconds );
  29. extern void mdelay ( unsigned long msecs );
  30. static inline __always_inline void usleep ( unsigned long usecs ) {
  31. udelay ( usecs );
  32. }
  33. #endif /* _UNISTD_H */