summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-14 03:21:08 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-14 03:21:08 +0000
commit0e4666548733ba068a390a4aa4e43516d73d5530 (patch)
treecc2ed0cbaee984350dc10525585da86c1a1ae02a
parentd286ed3bf72f4679cc5ca9e32ac05340c34a6803 (diff)
downloadATCD-0e4666548733ba068a390a4aa4e43516d73d5530.tar.gz
*** empty log message ***
-rw-r--r--ChangeLog-98b6
-rw-r--r--README1
-rw-r--r--TAO/ChangeLog-98c21
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/Event_Manip.cpp3
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp94
-rw-r--r--TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw29
-rw-r--r--TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp7
-rw-r--r--ace/Mem_Map.cpp49
8 files changed, 188 insertions, 22 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b
index 4ced090c284..a811618fcb9 100644
--- a/ChangeLog-98b
+++ b/ChangeLog-98b
@@ -1,3 +1,9 @@
+Tue Oct 13 22:09:12 1998 Irfan Pyarali <irfan@cs.wustl.edu>
+
+ * ace/Mem_Map.cpp (map_it): One more try to get this right ;)
+ Thanks to Jonathan Reis <reis@minniemouse.cemax.com> for the bug
+ reports, suggested fixes, and test program.
+
Tue Oct 13 21:17:37 1998 Alexander Babu Arulanthu <alex@cs.wustl.edu>
* ace/Asynch_IO.cpp:
diff --git a/README b/README
index 26bdb4d3036..13f712f93db 100644
--- a/README
+++ b/README
@@ -658,6 +658,7 @@ Ian Wright <I.Wright@elsevier.co.uk>
David Janello <David.Janello@abnamro.com>
Rich Wellner <rw2@wellner.org>
Fernando D. Mato Mira <matomira@acm.org>
+Jonathan Reis <reis@minniemouse.cemax.com>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson and is now at ObjectSpace. Paul devised the recursive
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 655b05447c7..50b7c4e2408 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,11 +1,20 @@
+Tue Oct 13 22:15:53 1998 Irfan Pyarali <irfan@cs.wustl.edu>
+
+ * orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp (svc): Must set the
+ wr_ptr correctly. Otherwise, the ORB doesn't know how much to
+ data to encode.
+
+ * orbsvcs/orbsvcs/Event/Event_Manip.cpp (_create): event_set
+ length must be calculated before the call to get_buffer() since
+ that call will change the length.
+
Tue Oct 13 17:04:15 1998 Jeff Parsons <jp4@cs.wustl.edu>
- * tao/Any.cpp:
- Modified copy constructor and assignment operator to avoid
- encoding the value of the source Any when it is 0 (which it
- is if the Any was constructed from just a typecode. Perhaps
- this sequence of calls should never be made, but this guards
- against it anyway.
+ * tao/Any.cpp: Modified copy constructor and assignment operator
+ to avoid encoding the value of the source Any when it is 0
+ (which it is if the Any was constructed from just a
+ typecode. Perhaps this sequence of calls should never be made,
+ but this guards against it anyway.
Tue Oct 13 10:51:10 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Manip.cpp b/TAO/orbsvcs/orbsvcs/Event/Event_Manip.cpp
index ce1edaadc04..ae15bb3aa32 100644
--- a/TAO/orbsvcs/orbsvcs/Event/Event_Manip.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/Event_Manip.cpp
@@ -34,7 +34,8 @@ TAO_EC_Event_Set*
TAO_EC_Event_Set::_create (RtecEventComm::EventSet& event_set)
{
// Orphan the buffer....
- return new TAO_EC_Event_Set (event_set.length (),
+ CORBA::ULong length = event_set.length ();
+ return new TAO_EC_Event_Set (length,
event_set.get_buffer (1));
}
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp
new file mode 100644
index 00000000000..3d115a5c065
--- /dev/null
+++ b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsp
@@ -0,0 +1,94 @@
+# Microsoft Developer Studio Project File - Name="EC_Basic" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=EC_Basic - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "EC_Basic.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "EC_Basic.mak" CFG="EC_Basic - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "EC_Basic - Win32 Release" (based on\
+ "Win32 (x86) Console Application")
+!MESSAGE "EC_Basic - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "EC_Basic - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+
+!ELSEIF "$(CFG)" == "EC_Basic - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D TAO_ORBSVCS_HAS_DLL=1 /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 TAOd.lib orbsvcsd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\orbsvcs" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "EC_Basic - Win32 Release"
+# Name "EC_Basic - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\EC_Basic.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw
new file mode 100644
index 00000000000..ab0913a6d09
--- /dev/null
+++ b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 5.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "EC_Basic"=.\EC_Basic.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp
index 22752d4ef68..019a79f7abc 100644
--- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp
+++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.cpp
@@ -461,7 +461,8 @@ Test_Supplier::svc ()
{
ACE_Time_Value tv (0, this->burst_pause_);
- const ACE_Message_Block mb (this->event_size_);
+ ACE_Message_Block mb (this->event_size_);
+ mb.wr_ptr (this->event_size_);
RtecEventComm::EventSet event (1);
event.length (1);
@@ -492,7 +493,9 @@ Test_Supplier::svc ()
event[0].header.type = this->event_b_;
// ACE_DEBUG ((LM_DEBUG, "(%t) supplier push event\n"));
- this->consumer_proxy ()->push(event, TAO_TRY_ENV);
+ this->consumer_proxy ()->push (event, TAO_TRY_ENV);
+
+ TAO_CHECK_ENV;
}
ACE_OS::sleep (tv);
}
diff --git a/ace/Mem_Map.cpp b/ace/Mem_Map.cpp
index ca56554ab6d..e79a5cabf7e 100644
--- a/ace/Mem_Map.cpp
+++ b/ace/Mem_Map.cpp
@@ -80,6 +80,9 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle,
// Flag to indicate if we need to extend the back store
int extend_backing_store = 0;
+ // File length requested by user
+ size_t requested_file_length = 0;
+
// Check <length_request>
if (length_request == -1)
// Set length to file_request
@@ -87,10 +90,10 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle,
else
{
// File length implicitly requested by user
- size_t requested_file_length = length_request + offset;
+ requested_file_length = length_request + offset;
// Check to see if we need to extend the backing store
- if (requested_file_length < current_file_length)
+ if (requested_file_length > current_file_length)
{
// If the length of the mapped region is less than the
// length of the file then we force a complete new remapping
@@ -106,20 +109,39 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle,
this->length_ = length_request;
}
- if (extend_backing_store
- // Extend the backing store.
+ // Check if we need to extend the backing store.
+ if (extend_backing_store)
+ {
#if !defined (CHORUS)
- && ACE_OS::pwrite (this->handle_,
- "",
- 1,
- this->length_ > 0
- ? this->length_ - 1
- : 0) == -1)
+ // Remember than write increases the size by one.
+ size_t null_byte_position;
+ if (requested_file_length > 0)
+ // This will make the file size <requested_file_length>
+ null_byte_position = requested_file_length - 1;
+ else
+ // This will make the file size 1
+ null_byte_position = 0;
+
+ if (ACE_OS::pwrite (this->handle_,
+ "",
+ 1,
+ null_byte_position) == -1)
+ return -1;
#else
- && ACE_OS::ftruncate (this->handle_,
- this->length_) == -1)
+ // This nonsense is to make this code similar to the above code.
+ size_t actual_file_length;
+ if (requested_file_length > 0)
+ // This will make the file size <requested_file_length>
+ actual_file_length = requested_file_length;
+ else
+ // This will make the file size 1
+ actual_file_length = 1;
+
+ if (ACE_OS::ftruncate (this->handle_,
+ actual_file_length) == -1)
+ return -1;
#endif /* !CHORUS */
- return -1;
+ }
#if defined (__Lynx__)
// Set flag that indicates whether PROT_WRITE has been enabled.
@@ -134,6 +156,7 @@ ACE_Mem_Map::map_it (ACE_HANDLE handle,
offset,
&this->file_mapping_,
sa);
+
return this->base_addr_ == MAP_FAILED ? -1 : 0;
}