diff options
-rw-r--r-- | ChangeLog-97a | 33 | ||||
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | ace/OS.i | 3 | ||||
-rw-r--r-- | ace/Timer_Heap.cpp | 88 | ||||
-rw-r--r-- | ace/config-sco-5.0.0-nothread.h | 37 | ||||
-rw-r--r-- | examples/Logger/simple-server/Logging_Acceptor.cpp | 2 | ||||
-rw-r--r-- | examples/Logger/simple-server/Logging_Handler.cpp | 3 | ||||
-rw-r--r-- | examples/Logger/simple-server/Logging_Handler.h | 2 | ||||
-rw-r--r-- | include/makeinclude/platform_sco5.0.0-nothread.GNU | 4 | ||||
-rw-r--r-- | netsvcs/lib/Client_Logging_Handler.cpp | 2 | ||||
-rw-r--r-- | netsvcs/lib/Server_Logging_Handler.cpp | 2 |
11 files changed, 114 insertions, 63 deletions
diff --git a/ChangeLog-97a b/ChangeLog-97a index 79d08e670b0..59c7a9f7c76 100644 --- a/ChangeLog-97a +++ b/ChangeLog-97a @@ -1,11 +1,25 @@ -Wed Apr 09 16:46:16 1997 David L. Levine <levine@cs.wustl.edu> +Wed Apr 9 20:25:36 1997 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> - * ace/OS.{h,i}: fixed readPPCTimeBase declaration and return - value (for now: it really needs to return a 64 bit quantity). - Thanks to Dave Mayerhoefer <mayerhoefer@svappl36.mdc.com> for - reporting these. + * ace/Timer_Heap.cpp (reheap_down): Fixed a *very* subtle bug in + reheap_down() where parent was starting off at 0 whereas it + should have been starting off at child_index / 2. -Tue Apr 8 00:04:22 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu> + * examples/Logger/simple-server/Logging_Handler: Removed the use + of the operator ACE_SOCK_Stream &() and replaced it with the + more intuitive peer() approach used in ACE_Svc_Handler et al. + Thanks to Ganesh Pai <gpai@voicetek.com> for reporting this. + + * ace: Added a bunch of changes to improve ACE support on SCO 5.0. + Thanks to Ganesh Pai <gpai@voicetek.com> for these fixes. + + * tests/Conn_Test.cpp: Completely reworked this test so that it + illustrates how to use the ACE_Strategy_Connector, which is + customized with a special Caching_Connect_Strategy that recycles + connections. + + * ace/Connector: Finished implementing the new + ACE_Strategy_Connector. This is similar in design to the + ACE_Strategy_Acceptor. * ace: Changed the signature of all the make_svc_handler() methods so that they return int (rather than SVC_HANDLER *) and they @@ -55,6 +69,13 @@ Tue Apr 8 00:04:22 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu> implementation for Win32. Thanks to Norbert Rapp <norbert.rapp@nexus-informatics.de> for reporting this. +Wed Apr 09 16:46:16 1997 David L. Levine <levine@cs.wustl.edu> + + * ace/OS.{h,i}: fixed readPPCTimeBase declaration and return + value (for now: it really needs to return a 64 bit quantity). + Thanks to Dave Mayerhoefer <mayerhoefer@svappl36.mdc.com> for + reporting these. + Wed Apr 9 03:12:24 1997 Irfan Pyarali <irfan@flamenco.cs.wustl.edu> * ace/config-win32-common.h: Defining _WIN32_WINNT as 0x0400 @@ -495,6 +495,7 @@ Carlos O'Ryan <coryan@mat.puc.cl> Eric Dean Russell <edrusse@somnet.sandia.gov> Daniel Montalibet <daniel_montalibet@stortek.com> Norbert Rapp <norbert.rapp@nexus-informatics.de> +Ganesh Pai <gpai@voicetek.com> I would particularly like to thank Paul Stephenson, who worked with me at Ericsson and is now at ObjectSpace. Paul devised the recursive @@ -865,7 +865,8 @@ ACE_OS::gettimeofday (void) tv.tv_usec = tb.tb_low / 1000L; #else -#if defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) || (defined (ACE_HAS_SVR4_GETTIMEOFDAY) && !defined (m88k)) +#if defined (ACE_HAS_TIMEZONE_GETTIMEOFDAY) || \ + (defined (ACE_HAS_SVR4_GETTIMEOFDAY) && !defined (m88k) && !defined (SCO)) int result; ACE_OSCALL (::gettimeofday (&tv, 0), int, -1, result); #elif defined (VXWORKS) || defined (CHORUS) diff --git a/ace/Timer_Heap.cpp b/ace/Timer_Heap.cpp index c8b46e963be..20ae5b7d483 100644 --- a/ace/Timer_Heap.cpp +++ b/ace/Timer_Heap.cpp @@ -218,48 +218,6 @@ ACE_Timer_Heap::remove (size_t index) } void -ACE_Timer_Heap::reheap_down (ACE_Timer_Node *moved_node, - size_t child_index) -{ - int parent = 0; - - // Restore the heap property after a deletion. - - for (size_t child = child_index; - child < this->cur_size_; - child += child + 1) // Multiple child by 2 and add 1. - { - // Choose the smaller of the two children. - if (child + 1 < this->cur_size_ - && this->heap_[child + 1]->timer_value_ < this->heap_[child]->timer_value_) - child++; - - // Perform a swap if the child has a larger timeout value than - // the front node. - if (this->heap_[child]->timer_value_ < moved_node->timer_value_) - { - // Insert the child node into its new location in the heap. - this->heap_[parent] = this->heap_[child]; - - // Update the corresponding slot in the parallel <timer_ids> - // array. - this->timer_ids_[this->heap_[child]->timer_id_] = parent; - - parent = child; - } - else - break; - } - - // Insert moved_node into its final resting place. - this->heap_[parent] = moved_node; - - // Update the corresponding slot in the parallel <timer_ids> - // array. - this->timer_ids_[moved_node->timer_id_] = parent; -} - -void ACE_Timer_Heap::insert (ACE_Timer_Node *new_node) { if (this->cur_size_ + 1 >= max_size_) @@ -338,16 +296,58 @@ ACE_Timer_Heap::grow_heap (void) } void +ACE_Timer_Heap::reheap_down (ACE_Timer_Node *moved_node, + size_t child_index) +{ + // The parent of the <child_index> is always half-way up the array. + int parent = child_index / 2; + + // Restore the heap property after a deletion. + + for (size_t child = child_index; + child < this->cur_size_; + child += child + 1) // Multiple child by 2 and add 1. + { + // Choose the smaller of the two children. + if (child + 1 < this->cur_size_ + && this->heap_[child + 1]->timer_value_ < this->heap_[child]->timer_value_) + child++; + + // Perform a swap if the child has a larger timeout value than + // the front node. + if (this->heap_[child]->timer_value_ < moved_node->timer_value_) + { + // Insert the child node into its new location in the heap. + this->heap_[parent] = this->heap_[child]; + + // Update the corresponding slot in the parallel <timer_ids> + // array. + this->timer_ids_[this->heap_[child]->timer_id_] = parent; + + parent = child; + } + else + break; + } + + // Insert moved_node into its final resting place. + this->heap_[parent] = moved_node; + + // Update the corresponding slot in the parallel <timer_ids> + // array. + this->timer_ids_[moved_node->timer_id_] = parent; +} + +void ACE_Timer_Heap::reheap_up (ACE_Timer_Node *new_node) { - int parent; int child = this->cur_size_; // Restore the heap property after an insertion. while (child > 0) { - parent = (child - 1) / 2; + int parent = (child - 1) / 2; // If the parent node is great than the new node we need to swap // them. diff --git a/ace/config-sco-5.0.0-nothread.h b/ace/config-sco-5.0.0-nothread.h index a8615c7381f..800189f5383 100644 --- a/ace/config-sco-5.0.0-nothread.h +++ b/ace/config-sco-5.0.0-nothread.h @@ -16,14 +16,29 @@ #define MAXPATHLEN 1023 #endif /* SCO */ +#if ! defined (__ACE_INLINE__) +#define __ACE_INLINE__ +#endif /* ! __ACE_INLINE__ */ + +// Need this for difference in msghdr struct +#ifndef msg_accrights +#undef msg_control +#define msg_accrights msg_control +#endif + +#ifndef msg_accrightslen +#undef msg_controllen +#define msg_accrightslen msg_controllen +#endif + #define ACE_TEMPLATES_REQUIRE_SOURCE #define ACE_TEMPLATES_REQUIRE_SPECIALIZATION #define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES #define ACE_LACKS_SYSCALL -#define ACE_LACKS_STRRECVFD -#define ACE_NEEDS_FTRUNCATE -#define ACE_LACKS_RLIMIT +//#define ACE_LACKS_STRRECVFD +//#define ACE_NEEDS_FTRUNCATE +//#define ACE_LACKS_RLIMIT #define ACE_LACKS_MADVISE // Compiler doesn't support static data member templates. @@ -33,7 +48,10 @@ #define ACE_HAS_SYSV_IPC // Platform supports recvmsg and sendmsg. -//#define ACE_HAS_MSG +#define ACE_HAS_MSG + +// Platform supports recvmsg and sendmsg. +#define ACE_HAS_MSG // Compiler/platform contains the <sys/syscall.h> file. //#define ACE_HAS_SYSCALL_H @@ -81,12 +99,21 @@ #define ACE_HAS_SELECT_H // Platform has prototypes for ACE_TLI. -//#define ACE_HAS_TLI_PROTOTYPES +#define ACE_HAS_TLI_PROTOTYPES +#define ACE_HAS_TLI +#define ACE_HAS_TIMOD_H +#define ACE_HAS_TIUSER_H +#define ACE_LACKS_T_ERRNO +//#define ACE_HAS_SVR4_TLI + // Platform has the XLI version of ACE_TLI. // #define ACE_HAS_XLI #define ACE_HAS_GNU_CSTRING_H +#define ACE_HAS_STRBUF_T +#define ACE_HAS_STREAMS + // Turns off the tracing feature. #if !defined (ACE_NTRACE) #define ACE_NTRACE 1 diff --git a/examples/Logger/simple-server/Logging_Acceptor.cpp b/examples/Logger/simple-server/Logging_Acceptor.cpp index 96ef694d4a3..714602fee40 100644 --- a/examples/Logger/simple-server/Logging_Acceptor.cpp +++ b/examples/Logger/simple-server/Logging_Acceptor.cpp @@ -56,7 +56,7 @@ Logging_Acceptor::handle_input (ACE_HANDLE) // Accept the connection from a client client daemon. - if (this->peer_acceptor_.accept (*svc_handler) == -1) + if (this->peer_acceptor_.accept (svc_handler->peer ()) == -1) ACE_ERROR_RETURN ((LM_ERROR, "%p", "accept failed"), -1); else if (svc_handler->open () == -1) svc_handler->close (); diff --git a/examples/Logger/simple-server/Logging_Handler.cpp b/examples/Logger/simple-server/Logging_Handler.cpp index 3a5381dea7a..323f11483e1 100644 --- a/examples/Logger/simple-server/Logging_Handler.cpp +++ b/examples/Logger/simple-server/Logging_Handler.cpp @@ -18,7 +18,8 @@ Logging_Handler::~Logging_Handler (void) // Extract the underlying ACE_SOCK_Stream (e.g., for purposes of // accept()). -Logging_Handler::operator ACE_SOCK_Stream &() +ACE_SOCK_Stream & +Logging_Handler::peer (void) { return this->cli_stream_; } diff --git a/examples/Logger/simple-server/Logging_Handler.h b/examples/Logger/simple-server/Logging_Handler.h index 2d15b5a6295..0daa974b519 100644 --- a/examples/Logger/simple-server/Logging_Handler.h +++ b/examples/Logger/simple-server/Logging_Handler.h @@ -39,7 +39,7 @@ public: virtual int open (void); virtual int close (void); - operator ACE_SOCK_Stream &(); + ACE_SOCK_Stream &peer (void); // Conversion operators. protected: diff --git a/include/makeinclude/platform_sco5.0.0-nothread.GNU b/include/makeinclude/platform_sco5.0.0-nothread.GNU index 6813e75fd6a..0c27cb2528e 100644 --- a/include/makeinclude/platform_sco5.0.0-nothread.GNU +++ b/include/makeinclude/platform_sco5.0.0-nothread.GNU @@ -7,8 +7,8 @@ CCFLAGS += -b elf -w -O2 -Xpg4plus -fno-implicit-templates \ -I/usr/progressive/lib/g++-include DLD = $(CXX) LD = $(CXX) -LIBS = -lsocket -PIC = -fpic -shared +LIBS = -lsocket -lnsl -ldl +PIC = -fpic AR = ar ARFLAGS = ruv RANLIB = /bin/true diff --git a/netsvcs/lib/Client_Logging_Handler.cpp b/netsvcs/lib/Client_Logging_Handler.cpp index dcee957ad18..81c01d89ecc 100644 --- a/netsvcs/lib/Client_Logging_Handler.cpp +++ b/netsvcs/lib/Client_Logging_Handler.cpp @@ -20,7 +20,7 @@ class ACE_Svc_Export ACE_Client_Logging_Handler : public ACE_Svc_Handler<ACE_SOC public: // = Initialization and termination. - ACE_Client_Logging_Handler (const char rendezvous[]); + ACE_Client_Logging_Handler (const char rendezvous[] = 0); // Default constructor. virtual int open (void * = 0); diff --git a/netsvcs/lib/Server_Logging_Handler.cpp b/netsvcs/lib/Server_Logging_Handler.cpp index ba9c3465495..32fbfb81249 100644 --- a/netsvcs/lib/Server_Logging_Handler.cpp +++ b/netsvcs/lib/Server_Logging_Handler.cpp @@ -448,12 +448,12 @@ template class ACE_Schedule_All_Reactive_Strategy<ACE_Server_Logging_Handler<LOG template class ACE_Schedule_All_Threaded_Strategy<ACE_Thr_Server_Logging_Handler>; template class ACE_Scheduling_Strategy<ACE_Server_Logging_Handler<ACE_TLI_STREAM, unsigned long, ACE_NULL_SYNCH> >; template class ACE_Scheduling_Strategy<ACE_Thr_Server_Logging_Handler>; -template class ACE_Server_Logging_Handler<ACE_TLI_STREAM, ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>, ACE_MT_SYNCH>; template class ACE_Server_Logging_Handler<ACE_TLI_STREAM, unsigned long, ACE_NULL_SYNCH>; template class ACE_Strategy_Acceptor<ACE_Server_Logging_Handler<LOGGING_PEER_STREAM, u_long, ACE_NULL_SYNCH>, LOGGING_PEER_ACCEPTOR>; template class ACE_Strategy_Acceptor<ACE_Thr_Server_Logging_Handler, LOGGING_PEER_ACCEPTOR>; template class ACE_Svc_Handler<ACE_TLI_STREAM, ACE_SYNCH>; #if defined (ACE_HAS_THREADS) template class ACE_Svc_Handler<ACE_TLI_STREAM, ACE_NULL_SYNCH>; +template class ACE_Server_Logging_Handler<ACE_TLI_STREAM, ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long>, ACE_MT_SYNCH>; #endif /* ACE_HAS_THREADS */ #endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ |