home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / IBMH / BSEMEMF.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  6KB  |  157 lines

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