summaryrefslogtreecommitdiff
path: root/ace/Shared_Memory_MM.i
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-10-21 21:41:34 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-10-21 21:41:34 +0000
commita5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch)
treebcf0a25c3d45a209a6e3ac37b233a4812f29c732 /ace/Shared_Memory_MM.i
downloadATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz
Initial revision
Diffstat (limited to 'ace/Shared_Memory_MM.i')
-rw-r--r--ace/Shared_Memory_MM.i81
1 files changed, 81 insertions, 0 deletions
diff --git a/ace/Shared_Memory_MM.i b/ace/Shared_Memory_MM.i
new file mode 100644
index 00000000000..4f49965c3f3
--- /dev/null
+++ b/ace/Shared_Memory_MM.i
@@ -0,0 +1,81 @@
+/* -*- C++ -*- */
+// $Id$
+
+// Shared_Memory_MM.i
+
+ACE_INLINE int
+ACE_Shared_Memory_MM::open (ACE_HANDLE handle,
+ int length,
+ int prot,
+ int share,
+ char *addr,
+ off_t pos)
+{
+ ACE_TRACE ("ACE_Shared_Memory_MM::open");
+ return shared_memory_.map (handle, length, prot, share, addr, pos);
+}
+
+ACE_INLINE int
+ACE_Shared_Memory_MM::open (char file_name[],
+ int len,
+ int flags,
+ int mode,
+ int prot,
+ int share,
+ char *addr,
+ off_t pos)
+{
+ ACE_TRACE ("ACE_Shared_Memory_MM::open");
+ return shared_memory_.map (file_name, len, flags, mode,
+ prot, share, addr, pos);
+}
+
+// The overall size of the segment.
+
+ACE_INLINE int
+ACE_Shared_Memory_MM::get_segment_size (void) const
+{
+ ACE_TRACE ("ACE_Shared_Memory_MM::get_segment_size");
+ return this->shared_memory_.size ();
+}
+
+// Unmaps the shared memory segment.
+
+ACE_INLINE int
+ACE_Shared_Memory_MM::remove (void)
+{
+ ACE_TRACE ("ACE_Shared_Memory_MM::remove");
+ return shared_memory_.unmap ();
+}
+
+// Closes (unmaps) the shared memory segment.
+
+ACE_INLINE int
+ACE_Shared_Memory_MM::close (void)
+{
+ ACE_TRACE ("ACE_Shared_Memory_MM::close");
+ return shared_memory_.unmap ();
+}
+
+ACE_INLINE void *
+ACE_Shared_Memory_MM::malloc (size_t)
+{
+ ACE_TRACE ("ACE_Shared_Memory_MM::malloc");
+ void *addr;
+
+ return this->shared_memory_ (addr) == -1 ? 0 : addr;
+}
+
+ACE_INLINE ACE_HANDLE
+ACE_Shared_Memory_MM::get_id (void) const
+{
+ ACE_TRACE ("ACE_Shared_Memory_MM::get_id");
+ return this->shared_memory_.handle ();
+}
+
+ACE_INLINE int
+ACE_Shared_Memory_MM::free (void *p)
+{
+ ACE_TRACE ("ACE_Shared_Memory_MM::free");
+ return p != 0;
+}