_mmap.c 429 B

123456789101112131415161718
  1. /* Use new style mmap for mips */
  2. #include <unistd.h>
  3. #include <errno.h>
  4. #include <sys/mman.h>
  5. #include <sys/syscall.h>
  6. #if 0
  7. /* For now, leave mmap using mmap1 since mmap2 seems
  8. * to have issues (i.e. it doesn't work 100% properly).
  9. */
  10. #ifdef __NR_mmap2
  11. # undef __NR_mmap
  12. # define __NR_mmap __NR_mmap2
  13. #endif
  14. #endif
  15. _syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
  16. int, flags, int, fd, __off_t, offset);