home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / BSEMEMF.H < prev    next >
C/C++ Source or Header  |  1994-11-09  |  5KB  |  153 lines

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