mman.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (C) 2016 Andes Technology, Inc.
  3. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  4. */
  5. /* Definitions for POSIX memory map interface. Linux/NDS32 version.
  6. Copyright (C) 1997-2018 Free Software Foundation, Inc.
  7. The GNU C Library is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU Lesser General Public
  9. License as published by the Free Software Foundation; either
  10. version 2.1 of the License, or (at your option) any later version.
  11. The GNU C Library is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. Lesser General Public License for more details.
  15. You should have received a copy of the GNU Lesser General Public
  16. License along with the GNU C Library; if not, write to the Free
  17. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  18. 02111-1307 USA. */
  19. #ifndef _SYS_MMAN_H
  20. # error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
  21. #endif
  22. /* The following definitions basically come from the kernel headers.
  23. But the kernel header is not namespace clean. */
  24. /* These are Linux-specific. */
  25. #ifdef __USE_MISC
  26. # define MAP_GROWSDOWN 0x0100 /* stack-like segment */
  27. # define MAP_DENYWRITE 0x0800 /* ETXTBSY */
  28. # define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
  29. # define MAP_LOCKED 0x2000 /* pages are locked */
  30. # define MAP_NORESERVE 0x4000 /* don't check for reservations */
  31. # define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */
  32. # define MAP_NONBLOCK 0x10000 /* do not block on IO */
  33. # define MAP_STACK 0x20000 /* Allocation is for a stack. */
  34. # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
  35. #endif
  36. /* Include generic Linux declarations. */
  37. #include <bits/mman-linux.h>