Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

shm.hh

Go to the documentation of this file.
00001 
00002 #ifndef SHAREDMEM_HH
00003 #define SHAREDMEM_HH
00004 
00005 #include "rcs_defs.hh"          // RCS_EXPORT
00006 
00007 extern "C"
00008 {
00009 #ifndef UNDER_CE
00010 #include <sys/types.h>          /* key_t */
00011 #include <stddef.h>             /* size_t */
00012 #endif
00013 #include "_shm.h"               /* shm_t */
00014 }
00015 
00016 #define RCS_SHAREDMEM_NOCREATE 0x00     /* just attach to existing sharedmem */
00017 #define RCS_SHAREDMEM_CREATE 0x01       /* create sharedmem */
00018 
00019 class RCS_EXPORT RCS_SHAREDMEM
00020 {
00021 public:
00022   RCS_SHAREDMEM (key_t key, size_t size, int oflag, int mode = 0);
00023    ~RCS_SHAREDMEM ();
00024   int nattch ();                /* how many processes are attached */
00025   int create_errno;             /* 0 or stored errno after shmget failed */
00026   void *addr;                   /* pointer to shared memory */
00027   int delete_totally;           /* Flag to clean the sharedmem completely */
00028 
00029 private:
00030     shm_t * shm;
00031 public:
00032   int created;
00033 
00034 private:
00035     RCS_SHAREDMEM (RCS_SHAREDMEM & shm);        // Don't copy me.
00036 };
00037 
00038 #endif

Generated on Sun Dec 2 15:56:52 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001