home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / os2tk21j / cplus / os2h / bsememf.h__ / bsememf.h
Encoding:
C/C++ Source or Header  |  1993-04-29  |  4.8 KB  |  149 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. #pragma info( none )
  14.    #ifndef __CHKHDR__
  15.       #pragma info( none )
  16.    #endif
  17. #pragma info( restore )
  18. #ifdef __cplusplus
  19.       extern "C" {
  20. #endif
  21.  
  22. #ifndef __BSEMEMF__
  23. #define __BSEMEMF__
  24.  
  25.  /* Access protection                                                          */
  26.  
  27.  #define PAG_READ          0x00000001U      /* read access                      */
  28.  
  29.  #define PAG_WRITE         0x00000002U      /* write access                     */
  30.  
  31.  #define PAG_EXECUTE       0x00000004U      /* execute access                   */
  32.  
  33.  #define PAG_GUARD         0x00000008U      /* guard protection                 */
  34.  
  35.  #define PAG_DEFAULT       0x00000400U      /* default (initial) access         */
  36.  
  37.  
  38.  
  39.  /* Commit                                                                     */
  40.  
  41.  #define PAG_COMMIT        0x00000010U      /* commit storage                   */
  42.  
  43.  #define PAG_DECOMMIT      0x00000020U      /* decommit storage                 */
  44.  
  45.  
  46.  
  47.  /* Allocation attributes                                                      */
  48.  
  49.  #define OBJ_TILE          0x00000040U      /* tile object                      */
  50.  
  51.  #define OBJ_PROTECTED     0x00000080U      /* protect object
  52.  
  53.                                             NOTE: This flag is NOT available at
  54.  
  55.                                             the api level */
  56.  
  57.  #define OBJ_GETTABLE      0x00000100U      /* gettable by other processes      */
  58.  
  59.  #define OBJ_GIVEABLE      0x00000200U      /* giveable to other processes      */
  60.  
  61.  
  62.  
  63.  #define fPERM             (PAG_EXECUTE | PAG_READ | PAG_WRITE)
  64.  
  65.  #define fSHARE            (OBJ_GETTABLE | OBJ_GIVEABLE)
  66.  
  67.  
  68.  
  69.  /* DosAllocMem flags                                                          */
  70.  
  71.  #define fALLOC            (OBJ_TILE | PAG_COMMIT | fPERM)
  72.  
  73.  
  74.  
  75.  /* DosAllocSharedMem flags                                                    */
  76.  
  77.  #define fALLOCSHR         (OBJ_TILE | PAG_COMMIT | fSHARE | fPERM)
  78.  
  79.  
  80.  
  81.  /* DosGetNamedSharedMem flags                                                 */
  82.  
  83.  #define fGETNMSHR         (fPERM)
  84.  
  85.  
  86.  
  87.  /* DosGetSharedMem flags                                                      */
  88.  
  89.  #define fGETSHR           (fPERM)
  90.  
  91.  
  92.  
  93.  /* DosGiveSharedMem flags                                                     */
  94.  
  95.  #define fGIVESHR          (fPERM)
  96.  
  97.  
  98.  
  99.  /* DosSetMem flags                                                            */
  100.  
  101.  #define fSET              (PAG_COMMIT + PAG_DECOMMIT + PAG_DEFAULT + fPERM)
  102.  
  103.  
  104.  
  105.  /* Dos32SubSet flags                                                          */
  106.  
  107.  #define DOSSUB_INIT       0x01U           /* initialize memory object for     */
  108.  
  109.                                            /* suballocation                    */
  110.  
  111.  #define DOSSUB_GROW       0x02U           /* increase size of memory pool     */
  112.  
  113.                                            /* for suballocation                */
  114.  
  115.  #define DOSSUB_SPARSE_OBJ 0x04U           /* indicator for DosSub to          */
  116.  
  117.                                            /* manage the commitment of         */
  118.  
  119.                                            /* pages spanned by the memory      */
  120.  
  121.                                            /* pool                             */
  122.  
  123.  #define DOSSUB_SERIALIZE  0x08U           /* indicates that access to the     */
  124.  
  125.                                            /* memory pool is to be             */
  126.  
  127.                                            /* serialized by DosSub             */
  128.  
  129.  
  130.  
  131.  /* Allocation type (returned from DosQueryMem)                                */
  132.  
  133.  #define PAG_SHARED        0x00002000U     /* shared object                    */
  134.  
  135.  #define PAG_FREE          0x00004000U     /* pages are free                   */
  136.  
  137.  #define PAG_BASE          0x00010000U     /* first page in object             */
  138.  
  139. #endif /* __BSEMEMF__ */
  140.  
  141. #ifdef __cplusplus
  142.         }
  143. #endif
  144. #pragma info( none )
  145.    #ifndef __CHKHDR__
  146.       #pragma info( restore )
  147.    #endif
  148. #pragma info( restore )
  149.