Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

unistd.h 949B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _UNISTD_H
  2. #define _UNISTD_H
  3. FILE_LICENCE ( GPL2_OR_LATER );
  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() */
  22. #include <gpxe/timer.h>
  23. /*
  24. * sleep() prototype is defined by POSIX.1. usleep() prototype is
  25. * defined by 4.3BSD. udelay() and mdelay() prototypes are chosen to
  26. * be reasonably sensible.
  27. *
  28. */
  29. extern unsigned int sleep ( unsigned int seconds );
  30. extern void mdelay ( unsigned long msecs );
  31. static inline __always_inline void usleep ( unsigned long usecs ) {
  32. udelay ( usecs );
  33. }
  34. #endif /* _UNISTD_H */