mmap.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* Copyright (C) 2001 Hewlett-Packard
  2. This program is free software; you can redistribute it and/or modify it under
  3. the terms of the GNU Library General Public License as published by the Free
  4. Software Foundation; either version 2 of the License, or (at your option) any
  5. later version.
  6. This program is distributed in the hope that it will be useful, but WITHOUT
  7. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
  9. details.
  10. You should have received a copy of the GNU Library General Public License
  11. along with this program; if not, write to the Free Software Foundation, Inc.,
  12. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  13. Derived in part from the Linux-8086 C library, the GNU C Library, and several
  14. other sundry sources. Files within this library are copyright by their
  15. respective copyright holders.
  16. */
  17. #include <unistd.h>
  18. #include <errno.h>
  19. #include <sys/mman.h>
  20. #ifdef HIOS
  21. # define __SH_SYSCALL6_TRAPA "0x2E"
  22. #else
  23. # define __SH_SYSCALL6_TRAPA "0x15"
  24. #endif
  25. #include <sys/syscall.h>
  26. #define __NR___mmap __NR_mmap
  27. attribute_hidden _syscall6(__ptr_t, __mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset);
  28. strong_alias(__mmap,mmap)