summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-02-10 21:39:23 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-02-10 21:39:23 +0000
commit1e7e0008f964df00a2ada749584509b3081659e0 (patch)
treec5b56ac8d72a61146cfd521f81edb3760709eefb
parentf42325d6844e72e38414fcf08d90b06dec92821b (diff)
downloadATCD-1e7e0008f964df00a2ada749584509b3081659e0.tar.gz
foo
-rw-r--r--ChangeLog-97a15
-rw-r--r--ace/Map_Manager.cpp11
-rw-r--r--ace/Mem_Map.h1
-rw-r--r--ace/Memory_Pool.cpp8
-rw-r--r--ace/Memory_Pool.h6
5 files changed, 35 insertions, 6 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a
index 7252e4d19a0..a4d5ceafae0 100644
--- a/ChangeLog-97a
+++ b/ChangeLog-97a
@@ -1,3 +1,18 @@
+Mon Feb 10 15:27:02 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
+
+ * ace/Memory_Pool: Added support that allows flags to be passed in
+ to the MMAP_Memory_Pool. This can be used to set the
+ appropriate type of backing store semantics (e.g., MAP_PRIVATE
+ and MAP_SHARED). Thanks to Fred LaBar
+ <flabar@fallschurch.esys.com> for providing this.
+
+Sun Feb 9 11:56:37 1997 Douglas C. Schmidt <schmidt@polka.cs.wustl.edu>
+
+ * ace/Map_Manager.cpp (bind_i): A recent change to Map_Manager
+ broke the Connector since errno was getting set to ENOENT rather
+ than EWOULDBLOCK. Thanks to Mark Rabotnikov
+ <mark@usp.elscintcorp.co.il> for finding this.
+
Sun Feb 09 21:44:34 1997 David L. Levine <levine@cs.wustl.edu>
* ace/{OS.cpp,Thread_Priority.cpp}: added comment about thread
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
index eac0b35b103..69644237498 100644
--- a/ace/Map_Manager.cpp
+++ b/ace/Map_Manager.cpp
@@ -322,6 +322,9 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::bind_i (const EXT_ID &ext_id,
ACE_TRACE ("ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::bind_i");
int first_free = -1;
+ // We need to save errno since <shared_find> may set errno to
+ // ENOENT.
+ int error = errno;
int index = this->shared_find (ext_id, first_free);
if (index >= 0)
@@ -329,8 +332,12 @@ ACE_Map_Manager<EXT_ID, INT_ID, LOCK>::bind_i (const EXT_ID &ext_id,
return 1;
else
- // We didn't find it, so let's bind it!
- return this->shared_bind (ext_id, int_id, first_free);
+ {
+ // Restore errno.
+ errno = error;
+ // We didn't find it, so let's bind it!
+ return this->shared_bind (ext_id, int_id, first_free);
+ }
}
// Associate <ext_id> with <int_id>. If <ext_id> is not in the
diff --git a/ace/Mem_Map.h b/ace/Mem_Map.h
index b8358d120b6..511351800f2 100644
--- a/ace/Mem_Map.h
+++ b/ace/Mem_Map.h
@@ -1,7 +1,6 @@
/* -*- C++ -*- */
// $Id$
-
// ============================================================================
//
// = LIBRARY
diff --git a/ace/Memory_Pool.cpp b/ace/Memory_Pool.cpp
index bebff7635f9..cc42d2f3aa4 100644
--- a/ace/Memory_Pool.cpp
+++ b/ace/Memory_Pool.cpp
@@ -120,6 +120,8 @@ ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool (LPCTSTR backing_store_name,
}
this->write_each_page_ = options->write_each_page_;
this->minimum_bytes_ = options->minimum_bytes_;
+ if (options->flags_ != 0)
+ this->flags_ = options->flags_;
}
if (backing_store_name == 0)
@@ -287,11 +289,13 @@ ACE_MMAP_Memory_Pool::remap (void *addr)
ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options (void *base_addr,
int use_fixed_addr,
int write_each_page,
- int minimum_bytes)
+ int minimum_bytes,
+ u_int flags)
: base_addr_ (base_addr),
use_fixed_addr_ (use_fixed_addr),
write_each_page_ (write_each_page),
- minimum_bytes_ (minimum_bytes)
+ minimum_bytes_ (minimum_bytes),
+ flags_ (flags)
{
ACE_TRACE ("ACE_MMAP_Memory_Pool_Options::ACE_MMAP_Memory_Pool_Options");
}
diff --git a/ace/Memory_Pool.h b/ace/Memory_Pool.h
index fa17480a3e2..1920122f598 100644
--- a/ace/Memory_Pool.h
+++ b/ace/Memory_Pool.h
@@ -298,7 +298,8 @@ public:
ACE_MMAP_Memory_Pool_Options (void *base_addr = ACE_DEFAULT_BASE_ADDR,
int use_fixed_addr = 1,
int write_each_page = 1,
- int minimum_bytes = 0);
+ int minimum_bytes = 0,
+ u_int flags = 0);
void *base_addr_;
// Base address of the memory-mapped backing store.
@@ -312,6 +313,9 @@ public:
int minimum_bytes_;
// What the minimim bytes of the initial segment should be.
+
+ u_int flags_;
+ // Any special flags that need to be used for <mmap>.
};
class ACE_Export ACE_MMAP_Memory_Pool : public ACE_Event_Handler