alt_syscall.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #ifndef __ALT_SYSCALL_H__
  2. #define __ALT_SYSCALL_H__
  3. /******************************************************************************
  4. * *
  5. * License Agreement *
  6. * *
  7. * Copyright (c) 2003 Altera Corporation, San Jose, California, USA. *
  8. * All rights reserved. *
  9. * *
  10. * Permission is hereby granted, free of charge, to any person obtaining a *
  11. * copy of this software and associated documentation files (the "Software"), *
  12. * to deal in the Software without restriction, including without limitation *
  13. * the rights to use, copy, modify, merge, publish, distribute, sublicense, *
  14. * and/or sell copies of the Software, and to permit persons to whom the *
  15. * Software is furnished to do so, subject to the following conditions: *
  16. * *
  17. * The above copyright notice and this permission notice shall be included in *
  18. * all copies or substantial portions of the Software. *
  19. * *
  20. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
  21. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
  22. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
  23. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
  24. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *
  25. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *
  26. * DEALINGS IN THE SOFTWARE. *
  27. * *
  28. * This agreement shall be governed in all respects by the laws of the State *
  29. * of California and by the laws of the United States of America. *
  30. * *
  31. ******************************************************************************/
  32. /*
  33. * The macros defined in this file are used to provide the function names used
  34. * for the HAL 'UNIX style' interface, e.g. read(), write() etc.
  35. *
  36. * Operating systems which are ported to the HAL can provide their own
  37. * version of this file, which will be used in preference. This allows
  38. * the operating system to provide it's own implementation of the top level
  39. * system calls, while retaining the HAL functions under a different name,
  40. * for example, alt_read(), alt_write() etc.
  41. */
  42. #define ALT_CLOSE close
  43. #define ALT_ENVIRON environ
  44. #define ALT_EXECVE execve
  45. #define ALT_EXIT _exit
  46. #define ALT_FCNTL fcntl
  47. #define ALT_FORK fork
  48. #define ALT_FSTAT fstat
  49. #define ALT_GETPID getpid
  50. #define ALT_GETTIMEOFDAY gettimeofday
  51. #define ALT_IOCTL ioctl
  52. #define ALT_ISATTY isatty
  53. #define ALT_KILL kill
  54. #define ALT_LINK link
  55. #define ALT_LSEEK lseek
  56. #define ALT_OPEN open
  57. #define ALT_READ read
  58. #define ALT_RENAME _rename
  59. #define ALT_SBRK sbrk
  60. #define ALT_SETTIMEOFDAY settimeofday
  61. #define ALT_STAT stat
  62. #define ALT_UNLINK unlink
  63. #define ALT_USLEEP usleep
  64. #define ALT_WAIT wait
  65. #define ALT_WRITE write
  66. #define ALT_TIMES times
  67. /*
  68. *
  69. */
  70. #endif /* __ALT_SYSCALL_H__ */