Print this page
6607 add default MAP_FILE symbol to sys/mman.h
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>


  64  * allow any access to succeed where prot is specified as PROT_NONE.
  65  */
  66 #define PROT_READ       0x1             /* pages can be read */
  67 #define PROT_WRITE      0x2             /* pages can be written */
  68 #define PROT_EXEC       0x4             /* pages can be executed */
  69 
  70 #ifdef  _KERNEL
  71 #define PROT_USER       0x8             /* pages are user accessable */
  72 #define PROT_ZFOD       (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
  73 #define PROT_ALL        (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
  74 #endif  /* _KERNEL */
  75 
  76 #define PROT_NONE       0x0             /* pages cannot be accessed */
  77 
  78 /* sharing types:  must choose either SHARED or PRIVATE */
  79 #define MAP_SHARED      1               /* share changes */
  80 #define MAP_PRIVATE     2               /* changes are private */
  81 #define MAP_TYPE        0xf             /* mask for share type */
  82 
  83 /* other flags to mmap (or-ed in to MAP_SHARED or MAP_PRIVATE) */

  84 #define MAP_FIXED       0x10            /* user assigns address */
  85 #define MAP_NORESERVE   0x40            /* don't reserve needed swap area */
  86 #define MAP_ANON        0x100           /* map anonymous pages directly */
  87 #define MAP_ANONYMOUS   MAP_ANON        /* (source compatibility) */
  88 #define MAP_ALIGN       0x200           /* addr specifies alignment */
  89 #define MAP_TEXT        0x400           /* map code segment */
  90 #define MAP_INITDATA    0x800           /* map data segment */
  91 
  92 #ifdef _KERNEL
  93 #define _MAP_TEXTREPL   0x1000
  94 #endif /* _KERNEL */
  95 
  96 /* these flags not yet implemented */
  97 #define MAP_RENAME      0x20            /* rename private pages to file */
  98 
  99 #if     (_POSIX_C_SOURCE <= 2) && !defined(_XPG4_2)
 100 /* these flags are used by memcntl */
 101 #define PROC_TEXT       (PROT_EXEC | PROT_READ)
 102 #define PROC_DATA       (PROT_READ | PROT_WRITE | PROT_EXEC)
 103 #define SHARED          0x10




  64  * allow any access to succeed where prot is specified as PROT_NONE.
  65  */
  66 #define PROT_READ       0x1             /* pages can be read */
  67 #define PROT_WRITE      0x2             /* pages can be written */
  68 #define PROT_EXEC       0x4             /* pages can be executed */
  69 
  70 #ifdef  _KERNEL
  71 #define PROT_USER       0x8             /* pages are user accessable */
  72 #define PROT_ZFOD       (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
  73 #define PROT_ALL        (PROT_READ | PROT_WRITE | PROT_EXEC | PROT_USER)
  74 #endif  /* _KERNEL */
  75 
  76 #define PROT_NONE       0x0             /* pages cannot be accessed */
  77 
  78 /* sharing types:  must choose either SHARED or PRIVATE */
  79 #define MAP_SHARED      1               /* share changes */
  80 #define MAP_PRIVATE     2               /* changes are private */
  81 #define MAP_TYPE        0xf             /* mask for share type */
  82 
  83 /* other flags to mmap (or-ed in to MAP_SHARED or MAP_PRIVATE) */
  84 #define MAP_FILE        0               /* map from file (default) */
  85 #define MAP_FIXED       0x10            /* user assigns address */
  86 #define MAP_NORESERVE   0x40            /* don't reserve needed swap area */
  87 #define MAP_ANON        0x100           /* map anonymous pages directly */
  88 #define MAP_ANONYMOUS   MAP_ANON        /* (source compatibility) */
  89 #define MAP_ALIGN       0x200           /* addr specifies alignment */
  90 #define MAP_TEXT        0x400           /* map code segment */
  91 #define MAP_INITDATA    0x800           /* map data segment */
  92 
  93 #ifdef _KERNEL
  94 #define _MAP_TEXTREPL   0x1000
  95 #endif /* _KERNEL */
  96 
  97 /* these flags not yet implemented */
  98 #define MAP_RENAME      0x20            /* rename private pages to file */
  99 
 100 #if     (_POSIX_C_SOURCE <= 2) && !defined(_XPG4_2)
 101 /* these flags are used by memcntl */
 102 #define PROC_TEXT       (PROT_EXEC | PROT_READ)
 103 #define PROC_DATA       (PROT_READ | PROT_WRITE | PROT_EXEC)
 104 #define SHARED          0x10