summaryrefslogtreecommitdiff
path: root/ace/Message_Block.cpp
diff options
context:
space:
mode:
authorjxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-12 18:23:10 +0000
committerjxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-12 18:23:10 +0000
commit17b31a8b05f922c0eb0f2bdd4ad7dee8f111c21a (patch)
treeea0740a613b8b973e03ef96cb710dab127a7ae75 /ace/Message_Block.cpp
parent61d24cb233702017e066784ca745910912020395 (diff)
downloadATCD-17b31a8b05f922c0eb0f2bdd4ad7dee8f111c21a.tar.gz
* Asynch_IO.cpp: Minor changes to deal with FMR error.
* Message_Block.{cpp,i,h}: Changed rd_ptr_ and wr_ptr_ to be byte offsets from base (). This allows one to resize a duplicate without trashing other Message_Blocks that may be referring to the same data block. * Proactor.cpp: Made the message block 64 bytes bigger to make purify happier.
Diffstat (limited to 'ace/Message_Block.cpp')
-rw-r--r--ace/Message_Block.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp
index 27e2fd95aee..1c0f00bf4c4 100644
--- a/ace/Message_Block.cpp
+++ b/ace/Message_Block.cpp
@@ -199,18 +199,6 @@ ACE_Message_Block::size (size_t length)
if (this->data_block ()->size (length) == -1)
return -1;
- // Reset the read and write pointers if we've changed the underlying
- // memory buffer.
- else if (this->data_block ()->base () != old_base)
- {
- // Compute the old deltas...
- int r_delta = this->rd_ptr_ - old_base;
- int w_delta = this->wr_ptr_ - old_base;
-
- // ... and use them to initialize the new deltas.
- this->rd_ptr_ = this->data_block ()->base () + r_delta;
- this->wr_ptr_ = this->data_block ()->base () + w_delta;
- }
return 0;
}
@@ -711,8 +699,8 @@ ACE_Message_Block::duplicate (void) const
// same relative offset as in the existing <Message_Block>. Note
// that we are assuming that the data_block()->base() pointer
// doesn't change when it's duplicated.
- nb->rd_ptr (this->rd_ptr_ - this->data_block ()->base ());
- nb->wr_ptr (this->wr_ptr_ - this->data_block ()->base ());
+ nb->rd_ptr (this->rd_ptr_);
+ nb->wr_ptr (this->wr_ptr_);
// Increment the reference counts of all the continuation messages.
if (this->cont_)
@@ -807,8 +795,8 @@ ACE_Message_Block::clone (Message_Flags mask) const
// Set the read and write pointers in the new <Message_Block> to the
// same relative offset as in the existing <Message_Block>.
- nb->rd_ptr (this->rd_ptr_ - this->data_block ()->base ());
- nb->wr_ptr (this->wr_ptr_ - this->data_block ()->base ());
+ nb->rd_ptr (this->rd_ptr_);
+ nb->wr_ptr (this->wr_ptr_);
// Clone all the continuation messages if necessary.
if (this->cont () != 0