summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-01 02:09:03 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-01 02:09:03 +0000
commit6b7d9b7148ee920af478044906305a94dcaf96d6 (patch)
tree9921b39c9cf77ea9814396049757847397be58a5
parent393522f3444bcccf43644690c42b077afc92a1e6 (diff)
downloadATCD-6b7d9b7148ee920af478044906305a94dcaf96d6.tar.gz
Fixed to pass <ACE_POSIX_Asynch_Result *> wherever <aiocb *> is being
passed, since it is ok to pass the derived class pointer in place of base class pointer.
-rw-r--r--ace/POSIX_Asynch_IO.cpp15
-rw-r--r--ace/POSIX_Asynch_IO.h2
2 files changed, 8 insertions, 9 deletions
diff --git a/ace/POSIX_Asynch_IO.cpp b/ace/POSIX_Asynch_IO.cpp
index e7f71fe731d..e94e1ddc5dd 100644
--- a/ace/POSIX_Asynch_IO.cpp
+++ b/ace/POSIX_Asynch_IO.cpp
@@ -205,9 +205,9 @@ ACE_POSIX_AIOCB_Asynch_Operation::~ACE_POSIX_AIOCB_Asynch_Operation (void)
// return 0 if yes, else return -1. If a valid ptr is passed, keep it
// in a free slot.
int
-ACE_POSIX_AIOCB_Asynch_Operation::register_aio_with_proactor (aiocb *aiocb_ptr)
+ACE_POSIX_AIOCB_Asynch_Operation::register_aio_with_proactor (ACE_POSIX_Asynch_Result *result)
{
- return this->posix_proactor ()->register_aio_with_proactor (aiocb_ptr);
+ return this->posix_proactor ()->register_aio_with_proactor (result);
}
// *********************************************************************
@@ -421,7 +421,7 @@ ACE_POSIX_AIOCB_Asynch_Read_Stream::shared_read (ACE_POSIX_Asynch_Read_Stream_Re
// strategy.
result->aio_sigevent.sigev_notify = SIGEV_NONE;
- // Fire off the aio write.
+ // Fire off the aio read.
if (aio_read (result) == -1)
// Queueing failed.
ACE_ERROR_RETURN ((LM_ERROR,
@@ -429,10 +429,9 @@ ACE_POSIX_AIOCB_Asynch_Read_Stream::shared_read (ACE_POSIX_Asynch_Read_Stream_Re
"Asynch_Read_Stream: aio_read queueing failed"),
-1);
- // <aio_read> successfully issued. Store the aiocb_ptr with
+ // <aio_read> successfully issued. Store the <result> with
// proactor.
- aiocb *aiocb_ptr = (aiocb *) result;
- if (this->register_aio_with_proactor (aiocb_ptr) == -1)
+ if (this->register_aio_with_proactor (result) == -1)
// This shouldn't happen anyway, since we have already checked for
// availability of free slots.
ACE_ERROR_RETURN ((LM_ERROR,
@@ -520,7 +519,7 @@ ACE_POSIX_SIG_Asynch_Read_Stream::shared_read (ACE_POSIX_Asynch_Read_Stream_Resu
result->aio_sigevent.sigev_value.sival_ptr = (void *) result;
- // Fire off the aio write.
+ // Fire off the aio read.
if (aio_read (result) == -1)
// Queueing failed.
ACE_ERROR_RETURN ((LM_ERROR,
@@ -754,7 +753,7 @@ ACE_POSIX_AIOCB_Asynch_Write_Stream::shared_write (ACE_POSIX_Asynch_Write_Stream
"Asynch_Write_Stream: aio_write queueing failed"),
-1);
- // Success. Store the aiocb_ptr with Proactor.
+ // Success. Store the <result> with Proactor.
if (this->register_aio_with_proactor (result) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"Fatal error:%N:%l:%p\n",
diff --git a/ace/POSIX_Asynch_IO.h b/ace/POSIX_Asynch_IO.h
index c7524c77c03..2bce0c72bf6 100644
--- a/ace/POSIX_Asynch_IO.h
+++ b/ace/POSIX_Asynch_IO.h
@@ -192,7 +192,7 @@ protected:
virtual ~ACE_POSIX_AIOCB_Asynch_Operation (void);
// Destructor.
- int register_aio_with_proactor (aiocb *aiocb_ptr);
+ int register_aio_with_proactor (ACE_POSIX_Asynch_Result *result);
// This call is for the POSIX implementation. This method is used by
// <ACE_Asynch_Operation> to store some information with the
// Proactor after an <aio_> call is issued, so that the Proactor can