Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

wvshmzone.h

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*- 00002 * Worldvisions Weaver Software: 00003 * Copyright (C) 1997-2002 Net Integration Technologies, Inc. 00004 * 00005 * Shared memory zones. 00006 */ 00007 #ifndef __WVSHMZONE_H 00008 #define __WVSHMZONE_H 00009 00010 #include "wverror.h" 00011 00012 /** 00013 * Represents a shared-memory zone via mmap(). 00014 * 00015 * If you create one of these, its buf element will be 00016 * shared across fork() and you can use it for various things 00017 * such as a circular queue, semaphore, etc. 00018 * 00019 */ 00020 class WvShmZone : public WvError 00021 { 00022 public: 00023 /** 00024 * Creates a shared memory zone. 00025 * 00026 * "size" is the size of the zone in bytes 00027 */ 00028 WvShmZone(size_t size); 00029 ~WvShmZone(); 00030 00031 private: 00032 int fd; 00033 00034 public: 00035 int size; 00036 00037 union { 00038 void *buf; 00039 char *cbuf; 00040 unsigned char *ucbuf; 00041 }; 00042 }; 00043 00044 00045 #endif // __WVSHMZONE_h

Generated on Tue Oct 5 01:09:20 2004 for WvStreams by doxygen 1.3.7