summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>2001-02-08 14:52:46 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>2001-02-08 14:52:46 +0000
commit4036fbbe54fef852bc93504c99021bbe62939f4d (patch)
treed79f36f5b4b548ea2bedc80b87e47dccb6b05516
parent9c871081f0fe74a3e1261b1d8eb8ad5f80cd3250 (diff)
downloadATCD-4036fbbe54fef852bc93504c99021bbe62939f4d.tar.gz
ChangeLogTag:Thu Feb 8 00:34:57 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
-rw-r--r--ChangeLog30
-rw-r--r--ChangeLogs/ChangeLog-02a30
-rw-r--r--ChangeLogs/ChangeLog-03a30
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a7
-rw-r--r--THANKS2
-rw-r--r--ace/ACE.cpp2
-rw-r--r--ace/Logging_Strategy.cpp4
-rw-r--r--ace/SUN_Proactor.cpp86
-rw-r--r--ace/SUN_Proactor.h3
-rw-r--r--apps/Gateway/Gateway/Event_Channel.cpp58
-rw-r--r--apps/Gateway/Peer/Peer.cpp3
-rw-r--r--include/makeinclude/platform_sunos5_g++.GNU7
12 files changed, 201 insertions, 61 deletions
diff --git a/ChangeLog b/ChangeLog
index ef0c74a9bb5..72551df7ac5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Feb 8 00:34:57 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * include/makeinclude/platform_sunos5_g++.GNU: Added support for
+ -fno-exception when exceptions=0 is given to the Makefile.
+ Thanks to Christian v. Mueffling <cvm@aiss.de> for reporting
+ this.
+
+Wed Feb 7 23:02:46 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/SUN_Proactor.cpp: Fixed the cancel_aiocb() method and added a
+ new overridden cancel_aio() method. Thanks to Alexander Libman
+ <Alibman@baltimore.com> for contributing this.
+
Thu Feb 8 02:09:05 2001 Pradeep Gore <pradeep@cs.wustl.edu>
* examples/QOS/Makefile:
@@ -39,12 +52,24 @@ Thu Feb 8 00:17:43 2001 Pradeep Gore <pradeep@cs.wustl.edu>
Added Makefile and MSVC project files.
Thanks to Craig Rodrigues <crodrigu@bbn.com> for suggesting this
change and providing the patch.
-
+
Wed Feb 7 11:34:56 2001 Carlos O'Ryan <coryan@uci.edu>
* tests/Message_Queue_Test_Ex.cpp:
Fix build problems for single threaded environments.
+Wed Feb 7 09:03:22 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * apps/Gateway/Gateway/Event_Channel.cpp (initiate_acceptors): Fixed
+ incorrect if/else branching. Thanks to Lu Yunhai
+ <luyunhai@huawei.com> for reporting this.
+
+Tue Feb 6 23:43:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * apps/Gateway/Peer/Peer.cpp (await_events): Fixed the use of
+ %s to be %*s since the string may not be nul terminated! Thanks
+ to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+
Tue Feb 6 20:11:28 2001 Krishnakumar B <kitty@cs.wustl.edu>
* include/makeinclude/platform_sunos5_sunc++.GNU:
@@ -98,6 +123,9 @@ Tue Feb 06 17:16:43 2001 Steve Huston <shuston@riverace.com>
Mon Feb 5 16:19:20 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+ * ace/ACE.cpp: ACE_TRACE ("ACE::basename") should be ACE_TRACE ("ACE::diname").
+ Thanks to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+
* ace/Basic_Types.h: Changed the ACE_BIG_ENDIAN and ACE_LITTLE_ENDIAN
macros to use the form 0x0123 rather than 0123X. Thanks to
Craig Rodrigues <crodrigu@bbn.com> for helping find this
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index ef0c74a9bb5..72551df7ac5 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,16 @@
+Thu Feb 8 00:34:57 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * include/makeinclude/platform_sunos5_g++.GNU: Added support for
+ -fno-exception when exceptions=0 is given to the Makefile.
+ Thanks to Christian v. Mueffling <cvm@aiss.de> for reporting
+ this.
+
+Wed Feb 7 23:02:46 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/SUN_Proactor.cpp: Fixed the cancel_aiocb() method and added a
+ new overridden cancel_aio() method. Thanks to Alexander Libman
+ <Alibman@baltimore.com> for contributing this.
+
Thu Feb 8 02:09:05 2001 Pradeep Gore <pradeep@cs.wustl.edu>
* examples/QOS/Makefile:
@@ -39,12 +52,24 @@ Thu Feb 8 00:17:43 2001 Pradeep Gore <pradeep@cs.wustl.edu>
Added Makefile and MSVC project files.
Thanks to Craig Rodrigues <crodrigu@bbn.com> for suggesting this
change and providing the patch.
-
+
Wed Feb 7 11:34:56 2001 Carlos O'Ryan <coryan@uci.edu>
* tests/Message_Queue_Test_Ex.cpp:
Fix build problems for single threaded environments.
+Wed Feb 7 09:03:22 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * apps/Gateway/Gateway/Event_Channel.cpp (initiate_acceptors): Fixed
+ incorrect if/else branching. Thanks to Lu Yunhai
+ <luyunhai@huawei.com> for reporting this.
+
+Tue Feb 6 23:43:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * apps/Gateway/Peer/Peer.cpp (await_events): Fixed the use of
+ %s to be %*s since the string may not be nul terminated! Thanks
+ to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+
Tue Feb 6 20:11:28 2001 Krishnakumar B <kitty@cs.wustl.edu>
* include/makeinclude/platform_sunos5_sunc++.GNU:
@@ -98,6 +123,9 @@ Tue Feb 06 17:16:43 2001 Steve Huston <shuston@riverace.com>
Mon Feb 5 16:19:20 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+ * ace/ACE.cpp: ACE_TRACE ("ACE::basename") should be ACE_TRACE ("ACE::diname").
+ Thanks to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+
* ace/Basic_Types.h: Changed the ACE_BIG_ENDIAN and ACE_LITTLE_ENDIAN
macros to use the form 0x0123 rather than 0123X. Thanks to
Craig Rodrigues <crodrigu@bbn.com> for helping find this
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index ef0c74a9bb5..72551df7ac5 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,16 @@
+Thu Feb 8 00:34:57 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * include/makeinclude/platform_sunos5_g++.GNU: Added support for
+ -fno-exception when exceptions=0 is given to the Makefile.
+ Thanks to Christian v. Mueffling <cvm@aiss.de> for reporting
+ this.
+
+Wed Feb 7 23:02:46 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * ace/SUN_Proactor.cpp: Fixed the cancel_aiocb() method and added a
+ new overridden cancel_aio() method. Thanks to Alexander Libman
+ <Alibman@baltimore.com> for contributing this.
+
Thu Feb 8 02:09:05 2001 Pradeep Gore <pradeep@cs.wustl.edu>
* examples/QOS/Makefile:
@@ -39,12 +52,24 @@ Thu Feb 8 00:17:43 2001 Pradeep Gore <pradeep@cs.wustl.edu>
Added Makefile and MSVC project files.
Thanks to Craig Rodrigues <crodrigu@bbn.com> for suggesting this
change and providing the patch.
-
+
Wed Feb 7 11:34:56 2001 Carlos O'Ryan <coryan@uci.edu>
* tests/Message_Queue_Test_Ex.cpp:
Fix build problems for single threaded environments.
+Wed Feb 7 09:03:22 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * apps/Gateway/Gateway/Event_Channel.cpp (initiate_acceptors): Fixed
+ incorrect if/else branching. Thanks to Lu Yunhai
+ <luyunhai@huawei.com> for reporting this.
+
+Tue Feb 6 23:43:49 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+
+ * apps/Gateway/Peer/Peer.cpp (await_events): Fixed the use of
+ %s to be %*s since the string may not be nul terminated! Thanks
+ to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+
Tue Feb 6 20:11:28 2001 Krishnakumar B <kitty@cs.wustl.edu>
* include/makeinclude/platform_sunos5_sunc++.GNU:
@@ -98,6 +123,9 @@ Tue Feb 06 17:16:43 2001 Steve Huston <shuston@riverace.com>
Mon Feb 5 16:19:20 2001 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
+ * ace/ACE.cpp: ACE_TRACE ("ACE::basename") should be ACE_TRACE ("ACE::diname").
+ Thanks to Lu Yunhai <luyunhai@huawei.com> for reporting this.
+
* ace/Basic_Types.h: Changed the ACE_BIG_ENDIAN and ACE_LITTLE_ENDIAN
macros to use the form 0x0123 rather than 0123X. Thanks to
Craig Rodrigues <crodrigu@bbn.com> for helping find this
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 8d394f60dd7..2cf45e1c7c6 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -16,9 +16,10 @@ Wed Feb 7 14:31:48 2001 Jeff Parsons <parsons@cs.wustl.edu>
Wed Feb 7 12:57:35 2001 Frank Hunleth <fhunleth@cs.wustl.edu>
* tao/Acceptor_Registry.cpp:
- Fixed redundant call to strtok_r in open_i when a
- protocol is specified without an endpoint. This was
- causing core dumps on Linux platforms.
+ Fixed redundant call to strtok_r in open_i when a protocol is
+ specified without an endpoint. This was causing core dumps on
+ Linux platforms. Thanks to Christian Ewald
+ <christian.ewald@zuehlke.com> for reporting this.
Tue Feb 6 22:39:06 2001 Frank Hunleth <fhunleth@cs.wustl.edu>
diff --git a/THANKS b/THANKS
index 89d0e74dfc0..3414a05f7ed 100644
--- a/THANKS
+++ b/THANKS
@@ -1141,6 +1141,8 @@ Ben Strong <bstrong@bluelark.com>
David Karr <dkarr@bbn.com>
Sathish Tiptur <Sathish.Tiptur@geind.ge.com>
Frank Hunleth <fhunleth@cs.wustl.edu>
+Lu Yunhai <luyunhai@huawei.com>
+Christian Ewald <christian.ewald@zuehlke.com>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson in the early 1990's. Paul devised the recursive Makefile
diff --git a/ace/ACE.cpp b/ace/ACE.cpp
index efa44574b40..c18879c6f5a 100644
--- a/ace/ACE.cpp
+++ b/ace/ACE.cpp
@@ -488,7 +488,7 @@ ACE::basename (const ACE_TCHAR *pathname, ACE_TCHAR delim)
const ACE_TCHAR *
ACE::dirname (const ACE_TCHAR *pathname, ACE_TCHAR delim)
{
- ACE_TRACE ("ACE::basename");
+ ACE_TRACE ("ACE::dirname");
static ACE_TCHAR return_dirname[MAXPATHLEN + 1];
const ACE_TCHAR *temp = ACE_OS::strrchr (pathname, delim);
diff --git a/ace/Logging_Strategy.cpp b/ace/Logging_Strategy.cpp
index 1147c6a9496..43648f76ec5 100644
--- a/ace/Logging_Strategy.cpp
+++ b/ace/Logging_Strategy.cpp
@@ -243,11 +243,11 @@ ACE_Logging_Strategy::init (int argc, ACE_TCHAR *argv[])
// Create a new ofstream to direct output to the file.
if (wipeout_logfile_)
ACE_NEW_RETURN (output_file,
- ofstream (ACE_TEXT_ALWAYS_CHAR(this->filename_)),
+ ofstream (ACE_TEXT_ALWAYS_CHAR (this->filename_)),
-1);
else
ACE_NEW_RETURN (output_file,
- ofstream (ACE_TEXT_ALWAYS_CHAR(this->filename_),
+ ofstream (ACE_TEXT_ALWAYS_CHAR (this->filename_),
ios::app | ios::out),
-1);
#endif /* ACE_LACKS_IOSTREAM_TOTALLY */
diff --git a/ace/SUN_Proactor.cpp b/ace/SUN_Proactor.cpp
index 1610eb2dd46..319681a22f5 100644
--- a/ace/SUN_Proactor.cpp
+++ b/ace/SUN_Proactor.cpp
@@ -282,31 +282,71 @@ ACE_SUN_Proactor::start_aio (ACE_POSIX_Asynch_Result *result)
int
ACE_SUN_Proactor::cancel_aiocb (ACE_POSIX_Asynch_Result *result)
{
- ACE_UNUSED_ARG (result);
- // Force I/O completion.
- ACE::set_flags (result->aio_fildes, ACE_NONBLOCK);
+ ACE_TRACE ("ACE_POSIX_AIOCB_Proactor::cancel_aiocb");
+ int rc = ::aiocancel (& result->aio_resultp);
+
+ if (rc == 0) // AIO_CANCELED
+ return 0;
return 2;
- // AL
- // I tried to implement the following code but result was:
- // aiocancel returned -1 with errno=ACCESS_DENIED moreover, later
- // this operation had been never finished on aiowait . Is it Sun
- // error ??
- //
- // So with SUN_Proactor there is only one way to cancel AIO just
- // close the file handle.
- //
- // int rc = ::aiocancel (& result->aio_resultp);
- //
- // Check the return value and return 0/1/2 appropriately.
- // if (rc == 0) // AIO_CANCELED
- // return 0;
- //
- // ACE_ERROR_RETURN ((LM_ERROR,
- // "%N:%l:(%P | %t)::%p\n",
- // "cancel_aiocb:"
- // "Unexpected result from <aiocancel>"),
- // -1);
+}
+
+int
+ACE_SUN_Proactor::cancel_aio (ACE_HANDLE handle)
+{
+ ACE_TRACE ("ACE_POSIX_AIOCB_Proactor::cancel_aio");
+
+ ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, this->mutex_, -1));
+
+ int num_total = 0;
+ int num_cancelled = 0;
+ size_t ai = 0;
+
+ for (ai = 0; ai < aiocb_list_max_size_; ai++)
+ {
+ if (result_list_[ai] == 0) //skip empty slot
+ continue ;
+
+ if (result_list_[ai]->aio_fildes != handle) //skip not our slot
+ continue ;
+
+ num_total++ ;
+
+ ACE_POSIX_Asynch_Result *asynch_result = result_list_[ai];
+
+ int rc_cancel = 0 ; // let assume canceled
+
+ if (aiocb_list_ [ai] == 0) //deferred aio
+ num_deferred_aiocb_--;
+ else //cancel started aio
+ rc_cancel = this->cancel_aiocb (asynch_result);
+
+ if (rc_cancel == 0)
+ {
+ num_cancelled ++ ;
+
+ aiocb_list_[ai] = 0;
+ result_list_[ai] = 0;
+ aiocb_list_cur_size_--;
+
+ // after aiocancel Sun does not notify us
+ // so we should send notification
+ // to save POSIX behavoir.
+ // Also we should do this for deffered aio's
+
+ asynch_result->set_error (ECANCELED);
+ asynch_result->set_bytes_transferred (0);
+ this->post_completion (asynch_result);
+ }
+ }
+
+ if (num_total == 0)
+ return 1; // ALLDONE
+
+ if (num_cancelled == num_total)
+ return 0; // CANCELLED
+
+ return 2; // NOT CANCELLED
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/ace/SUN_Proactor.h b/ace/SUN_Proactor.h
index 6ed5734627c..9a5d2f8a534 100644
--- a/ace/SUN_Proactor.h
+++ b/ace/SUN_Proactor.h
@@ -103,7 +103,8 @@ protected:
/// From ACE_POSIX_AIOCB_Proactor.
/// Attempt to cancel running request
- virtual int cancel_aiocb ( ACE_POSIX_Asynch_Result * result );
+ virtual int cancel_aiocb (ACE_POSIX_Asynch_Result *result);
+ virtual int cancel_aio (ACE_HANDLE handle);
/// Specific Sun aiowait
int wait_for_start (ACE_Time_Value * abstime);
diff --git a/apps/Gateway/Gateway/Event_Channel.cpp b/apps/Gateway/Gateway/Event_Channel.cpp
index 3204b371ee7..7c236c862a9 100644
--- a/apps/Gateway/Gateway/Event_Channel.cpp
+++ b/apps/Gateway/Gateway/Event_Channel.cpp
@@ -320,33 +320,37 @@ Event_Channel::initiate_connector (void)
int
Event_Channel::initiate_acceptors (void)
{
- if (Options::instance ()->enabled (Options::CONSUMER_ACCEPTOR)
- && this->consumer_acceptor_.open
- (Options::instance ()->consumer_acceptor_port (),
- ACE_Reactor::instance (),
- Options::instance ()->blocking_semantics ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "cannot register acceptor"),
- -1);
- else
- ACE_DEBUG ((LM_DEBUG,
- "accepting Consumers at %d\n",
- Options::instance ()->consumer_acceptor_port ()));
-
- if (Options::instance ()->enabled (Options::SUPPLIER_ACCEPTOR)
- && this->supplier_acceptor_.open
- (Options::instance ()->supplier_acceptor_port (),
- ACE_Reactor::instance (),
- Options::instance ()->blocking_semantics ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "cannot register acceptor"),
- -1);
- else
- ACE_DEBUG ((LM_DEBUG,
- "accepting Suppliers at %d\n",
- Options::instance ()->supplier_acceptor_port ()));
+ if (Options::instance ()->enabled (Options::CONSUMER_ACCEPTOR))
+ {
+
+ if (this->consumer_acceptor_.open
+ (Options::instance ()->consumer_acceptor_port (),
+ ACE_Reactor::instance (),
+ Options::instance ()->blocking_semantics ()) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "cannot register acceptor"),
+ -1);
+ else
+ ACE_DEBUG ((LM_DEBUG,
+ "accepting Consumers at %d\n",
+ Options::instance ()->consumer_acceptor_port ()));
+ }
+ if (Options::instance ()->enabled (Options::SUPPLIER_ACCEPTOR))
+ {
+ if (this->supplier_acceptor_.open
+ (Options::instance ()->supplier_acceptor_port (),
+ ACE_Reactor::instance (),
+ Options::instance ()->blocking_semantics ()) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "cannot register acceptor"),
+ -1);
+ else
+ ACE_DEBUG ((LM_DEBUG,
+ "accepting Suppliers at %d\n",
+ Options::instance ()->supplier_acceptor_port ()));
+ }
return 0;
}
diff --git a/apps/Gateway/Peer/Peer.cpp b/apps/Gateway/Peer/Peer.cpp
index 717a1c62263..e6cb4f97956 100644
--- a/apps/Gateway/Peer/Peer.cpp
+++ b/apps/Gateway/Peer/Peer.cpp
@@ -565,7 +565,8 @@ Peer_Handler::await_events (void)
this->total_bytes_));
if (Options::instance ()->enabled (Options::VERBOSE))
ACE_DEBUG ((LM_DEBUG,
- "data_ = %s\n",
+ "data_ = %*s\n",
+ event->header_.len_ - 2,
event->data_));
mb->release ();
return 0;
diff --git a/include/makeinclude/platform_sunos5_g++.GNU b/include/makeinclude/platform_sunos5_g++.GNU
index 025b35083bf..fdb837f3e3b 100644
--- a/include/makeinclude/platform_sunos5_g++.GNU
+++ b/include/makeinclude/platform_sunos5_g++.GNU
@@ -24,6 +24,13 @@ ifeq ($(threads),0)
CFLAGS += -DACE_MT_SAFE=0
endif # threads
+ifeq (,$(exceptions))
+ exceptions = 0
+endif
+ifeq ($(exceptions),0)
+ CFLAGS += -fno-exceptions
+endif # exceptions
+
ifeq ($(shell /bin/uname -m),i86pc)
#### gcc on Solaris86 doesn't use -g
DCFLAGS += -gstabs+