home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v1.zip / DDKX86 / IBMH / BSEMEMF.H < prev    next >
C/C++ Source or Header  |  1995-04-14  |  6KB  |  159 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. /* NOINC */
  33. #define __BSEMEMF__
  34. /* INC */
  35.  
  36.  /* Access protection                                                          */
  37.  
  38.  #define PAG_READ          0x00000001U      /* read access                      */
  39.  
  40.  #define PAG_WRITE         0x00000002U      /* write access                     */
  41.  
  42.  #define PAG_EXECUTE       0x00000004U      /* execute access                   */
  43.  
  44.  #define PAG_GUARD         0x00000008U      /* guard protection                 */
  45.  
  46.  #define PAG_DEFAULT       0x00000400U      /* default (initial) access         */
  47.  
  48.  
  49.  
  50.  /* Commit                                                                     */
  51.  
  52.  #define PAG_COMMIT        0x00000010U      /* commit storage                   */
  53.  
  54.  #define PAG_DECOMMIT      0x00000020U      /* decommit storage                 */
  55.  
  56.  
  57.  
  58.  /* Allocation attributes                                                      */
  59.  
  60.  #define OBJ_TILE          0x00000040U      /* tile object                      */
  61.  
  62.  #define OBJ_PROTECTED     0x00000080U      /* protect object
  63.  
  64.                                             NOTE: This flag is NOT available at
  65.  
  66.                                             the api level */
  67.  
  68.  #define OBJ_GETTABLE      0x00000100U      /* gettable by other processes      */
  69.  
  70.  #define OBJ_GIVEABLE      0x00000200U      /* giveable to other processes      */
  71.  
  72.  
  73.  
  74.  #define fPERM             (PAG_EXECUTE | PAG_READ | PAG_WRITE)
  75.  
  76.  #define fSHARE            (OBJ_GETTABLE | OBJ_GIVEABLE)
  77.  
  78.  
  79.  
  80.  /* DosAllocMem flags                                                          */
  81.  
  82.  #define fALLOC            (OBJ_TILE | PAG_COMMIT | fPERM)
  83.  
  84.  
  85.  
  86.  /* DosAllocSharedMem flags                                                    */
  87.  
  88.  #define fALLOCSHR         (OBJ_TILE | PAG_COMMIT | fSHARE | fPERM)
  89.  
  90.  
  91.  
  92.  /* DosGetNamedSharedMem flags                                                 */
  93.  
  94.  #define fGETNMSHR         (fPERM)
  95.  
  96.  
  97.  
  98.  /* DosGetSharedMem flags                                                      */
  99.  
  100.  #define fGETSHR           (fPERM)
  101.  
  102.  
  103.  
  104.  /* DosGiveSharedMem flags                                                     */
  105.  
  106.  #define fGIVESHR          (fPERM)
  107.  
  108.  
  109.  
  110.  /* DosSetMem flags                                                            */
  111.  
  112.  #define fSET              (PAG_COMMIT + PAG_DECOMMIT + PAG_DEFAULT + fPERM)
  113.  
  114.  
  115.  
  116.  /* Dos32SubSet flags                                                          */
  117.  
  118.  #define DOSSUB_INIT       0x01U           /* initialize memory object for     */
  119.  
  120.                                            /* suballocation                    */
  121.  
  122.  #define DOSSUB_GROW       0x02U           /* increase size of memory pool     */
  123.  
  124.                                            /* for suballocation                */
  125.  
  126.  #define DOSSUB_SPARSE_OBJ 0x04U           /* indicator for DosSub to          */
  127.  
  128.                                            /* manage the commitment of         */
  129.  
  130.                                            /* pages spanned by the memory      */
  131.  
  132.                                            /* pool                             */
  133.  
  134.  #define DOSSUB_SERIALIZE  0x08U           /* indicates that access to the     */
  135.  
  136.                                            /* memory pool is to be             */
  137.  
  138.                                            /* serialized by DosSub             */
  139.  
  140.  
  141.  
  142.  /* Allocation type (returned from DosQueryMem)                                */
  143.  
  144.  #define PAG_SHARED        0x00002000U     /* shared object                    */
  145.  
  146.  #define PAG_FREE          0x00004000U     /* pages are free                   */
  147.  
  148.  #define PAG_BASE          0x00010000U     /* first page in object             */
  149.  
  150. #endif /* __BSEMEMF__ */
  151.  
  152. #ifdef __IBMC__
  153. #pragma checkout( suspend )
  154.    #ifndef __CHKHDR__
  155.       #pragma checkout( resume )
  156.    #endif
  157. #pragma checkout( resume )
  158. #endif
  159.