mman.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef _SYS_MMAN_H
  2. #define _SYS_MMAN_H
  3. #include <features.h>
  4. #include <sys/types.h>
  5. #include <linux/mman.h>
  6. #ifndef MAP_ANON
  7. #define MAP_ANON MAP_ANONYMOUS /* idem */
  8. #endif
  9. #ifndef MAP_FILE
  10. #define MAP_FILE 0x00 /* The 'normal' way: mapped from file */
  11. #endif
  12. #define MAP_FAILED ((__ptr_t) -1) /* Return value of `mmap' in case of an error. */
  13. __BEGIN_DECLS
  14. extern __ptr_t mmap __P((__ptr_t __addr, size_t __len,
  15. int __prot, int __flags, int __fd, off_t __off));
  16. extern int munmap __P((__ptr_t __addr, size_t __len));
  17. extern int mprotect __P ((__const __ptr_t __addr, size_t __len, int __prot));
  18. extern int msync __P((__ptr_t __addr, size_t __len, int __flags));
  19. extern int mlock __P((__const __ptr_t __addr, size_t __len));
  20. extern int munlock __P((__const __ptr_t __addr, size_t __len));
  21. extern int mlockall __P((int __flags));
  22. extern int munlockall __P((void));
  23. extern __ptr_t mremap __P((__ptr_t __addr, size_t __old_len,
  24. size_t __new_len, int __may_move));
  25. __END_DECLS
  26. #endif /* _SYS_MMAN_H */