home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mmap-177.zip / mman.h < prev    next >
Text File  |  1999-08-21  |  1KB  |  53 lines

  1. /*
  2.  
  3. Memory Mapped Files Emulation Layer v1.75
  4. (c) 1998, 1999 Maurilio Longo - md2520@mclink.it
  5.  
  6. */
  7.  
  8. #ifndef _SYS_MMAN_H        /* As per miyata@kusm.kyoto-u.ac.jp suggestion */
  9. #define _SYS_MMAN_H
  10.  
  11. #if defined (__cplusplus)
  12. extern "C" {
  13. #endif
  14.  
  15. #define INCL_DOSEXCEPTIONS
  16. #include <os2.h>
  17.  
  18. typedef EXCEPTIONREGISTRATIONRECORD mmap_reg_t;
  19.  
  20. #define HAVE_MSYNC    0x1
  21. #define MSYNC_3        0x1
  22. #define    PROT_READ    0x0001
  23. #define    PROT_WRITE    0x0002
  24. #define    PROT_EXEC    0x0004
  25. #define    PROT_NONE    0x0000
  26. #define    MAP_SHARED    0x1
  27. #define    MAP_PRIVATE    0x2
  28. #define    MAP_FIXED    0x10
  29. #define    MCL_CURRENT    0x1
  30. #define    MCL_FUTURE    0x2
  31. #define    MS_ASYNC    0x1
  32. #define    MS_INVALIDATE   0x2
  33. #define MS_SYNC        0x4
  34.  
  35. #define    MS_MUNMAP    0x10     /* not standard, used internally by munmap() */
  36.  
  37.  
  38. int        getpagesize(void);
  39. int        mprotect(caddr_t pAddr, int cbLen, int fProtection);
  40. int        mlockall(int fFlags);
  41. caddr_t    mmap(caddr_t pAddr, size_t cbLen, int fProtection, int fFlags, int hFile, off_t cbOffset);
  42. int        msync(caddr_t pAddr, int cbLen, int fFlags);
  43. int        munlockall(void);
  44. int        munmap(caddr_t pAddr, int cbLen);
  45. int        merror(void);
  46. int      mregister(mmap_reg_t *pReg);
  47. int      mderegister(mmap_reg_t *pReg);
  48.  
  49. #if defined (__cplusplus)
  50. }
  51. #endif
  52. #endif /* not _SYS_MMAN_H */
  53.