home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / toolkt21 / c / os2h / bsememf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-12  |  4.8 KB  |  147 lines

  1. /*static char *SCCSID = "@(#)bsememf.h    6.8 92/03/15";*/
  2.  
  3.  /******************************************************************************\
  4.  *                                                                             *
  5.  * Module Name: BSEMEMF.H                                                      *
  6.  *                                                                             *
  7.  * OS/2 Base MEMory Flags include file                                         *
  8.  *                                                                             *
  9.  * Copyright (c) 1989  - 1992 IBM Corporation                                  *
  10.  *                                                                             *
  11.  *******************************************************************************/
  12.  
  13. #ifdef __IBMC__
  14. #pragma checkout( suspend )
  15.    #ifndef __CHKHDR__
  16.       #pragma checkout( suspend )
  17.    #endif
  18. #pragma checkout( resume )
  19. #endif
  20.  
  21. #ifndef __BSEMEMF__
  22. #define __BSEMEMF__
  23.  
  24.  /* Access protection                                                          */
  25.  
  26.  #define PAG_READ          0x00000001U      /* read access                      */
  27.  
  28.  #define PAG_WRITE         0x00000002U      /* write access                     */
  29.  
  30.  #define PAG_EXECUTE       0x00000004U      /* execute access                   */
  31.  
  32.  #define PAG_GUARD         0x00000008U      /* guard protection                 */
  33.  
  34.  #define PAG_DEFAULT       0x00000400U      /* default (initial) access         */
  35.  
  36.  
  37.  
  38.  /* Commit                                                                     */
  39.  
  40.  #define PAG_COMMIT        0x00000010U      /* commit storage                   */
  41.  
  42.  #define PAG_DECOMMIT      0x00000020U      /* decommit storage                 */
  43.  
  44.  
  45.  
  46.  /* Allocation attributes                                                      */
  47.  
  48.  #define OBJ_TILE          0x00000040U      /* tile object                      */
  49.  
  50.  #define OBJ_PROTECTED     0x00000080U      /* protect object
  51.  
  52.                                             NOTE: This flag is NOT available at
  53.  
  54.                                             the api level */
  55.  
  56.  #define OBJ_GETTABLE      0x00000100U      /* gettable by other processes      */
  57.  
  58.  #define OBJ_GIVEABLE      0x00000200U      /* giveable to other processes      */
  59.  
  60.  
  61.  
  62.  #define fPERM             (PAG_EXECUTE | PAG_READ | PAG_WRITE)
  63.  
  64.  #define fSHARE            (OBJ_GETTABLE | OBJ_GIVEABLE)
  65.  
  66.  
  67.  
  68.  /* DosAllocMem flags                                                          */
  69.  
  70.  #define fALLOC            (OBJ_TILE | PAG_COMMIT | fPERM)
  71.  
  72.  
  73.  
  74.  /* DosAllocSharedMem flags                                                    */
  75.  
  76.  #define fALLOCSHR         (OBJ_TILE | PAG_COMMIT | fSHARE | fPERM)
  77.  
  78.  
  79.  
  80.  /* DosGetNamedSharedMem flags                                                 */
  81.  
  82.  #define fGETNMSHR         (fPERM)
  83.  
  84.  
  85.  
  86.  /* DosGetSharedMem flags                                                      */
  87.  
  88.  #define fGETSHR           (fPERM)
  89.  
  90.  
  91.  
  92.  /* DosGiveSharedMem flags                                                     */
  93.  
  94.  #define fGIVESHR          (fPERM)
  95.  
  96.  
  97.  
  98.  /* DosSetMem flags                                                            */
  99.  
  100.  #define fSET              (PAG_COMMIT + PAG_DECOMMIT + PAG_DEFAULT + fPERM)
  101.  
  102.  
  103.  
  104.  /* Dos32SubSet flags                                                          */
  105.  
  106.  #define DOSSUB_INIT       0x01U           /* initialize memory object for     */
  107.  
  108.                                            /* suballocation                    */
  109.  
  110.  #define DOSSUB_GROW       0x02U           /* increase size of memory pool     */
  111.  
  112.                                            /* for suballocation                */
  113.  
  114.  #define DOSSUB_SPARSE_OBJ 0x04U           /* indicator for DosSub to          */
  115.  
  116.                                            /* manage the commitment of         */
  117.  
  118.                                            /* pages spanned by the memory      */
  119.  
  120.                                            /* pool                             */
  121.  
  122.  #define DOSSUB_SERIALIZE  0x08U           /* indicates that access to the     */
  123.  
  124.                                            /* memory pool is to be             */
  125.  
  126.                                            /* serialized by DosSub             */
  127.  
  128.  
  129.  
  130.  /* Allocation type (returned from DosQueryMem)                                */
  131.  
  132.  #define PAG_SHARED        0x00002000U     /* shared object                    */
  133.  
  134.  #define PAG_FREE          0x00004000U     /* pages are free                   */
  135.  
  136.  #define PAG_BASE          0x00010000U     /* first page in object             */
  137.  
  138. #endif /* __BSEMEMF__ */
  139.  
  140. #ifdef __IBMC__
  141. #pragma checkout( suspend )
  142.    #ifndef __CHKHDR__
  143.       #pragma checkout( resume )
  144.    #endif
  145. #pragma checkout( resume )
  146. #endif
  147.