Tue Dec 31 18:27:50 1996 Douglas C. Schmidt * ace/Log_Msg.cpp (log): Added a test so that if we're (1) not printing to stderr and (2) aborting the program we still print a message to stderr. * ace/Message_Block: Added synchronization support to ACE_Message_Block. This is necessary now that we've got reference counting to ensure that we don't have race conditions when incrementing and decrementing the reference count in separate threads. The approach is very clean and uses the new ACE_Lock mechanism to conditionally acquire()/release() the locking strategy if concurrency control is necessary. * ace/Synch_T: Created a new set of ACE_Lock and ACE_Lock_Adapter<> classes which are similar in spirit to the ACE_Allocator and ACE_Allocator_Adapter<> classes. These make it possible to treat polymorphically synchronization mechanisms in ACE polymorphically, *without* creating an entire new parallel hierarchy of locking mechanisms. * ace/Synch: Added the full suite of acquire_{read|write}() and tryacquire_{read|write}() methods to ACE_Semaphore and ACE_Process_Semaphore so they will be consist with the other synchronization APIs. Tue Dec 31 00:11:56 1996 Douglas C. Schmidt * Changed all uses of ACE_Event_Handler::RWE_MASK to ACE_Event_Handler::ALL_EVENTS_MASK to reflect the fact that we will soon have more than READ, WRITE, and EXCEPT events. However, I've kept RWE_MASK around for backwards compatibility. * examples/ASX/Message_Queue: Changed the tests so that they use the new ACE_Message_Block::release() method rather than calling delete explicitly. * apps/Gateway: Revised the implementation of the Gateway and Peer applications to take advantage of the new ACE_Message_Block reference counting scheme. Tue Dec 31 15:06:51 1996 David L. Levine * ace/Task.cpp: added comments that try to explain interaction between ACE_Task_Base::svc_run () and ACE_Task_Exit instance * ace/Hi_Res_Timer.h: added comment to print_total () saying it should only be used for incremental timings; added defaults to a few print_ave/print_total args * ace/Hi_Res_Timer.{i,cpp}: inlined the constructor; trimmed output if count is 1; rounded instead of truncated usecs portion of time Mon Dec 30 15:24:59 1996 Douglas C. Schmidt * ace/Message_Block: Added reference counting to ACE_Message_Block so that we no longer have to clone() messages when we want to pass them around "by reference." * apps/Gateway/Peer/Peer.cpp (init): The Peer_Acceptor had gotten out of date wrt newer ACE features, so I updated it. Mon Dec 30 15:24:59 1996 Douglas C. Schmidt * ace/OS.h: Added a special case for ACE_UNUSED_ARG that works with G++. Thanks to David Levine for this. Mon Dec 30 16:05:11 1996 David L. Levine * ace/OS.cpp (ace_thread_adapter): Updated ACE_TRACE arg names (even though they're currently commented out). * ace/Task.cpp (svc_run): If TSS isn't supported, and on Linux, for now, create the ACE_Task_Exit exit_hook instance on the stack so that it's destructor will be called when svc_run () completes. Sun Dec 29 18:38:03 1996 Douglas C. Schmidt * apps/Gateway/Gateway/File_Parser.h: Removed the endofline() method declaration -- it doesn't seem to be defined anywhere. * ace/OS.h: Added an ACE_INT32 to complement the ACE_UINT32. * netsvcs/lib: Cleaned up all the ACE network services by removing their SIGINT signal handler. This was interferring with the main event loop's ability to shutdown... * apps/Gateway/Gateway: Once again changed the name of *IO_Handler* to *Proxy_Handler* since these things are really proxies, in the COS sense! * ace/Service_Record.cpp: Tidied up the implementation of ACE_Module_Type::fini() so that it doesn't try to call fini() on NULL pointers. Also, rather than explicitly deleting the reader and writer Tasks, we call ACE_Module<>::close(), which knows how to take care of all this stuff. * ace/Module.cpp: Added an extra parameter to close_i() so that we can correctly pass the value of "flags" from close() in order to prevent deleting tasks when we don't want to do this. * ace/Module.cpp: There was a bug in the open() method since we were potentially deleting reader_q and writer_q twice if memory allocation failed. Sat Dec 28 19:02:13 1996 Douglas C. Schmidt * ace/ACE.cpp: Changed the implementation of ldfind() so that it doesn't try to add the DLL prefix (e.g., "lib") unless it doesn't match filename. This is necessary to keep lots of existing svc.conf files from breaking. * ace/Event_Handler.h: Added a new ACCEPT_MASK for use with the new asynchronous accept() operation support for Win32. * ace: Added a new config file for WinNT 4.0 called config-winnt-4.0-msvc4.x.h. This file contains #defines for new features in WinNT 4.0 such as non-blocking acquire for CRITICALSECTIONs (TryEnterCriticalSection()), SignalObjectAndWait(), and CancelIO(). Oddly enough, these functions seem to be missing from the MSVC++ 4.2 #include files, so I added them to the config file. * ace: Changed the name of config-win32-msvc4.0.h to config-win32-msvc4.x.h since this config file works for MSVC++ 4.0, 4.1, and 4.2. * ace/Proactor: Added a new "cancel_io" method on the Proactor. This makes it possible to cancel all I/O that is outstanding on a thread. Thanks to Tim for help with this. Sat Dec 28 23:49:09 1996 Tim H. Harrison * ace/ReactorEx.h: Fixed some bugs with ACE_ReactorEx::dispatch. For instance, the index should only be incremented when handlers are dispatched. * ace/OS.i: Fixed some typos regarding the ACE_cond_t for NT. * examples/Reactor/Proactor/test_proactor.cpp: Dr. Schmidt and I hacked this to be way cool. In particular, we no longer have to know the size of the files to be transferred in advance. This scheme uses a clever protocol that shuts down the Peer Handler when (1) all input from the file has arrived, (2) all output to the remote peer handler has been sent, and (3) all input from the remote peer handler has been received. The Peer Handler now uses calls close_writer on the stream to notify the remote peer when its done writing. The Input File Handler sends an mb==0 to tell the Peer Handler when it's done reading from the file. The Peer Handle uses a state variable to OR in all the different conditions for exiting. It works. Fri Dec 27 23:39:19 1996 Douglas C. Schmidt * ace/Stream.cpp (pop): Modified the code so that we don't delete the Module we are popping unless the flags request this. * ace/Service_Record.cpp (fini): Always make sure to first fini() each Module, then remove() (and delete) them. * ace/Stream.cpp (remove): Updated the code so that we don't delete the Module unless the flags request this. Thu Dec 26 18:51:22 1996 David L. Levine * ace/config-linux-lxpthreads.h: Has James CE Johnson's latest adjustments to this config file. Tue Dec 24 10:55:20 1996 Douglas C. Schmidt * ace/OS.cpp (ace_thread_adapter): Changed the message that is printed if we exit the thread. Thanks to Luca for this suggestion. Tue Dec 24 15:38:43 1996 David L. Levine * ace/OS.i (cond_destroy): added call to event_destroy () for waiters_done_ on WTHREADS platforms * ace/Future.cpp: added specialization of template class ACE_Atomic_Op; so that libACE is self-contained with respect to template instantiations (with g++, for example) * ace/Malloc.cpp: added specialization of template class ACE_Atomic_Op; so that libACE is self-contained with respect to template instantiations (with g++, for example) * examples/Reactor/Misc/test_reactors.cpp, examples/Threads/future1.cpp, examples/Threads/future2.cpp, examples/Threads/manual_event.cpp, examples/Threads/task_two.cpp, performance-tests/Synch-Benchmarks/Benchmark.cpp, tests/Future_Test.cpp, tests/Reactors_Test.cpp: instantiate ACE_Atomic_Op with int instead of u_long so that it can use the specialization in libACE Tue Dec 24 12:49:21 1996 David L. Levine * ace/OS.h (struct siginfo_t): added declaration of siginfo_t (ACE_HANDLE *handles) to match definition in OS.cpp. Thanks to James Johnson for pointing this out. * ace/OS.cpp (thr_create): fixed position of #endif /* !ACE_LACKS_THREAD_STACK_SIZE */ directive, it needed to be before the closing '}' of the block. Thanks to James Johnson for pointing this out, also. * ace/OS.cpp: don't include ace/ARGV.h except on WIN32 because it's only needed there, and don't compile ACE_Thread_Adapter on VxWorks to save space * apps/Gateway/Peer/Gateway_Handler.h: changed #include "Event.h" to be #include "Peer_Message.h" so that Peer_Header::ROUTING_ID can be referenced in the class declaration. This subproject still doesn't build, though; I think that Event.h is needed. * ace/OS.h (struct ACE_cond_t): declare waiters_done_ as ACE_sema_t on VxWorks only, to avoid recursive struct definition with ACE_event_t * ace/OS.i (ACE_OS::cond_*): on VxWorks only, use sema operations on ACE_cond_t::waiters_done_ instead of event ops Tue Dec 24 10:55:20 1996 Douglas C. Schmidt * examples/Threads/task_three.cpp (main): Changed the use of new-style C++ casts for ACE_Sig_Action to old-style C casts so that more picky compilers like GCC won't complain. Thanks to Sandro Doro for reporting this. * examples/Threads/task_two.cpp: Fixed a typo where int should be used as the type for ACE_Atomic_Op rather than u_long. Thanks to David Levine for noticing this. * ace/OS.i: Generalized the implementation of ACE_OS::cond_wait() so that it will work with Win32 and VxWorks. Thanks to David Levine for pointing this out. * ace/Synch_T.cpp: Removed ACE_Process_Condition since it isn't really feasible to implement this as a template. At some point, it should be reimplemnted as a non-template that is only guaranteed to work on Solaris and some POSIX pthreads platforms. Sun Dec 22 21:23:57 1996 David L. Levine * ace/Acceptor.cpp: replaced two statements that looked like this: "ptr && ptr->foo ()" with "if (ptr) ptr-> foo()" to prevent compiler warnings about computed values that aren't used * netsvcs/clients/Tokens/manual/manual.cpp: added explicit "int" return type to declaration of handle_exception (ACE_HANDLE) so that compilers don't complain about no type * ASX/Event_Server/Event_Server/Options.cpp, ASX/UPIPE_Event_Server/Options.cpp: rearranged initializers in Options ctor to match declaration order Sun Dec 22 21:16:23 1996 Douglas C. Schmidt * ace/OS.cpp (thr_create): added a new ACE_HAS_PTHREADS_XAVIER to deal with the sparam.sched_priority features of the Linux pthreads implementation. Thanks to James Johnson for this. * ace/OS.i (thr_setprio): I forgot to define int policy = 0; * ace/SV_Semaphore_Simple.i: Removed the frigging LUSED macro and updated the ACE_SV_Semaphore_Simple::name_2_key() method to consider *all* the characters in the name. This will help avoid nasty bugs when different lock names have a common prefix. * ace/Local_Name_Space_T.cpp (ACE_Local_Name_Space): Added a call to "delete this->lock_" since we now allocate it dynamically. * apps/Gateway/Gateway/gatewayd.cpp: Changed call to ACE_SVC_INVOKE from ACE_Gateway to Gateway. * ace/OS.i: In function thr_sigsetmask changed the line: #if defined (ACE_HAS_IRIX62_THREADS) to #if defined (ACE_HAS_IRIX62_THREADS) || defined (ACE_HAS_PTHREADS_XAVIER) Thanks to James CE Johnson for this. * ace/config-linux-[lx]pthreads.h: Added a #define for the ACE_HAS_THREAD_SPECIFIC_STORAGE symbol. Thanks to James CE Johnson for this. * ace: created a new config file called config-linux-lxpthreads.h. This contains the ACE #defines necessary to use L. Xavier's threading package on Linux. Thanks to James CE Johnson for this. * build/gcc/ace/Synch: Moved the definition of the ACE_*Event classes *outside* of ACE_HAS_THREADS so that the Proactor will compile correctly even when there's no threading defined. * ace/config-linux-pthread.h: Added #define ACE_MT_SAFE, which seems to have been missing. Thanks to James Johnson for suggesting this. * tests/TSS_Test.cpp: Now that we've got Chris Lahey's fixes for AIX we can run this test on AIX. * ace/OS.cpp (thr_create): Added a #ifdef for pthread_attr_setstacksize() for Linux pthreads, which doesn't seem to support this. Thanks to James CE Johnson for this fix. * ace/OS.i: Added DCE pthreads fixes for OSF/1 3.2. Thanks to Harry Gunnarsson for these. Sat Dec 21 13:54:45 1996 Douglas C. Schmidt * ace/Synch_T: Integrated a solution that will allow MVS to use ACE_TSS. The problem is that the MVS C++ compiler requires an extern "C" destructor function for pthread_key_delete and the ACE_TSS stuff uses a paramatized C++ destructor function (ACE_TSS::cleanup). To solve this, a new class (ACE_TSS_Adapter) was created that encapsulates a thread specific object and it's associated C++ destructor. The ACE_TSS methods were then modified so that they provide access to the thread specific object through the ACE_TSS_Adapter. Also added a generic extern "C" cleanup routine that takes an ACE_TSS_Adapter as an argument. It then calls the adapters cleanup method passing it the saved address of the thread specific object. Thanks to Chuck Gehr for all of this. * ace/OS: Updated the code so that it will work with MFC and AfxBeginThread(). Thanks to Detlef for these changes. * ace/README: Added two new #defines for ACE_LACKS_COND_T and ACE_LACKS_RWLOCK_T to make it possible to define these in a fine-grained manner for various platforms. * ace/OS.h: Restructured the ACE_HAS_THREADS section so that we factor out the code for ACE_cond_t and ACE_rwlock_t so that it is only defined if we don't support these features natively. * ace/ReactorEx: Added a new "alertable" parameter to the handle_events() method. If alertable is true, then WaitForMultipleObjectsEx is used as the demultiplexing call, otherwise WaitForMultipleObjects is used. * ace/Signal.cpp: Had to move a few things around so that the code would compile for HP/UX. Thanks to Neil B. Cohen for reporting this. * ace/Acceptor.cpp: Updated the handle_close() method so that the Acceptor shuts down the listen socket and prevents handle leaks. Thanks to Irfan for reporting this. Thu Dec 19th 03:48:26 1996 Irfan Pyarali * ace/Local_Name_Space_T.cpp: Made sure that the mutexes are getting named properly (both the mutex owned by the Local_Name_space and the lock owned by the backing store). For the time being I named these two to be the extensions of the backing store file name. * ace/Local_Name_Space_T.cpp: Replaced the create_manager code such that we use the double check pattern. This is simpiler and easy to understand compared to the current code. * ace/Naming_Context.cpp: Gave the database name a default value. * ace/Malloc_T.cpp: The lock_name should never be 0. This will cause all instances of the same pool to get different mutexes. Sat Dec 21 09:43:35 1996 David L. Levine * ace/OS.{h,i}: fixes for VxWorks introduced in 4.1, and for inlining: moved #include of OS.i after #defines but before other ace #includes Thu Dec 19 15:58:09 1996 David L. Levine * ace/config-vxworks*.h, include/makeinclude/platform_vxworks*.GNU: enable inlining on VxWorks by default Wed Dec 18 16:44:47 1996 Tim H. Harrison * ace/Proactor.cpp (dispatch): Changed this method to take an int error parameter to set errno just before dispatching. This allows us to better propagate overlapped I/O errors to the handlers. Wed Dec 18 16:21:36 1996 David L. Levine * ace/OS.{h,i} and ace/INET_Addr.cpp: more VxWorks gethostbyname () tweaks Wed Dec 18 15:24:13 1996 Tim H. Harrison * ace/Proactor.cpp (ACE_Proactor): Initialize completion_port_ to 0. This is the only way that CreateIoCompletionPort works first time in. ACE_INVALID_HANDLE makes it break. * (ACE_Proactor): Added a call to CreateIoCompletionPort in the constructor so that GetQueuedCompletionStatus can be called before ACE_Proactor::initiate is called. This is necessary if an application is using the Proactor as a timer mechanism only. Tue Dec 18 7:58:07 1996 Tim H. Harrison * ace/Proactor.i (get_handle): Changed this to return ACE_INVALID_HANDLE on non Win32 platforms. Also changed shared_event_ from an ACE_Manual_Event to an ACE_Auto_Event. This allows us to remove the call to reset from handle_signal. * examples/Reactor/Proactor/test_timeout.cpp: Added a new example application to the Proactor example suite. Check the README for more details. * examples/Reactor/ReactorEx/test_timeout.cpp: Added a new example application to the ReactorEx example suite. Check the README for more details. * ace/Service_Config.cpp: Fixed a bug in run_reactorEx_event_loop (ACE_Time_Value &) so that it doesn't return on timeout. Tue Dec 18 7:06:32 1996 * ace/Proactor.cpp (handle_events): Once again removed the timer_skew_ code. Changed the ACE_HANDLE global_handle_ to ACE_Manual_Event shared_event_. Added a constructor that takes an ACE_Timer_Queue *. Changed the implementation to use an ACE_OS::sleep if only timers are registered. We need to figure out a better approach than the sleep. * ace/Service_Config.cpp (run_proactor_event_loop): Changed this to only return when an error occurs. If handle_events returns a 0, then a timeout occurred, and we can continue to dispatch events. We only return when all of the time has expired. * ace/Registry_Name_Space.h (ACE_Registry_Name_Space): Moved the include statements below the ACE_WIN32 and UNICODE directives. * ace/OS.h (siginfo_t): Added siginfo_t (ACE_HANDLE *handle) constructor prototype. Wed Dec 18 06:37:22 1996 Douglas C. Schmidt * ace/OS.i (cond_wait): Added the new algorithm for condition variable emulation on Win32. (and VxWorks). This should fix the nasty problems we had with earlier version (which weren't "fair"). Thanks to James Mansion, Karlheinz, Detlef, and Irfan for helping with this. * ace/Registry.h: Removed the "ACE_TURN_NOMINMAX_OFF" stuff in order to simplify the code. Thanks to Irfan for this. * ace/OS.i (sema_post): Added a new overloaded version of ACE_OS::sema_post(), which takes a "release count." This is the number of times to release the semaphore. Note that Win32 supports this natively, whereas on POSIX we need to loop... * ace/Proactor.cpp (handle_events): Changed the Proactor logic so that it will correctly propagate any errors that occur to the handle_{input,output}_complete callback. Tue Dec 17 20:56:56 1996 David L. Levine * ace/OS.{h,i}: on VxWorks: implemented ACE_OS::gethostbyname (), and fixed inet_ntoa () to return -1 on failure * ace/OS.cpp: in ::spa () for VxWorks, zero out unused argv[] slots to overwrite args from previous invocations OS.cpp Tue Dec 17 04:27:07 1996 Douglas C. Schmidt * ace/ReactorEx: Added a new feature to the ReactorEx. If we enable the wait_all flag when calling ACE_ReactorEx::handle_events() *and* we give an ACE_Event_Handler (this is a new final param to the call) then the handle_signal() call will be invoked on this "wait_all_callback" object when all the handles become signaled. Moreover, we pass in the array of signaled handled to through the siginfo_t parameter (see the following ChangeLog entry for details). If there is no wait_all_callback param, then all the handle_signal() methods are invoked on all the handles. * ace/OS.h (siginfo_t): Augmented the siginfo_t interface so that we can pass an array of signaled Win32 HANDLEs, in addition to just a single HANDLE. This is used in the ReactorEx. * examples/Reactor/ReactorEx/test_reactorEx.cpp: Added a number of enhancements to this test program based on discussions with Irfan, Karlheinz, Dieter, and Detlef. * ace/Task_T.i (msg_queue): If we override the existing definition of the Message_Queue in an ACE_Task then we need to delete the existing Message_queue (if necessary and mark the Message_Queue as no longer being a candidate for deletion (since we have supplied our own definition). Irfan had added this earlier, but it seemed to get lost... * examples/Reactor/Proactor/test_proactor.cpp: The class called STDIN_HANDLEr is misnamed since we don't read from stdin, we read from a file. Therefore, I've changed this to be Input_File_Handler. * examples/Reactor/ReactorEx/test_{proactor,reactorEx}.cpp: Changed misspellings of transfered to transferred. * ace/Memory_Pool.cpp (ACE_MMAP_Memory_Pool): Since NT doesn't support SIGSEGV thre's no point in even trying to register for this signal! * ace/OS.i: Reverted some lost UNICODE fixes -- thanks to Irfan for finding these. * ace/Local_Name_Space_T.cpp (create_manager_i): Removed a debug statement since it may be causing problems with printing UNICODE. Mon Dec 16 11:25:55 1996 Douglas C. Schmidt * ace/OS.i (cuserid): Fixed the definition to ACE_OS::cuserid() so that it uses LPTSTR. Thanks to Irfan for this fix. * ace/Task.cpp (activate): In ACE_Task::activate() there is a possibility to actually "reactivate" the task using the flag. The following illustrates that ability: if (this->thr_count_ > 0 && force_active == 0) return 1; // Already active. else this->thr_count_ = n_threads; The thing is that, when the task is running and we reactivate it (actually we add threads) the command should be: this->thr_count_ += n_threads; rather than this->thr_count_ = n_threads; That way thr_count_> holds the new number of threads currently associated with the task. Thanks to Hamual for this fix. * ace/OS.i (inet_aton): Placed the return 1 within the curly braces to make the HP/UX compiler happy. Thanks to Kenny Want for reporting this. Mon Dec 16 12:56:43 1996 David L. Levine * ace/OS.i: removed spurious "*/" after an #endif. Thanks to Harry Gunnarsson for reporting this. * ace/Svc_Conf_l.cpp: #ifdef'ed out ace_yyunput () and ace_yy_{push,pop,top}_state () because they're not used, and commented out a few "break"s after "return"s in switch statements to prevent compiler warnings. * ace/Typed_SV_Message.i: reordered initializations in ctor to match declaration order. * examples/Threads/Makefile, performance-tests/Misc/Makefile, tests/Makefile: Removed "LIBS += -lm" from these Makefiles because it doesn't appear to be necessary, and not all platforms have a libm. * include/makeinclude/platform_sunos4_g++.GNU, platform_sunos5_g++.GNU, platform_sunos5_x86_g++.GNU, platform_unixware_g++.GNU: added -lm to LIBS because it was removed from the Makefiles, and it's needed with g++. * netsvcs/lib/Makefile: removed /pkg/gnu/lib dependencies. Thanks to Per Andersson for pointing this out. * netsvcs/servers/svc.conf: changed _make_ACE_Logger() to _make_ACE_Logging_Strategy() svc.conf. Thanks to Per Andersson for reporting this. Sun Dec 15 13:01:17 1996 David L. Levine * ace/Naming_Context.cpp: reordered initializations in default ctor to match declaration order. * ace/Svc_Conf_y.cpp: added parens to a couple of combined assignments/conditionals to avoid compiler warnings. * include/makeinclude/platform_sunos5_sunc++*.GNU: reverted SOLINK step back to creating real .so files, because it seems to be necessary, sometimes, for template instantiation. * netsvcs/lib/Server_Logging_Handler.cpp: removed ACE_INLINE's. * tests/MM_Shared_Memory_Test.cpp: declare shm_key as char[] instead of char *, so that the string gets put into the data segment rather than the text segment. The string gets modified, which causes a core dump with the g++/SunOS5.5 build if the string is in the text segment. Sun Dec 15 10:29:20 1996 Douglas C. Schmidt * netsvcs/servers/svc.conf: Removed the "lib" prefix for the netsvcs DLL. This is now added automatically by the ACE::ldfind() operation. * ace/SString.cpp (ACE_CString): Removed the #pragmas for Win32. They aren't necessary since we should replace the ACE_USHORT16 cast with a char cast. Thanks to Amos Shapira for reporting this. Sat Dec 14 14:25:38 1996 Douglas C. Schmidt * build/SunOS5.5/tests/UPIPE_SAP_Test.cpp (main): Fixed several minor bugs with UPIPE_SAP_Test.cpp. * ace/OS.i (thr_join): Added implementations for Solaris threads and most versions of POSIX pthreads where ACE_hthread_t and ACE_thread_t are the same type! * ace/OS: Began adding hooks so that we can eventually move away from the current split between ACE_thread_t and ACE_hthread_t and unify them via ACE_Thread_ID. * ace/{OS,Thread}.h: Changed the interface of thr_getprio() so that it takes an int & rather than an int *. * ace/OS.i (thr_getprio): Fixed a minor bug for Win32 where we weren't depositing the thread priority into the return value! * Makefile: Changed the order in which things are built so that netsvcs are built right after libACE, followed by the tests. Sat Dec 14 11:54:22 1996 Douglas C. Schmidt * apps/Gateway/Gateway/Consumer_Map: Change the Consumer_Map class so that it was no longer templatized. There isn't any point in doing this since we aren't going to be changing these types for this application. * apps/Gateway/Gateway: Factored out the code for selecting the concurrency strategy into a separate *.h file called Concurrency_Strategy.h. * apps/Gateway/Gateway: Began revising the Gateway application to use the new ACE Event Channel. * ace/Svc_Handler: Now that we've got put() and svc() with no-op defaults in class ACE_Task_Base, we don't need them in ACE_Svc_Handler anymore, so I removed them! * ace/Task: Finally got sick of having to provide no-op open()/put()/close() routines in all ACE_Task subclasses, so I changed these methods from pure virtual to virtual with default no-op behavior. Updated all the tests, as well. Sat Dec 14 11:39:15 1996 David L. Levine * ace/{Module,Stream,Svc_Handler,Synch_T,Task_T}.cpp and Synch_T.i: removed ACE_INLINE qualifier from functions in .cpp files; in the case of Synch_T, moved ACE_INLINE functions from .cpp to .i file * apps/Gateway/Gateway/Routing_Table.cpp, examples/ASX/Event_Server/Event_Server/Peer_Router.cpp, examples/ASX/UPIPE_Event_Server/Peer_Router.cpp: removed ACE_INLINEs from .cpp files * ace/CORBA_Handler.h and ace/Token_Collection.{h,cpp}: changed __INLINE__ to __ACE_INLINE__ * ace/Svc_Conf_y.cpp: commented out unused arguments to suppress compiler complaints Fri Dec 13 22:07:11 1996 David L. Levine * include/makeinclude/platform_sunos5_sunc++*.GNU: replaced SOLINK step in build of shared objects for SunOS5 with SunC++ with symlink from .so to .o file. * ace/config-vxworks*.h: added ACE_NEEDS_SYSTIME_H to VxWorks configs because it's needed with inlining * include/makeinclude/platform_vxworks*.GNU: cleaned up VxWorks config files Fri Dec 13 00:53:34 1996 Douglas C. Schmidt * ace: Replaced all uses of #if defined (.....) // .... with #if defined (.....) /* ... */ so that broken C++ compilers won't complain. Thanks to John Cosby for reporting this. * ace/Thread.i: Updated the signature of getprio() and setprio() so that they take ACE_hthread_t. Thanks to Wayne Vucenic for finding this. * Reran all the tests on NT and Solaris. Everything seems to work. Therefore, incremented the version number to 4.1 and put it out for ftp and http. Thu Dec 12 18:51:04 1996 Douglas C. Schmidt * tests/Priority_Task_Test.cpp (svc): Added a new test to exercise the new "priority" feature of ACE_OS::thr_create() (which is also available to ACE_Task). * ace/Thread: Added getprio() and setprio() methods to ACE_Thread. Fri Dec 13 13:44:12 1996 David L. Levine * ace/config-vxworks*.h: added ACE_NEEDS_SYSTIME_H to VxWorks configs because it's needed with inlining * include/makeinclude/platform_vxworks*.GNU: cleaned up VxWorks config files Thu Dec 12 18:51:04 1996 Douglas C. Schmidt * ace: Added a new macro called ACE_UNUSED_ARG() to keep the compiler from outputting warnings about unused arguments. So far, this is mostly done for Win32, but it should be easy to do it for other compilers. Thanks to Matthias for these changes. * ace/OS.cpp: Added support so that thread priorities will automatically be set when we spawn threads using ACE_OS::thr_create(). * ace/OS.cpp: Simplified the logic for handling NULL thr_handles and thr_ids. Now, we set all this stuff in one place at the beginning of the function, rather than recomputing it all over the place. * ace/config-aix-{3.2.5,4.1.x}.h: Added the ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS flag. * ace/Thread_Manager.cpp (ACE_Thread_Control): Conditionally compiled the logic for calling this->exit() in the destructor for ACE_Thread_Control so that we only make this call if ACE_HAS_RECURSIVE_THR_EXIT_SEMANTICS is *not* set. This will prevent infinite recursion on platforms like AIX. Thanks to Chris Lahey for reporting this. * apps/Gateway/Gateway/Channel.cpp (recv_peer): Added the logic that makes sure we don't get screwed up by partial headers. Thanks to Chris Cleeland for this. Thu Dec 12 20:55:02 1996 David L. Levine * include/makeinclude/platform_sunos5_sunc++*.GNU: removed SOLINK step in build of shared objects for SunOS5 with SunC++: it's not necessary. Thu Dec 12 03:48:26 1996 Irfan Pyarali * ace/Naming_Context: Modified ACE_Naming such that on Win32, you can use ACE_Registry_Name_Space. * ace/Registry_Name_Space: ACE_Registry_Name_Space is a Name_Space which uses ACE_Registry as the persistence mechanism. Win32 clients of ACE_Naming can now start using (the more robust and reliable) Registry persistence without any major code changes. * tests/Naming_Test.cpp: Added the use of Registry_Name_Space to the test if we are on Win32 and UNICODE is turned on. * examples/Registry: Fixed UNICODE behavior of the tests Wed Dec 11 20:33:28 1996 Douglas C. Schmidt * ace/Synch_T.h: Added a warning that indicates why it isn't possible to use ACE_Process_Condition on Win32... * tests/TSS_Test.cpp: Moved the Errno class to a file TSS_Test_Errno.h and replaced the Errno class with the #include "TSS_Test_Errno.h" to work around "features" with AIX C++'s template instantiation scheme. * ace/OS.i (inet_aton): Replaced the use of ((ACE_UINT32) -1) with ((ACE_UINT32) ~0). I expect this is more portable... * tests/run_tests.bat: Added "Service_Config_Test" to the run_tests.bat file. Tue Dec 10 22:59:26 1996 Irfan Pyarali * tests: Added Service_Config_Test to Win32 makefiles. * ace/OS.i (inet_aton): We need to cast htonl to (long) * tests: Added/Fixed UNICODE behavior of the following: MM_Shared_Memory_Test.cpp Mem_Map_Test.cpp Mutex_Test.cpp Naming_Test.cpp Process_Mutex_Test.cpp SPIPE_Test.cpp Time_Service_Test.cpp Tokens_Test.cpp UPIPE_SAP_Test.cpp * netsvcs/lib: Added/Fixed UNICODE behavior of the following: ACE_TS_Clerk_Processor::poolname_ Tue Dec 10 00:33:08 1996 Douglas C. Schmidt * tests/Service_Config_Test.cpp (main): Added a new method called run_test() to ensure that ACE_Service_Config daemon is destroyed before we try to end the test. * ace/OS.i (inet_aton): We need to cast -1 to (ACE_UINT32). * tests/Process_Mutex_Test.cpp (main): Added a minor change to make gcc happy by moving the definition of int i *outside* the loop. Thanks to Thilo Kielmann for reporting this. * ace/OS.h: gcc complains about memcmp, memcpy, strcmp, and strcpy (from ACE_OS::) being used before defined inline. This is due to the include of SString.h at the end of OS.h. So I reordered things in accordance to the changes from Thilo Kielmann . * build/SunOS5.5/examples/Shared_Malloc/test_multiple_mallocs.cpp: Changed the definition of char *base_addr to void *base_addr. * ace/Memory_Pool.cpp (ACE_MMAP_Memory_Pool_Options): Changed the definition of char *base_addr to void *base_addr. * Put out what is hopefully the final beta release of 4.0.33. * ace/Message_Queue: Added the enqueue() method again to maintain backwards compatibility. Thanks to Karlheinz for pointing out the need for this. * ace/Service_Config.h: The svc.conf factory functions were begin defined as extern "C", but the function pointer defined in the ACE_Static_Svc_Descriptor struct is not declared as extern "C", therefore, there was a mismatch. Here's how to fix this: In Service_Config.h, before the struct ACE_Static_Svc_Descriptor add: extern "C" { typedef ACE_Service_Object *(*ACE_SERVICE_ALLOCATOR)(void); } Then in the struct alloc_ field was changed as follows: from: ACE_Service_Object *(*alloc_)(void); to: ACE_SERVICE_ALLOCATOR alloc_; Thanks to Chuck Gehr for this. * ace/Memory_Pool.cpp (commit_backing_store_name): Changed uses of "counter" from int to size_t to remove warnings. * ace/ACE.cpp: Reimplemented the ACE::daemonize() method to conform to the latest version in Richard Steven's new UNP book. * ace/INET_Addr.cpp (set): Replaced the use of ACE_OS::inet_addr() with ACE_OS::inet_aton(). Thanks to W. Richard Stevens for this idea ;-). * ace/OS: Added a new function called inet_aton(), which is based on a new POSIX socket addressing function that is non-ambiguous in its return value (unlike inet_addr). * tests: Added a new Service_Config_Test.cpp to make sure that the timeout features mentioned below work. * ace/Service_Config.cpp: Changed the implementation of run_{reactor,proactor,reactorEx}_event_loop so that it returns if the corresponding handle_events() method times out. Thanks to Phil Logan for reporting this. * ace/LSOCK_Stream: Moved get_remote_addr() from the private part of the class and implemented it using get_local_addr(). This fixes problems that previously occurred when using the ACE_Connector with ACE_LSOCK_Stream. Thanks to Stuart Powell for this suggestion. Mon Dec 9 22:03:30 1996 Douglas C. Schmidt * examples/Threads: Updated the test.mak and test.mdp files to reflect the new name changes. Thanks to Matthias for this. * ace/ACE.cpp (ldfind): Added new code that will work if the "base" part of the filename to look for is the same on both UNIX and NT. The library name will be made up of three parts [ACE_DLL_PREFIX]base part[ACE_DLL_SUFFIX], where prefix is "lib" on UNIX and nothing on NT and suffix is ".dll" on NT and ".so" on UNIX. If either prefix or suffix are missing from the filename you supply to ldfind they will be added automagically. This all will work independent from the pathname, which will be treated completely separately from the filename and can contain either UNIX style or NT style separators. Examples: Source NT UNIX =============================================================== netsvc netsvc.dll libnetsvc.so (PATH will be evaluated) (LD_LIBRARY_PATH evaluated) libnetsvc.dll libnetsvc.dll libnetsvc.dll + warning netsvc.so netsvc.so + warning libnetsvc.so ..\../libs/netsvc ..\..\libs\netsvc.dll ../../libs/libnetsvc.so (absolute path used) (absolute path used) The first and the last of these 4 examples is the way the new functionality is supposed to be used. You simple supply the pathname and the base part of the filename and ldfind will figure everything out. Thanks to Tilo Chris for this code. * ace/OS.h: Added a new macro called ACE_DLL_PREFIX, which is defined to "" on Win32 and "lib" on UNIX. Thanks to Tilo for this. * ace/Reactor.cpp (detach): After further thought, I have commented out the eh->reactor (0); call since I don't think we really need it. * ace/Reactor.cpp (detach): There was a problem with ACE_Reactor::detach(). The following lines: // Reinitialize the Reactor pointer to 0. eh->reactor (0); should be moved before: eh->handle_close (handle, mask); This will render the reactor handle not available in the handle_close method but at least handle_close can delete itself. Thanks to Luca for reporting this. * examples/Reactor/Ntalker: Replaced the use of ACE_OS::getopt() with the ACE_Get_Opt iterator. Thanks to Alexandre Karev for suggesting this. * ace/OS.h: Moved the #endif /* ACE_HAS_DCETHREADS || ACE_HAS_PTHREADS */ once again in order to make sure that the right things happen when #if defined (ACE_HAS_THREADS) is *false*. Thanks to Robert Lyng for reporting this. Mon Dec 9 02:06:48 1996 Irfan Pyarali * ace/SString: Made accessors return const references. * ace/OS.h: Added macro ACE_WIDE_STRING which allows the conversion of char* to wchar_t* when UNICODE is turned on. * ace: Added/Fixed UNICODE behavior of the following: /* Local_Name_Space */ ACE_Local_Name_Space_T::context_file_ /* ACE */ ACE::basename /* Token */ ACE_Token::ACE_Token /* Synch */ ACE_File_Lock::ACE_File_Lock /* SPIPE_Addr */ ACE_SPIPE_Addr::addr_to_string ACE_SPIPE_Addr::set /* FILE_Addr */ ACE_FILE_Addr::addr_to_string /* DEV_Addr */ ACE_DEV_Addr::addr_to_string /* Addr */ ACE_Addr::addr_to_string ACE_Addr::string_to_addr Note: These two were removed from the base class since they are not common to all Address classes. /* Malloc */ ACE_Allocator_Adapter::ACE_Allocator_Adapter ACE_Malloc::ACE_Malloc /* Process */ ACE_Process::start /* Shared_Memory_MM */ ACE_Shared_Memory_MM::ACE_Shared_Memory_MM ACE_Shared_Memory_MM::open /* Proactor */ ACE_Overlapped_File::ACE_Overlapped_File ACE_Overlapped_File::open /* Log_msg */ ACE_Log_Msg::open /* Naming_Context */ ACE_Name_Options::namespace_dir ACE_Name_Options::process_dir ACE_Name_Options::database /* Registry */ ACE_Predefined_Naming_Contexts::connect ACE_Predefined_Naming_Contexts::is_local_host /* SString */ ACE_CString::ACE_CString /* Mem_Map */ ACE_Mem_Map::ACE_Mem_Map ACE_Mem_Map::map /* Service_Config */ ACE_Service_Config::logger_key_ /* System_Time */ ACE_System_Time::ACE_System_Time /* Memory_Pool */ ACE_Sbrk_Memory_Pool::ACE_Sbrk_Memory_Pool ACE_Shared_Memory_Pool::ACE_Shared_Memory_Pool ACE_Local_Memory_Pool::ACE_Local_Memory_Pool ACE_MMAP_Memory_Pool::ACE_MMAP_Memory_Pool ACE_Lite_MMAP_Memory_Pool::ACE_Lite_MMAP_Memory_Pool /* OS */ ACE_OS::strstr ACE_OS::strdup ACE_OS::hostname ACE_OS::open ACE_OS::unlink ACE_OS::dlopen ACE_OS::dlsym ACE_OS::cuserid ACE_OS::fork_exec ACE_OS::sprintf ACE_OS::access ACE_OS::fopen ACE_OS::getenv ACE_OS::system ACE_OS::mkdir ACE_OS::mktemp Sun Dec 8 19:00:45 1996 Tim H. Harrison * ace/Reactor.cpp (handle_events): Updated this method to use the ACE_Countdown_Time::update method after the mutex has been acquired. * ace/Time_Value.cpp (update): Added an ACE_Countdown_Time::update method that calls stop and start. This is useful for methods such as ACE_Reactor::handle_events that need to update timeout values after acquiring locks, but before waiting on the demultiplexing mechanism (e.g. select). * ace/ReactorEx.cpp (handle_events): Modularized the implementation of handle_events. Now it uses helper functions to significantly simplify the implementation. Also updated the header file documentation. * ace/Timer_Queue: Added a timer_skew_ data member and accessor methods to ACE_Timer_Queue. Also added an expire method that calls gettimeofday and adds the timer_skew_ for you. These changes will help simplify Reactor, Proactor, and ReactorEx code. * ace/Reactor : Removed timer_skew_. This code now just calles timer_queue->expire () with no parameters. Very clean. * ace/ReactorEx : Removed timer_skew_ code. * ace/Proactor : Removed timer_skew_ code. * examples/Proactor/test_proactor.cpp: Fixed this application so that it exits when all the data has been sent and received. Previously, it used a cool timeout mechanism to "guess" when all the data had been received. Ahh, but we can't have too much fun, or people start to get nervous. * ace/Service_Config.cpp (run_reactorEx_event_loop (Time_Value)): Fixed the implementation of this method. It now handles reactorEx events until end_reactorEx_event_loop is called, or the specified time value expires. Also fixed the run_proactor_event_loop (Time_Value) method. * examples/ReactorEx/test_timeout.cpp: Added a new example application that shows how to use Service_Config::run_reactorEx_event_loop with timeouts. Check the examples/ReactorEx/README file for more details. * examples/Proactor/test_timeout.cpp: Added a new example application that shows how to use Service_Config::run_proactor_event_loop with timeouts. Yes, this screams for common dispatcher interfaces for Reactor, Proactor, and ReactorEx. Sun Dec 8 10:27:19 1996 Douglas C. Schmidt * ace/Service_Manager.cpp (init): Changed all uses of "int port" to "u_short port" to be consistent with socket types. * ace/ACE.cpp (bind_port): Changed all uses of "int port" to "u_short port" to be consistent with socket types. * ace/Remote_Name_Space.cpp: Changed all uses of "int port" to "u_short port" to be consistent with socket types. * ace/SV_Semaphore_{Simple,Complex}: Changed all uses of "int n" to "u_short n" to be consistent with the SYSV types! * ace/OS.h: Moved the location of the ACE_HAS_USING_KEYWORD macros until *after* we #include "ace/Time_Value.h". Thanks to Matthias for this. * ace/Signal.cpp: Finished implementing the ace_signal_handlers_dispatching logic, which wasn't done entirely earlier. Thanks to Alexandre Karev for reporting this. * netsvcs/servers/main.cpp (main): Fixed several small bugs in the netsvcs main test program. Thanks to Alexandre Karev for finding this. * ace/Reactor: Removed the timer_skew_ data member from the ACE_Reactor since this is now covered by the ACE_Timer_Queue. * ace/Reactor.cpp (handle_events): Added the new version of the ACE_Countdown_Time to simplify the code. * ace/Time_Value: Added a new class called ACE_Countdown_Time, which is used by the Reactor, ReactorEx, and Proactor to keep track of how much time elapsed. * ace/config-win32-msvc4.0.h: Added a change that forces the MSVC compiler to reference the proper Winsock - lib during linking of ACE. This change is necessary because a) in the release version the link to the winsock.lib was completly missing and b) only wsock32.lib has been included (which is wrong when WinSock2 is used). Thanks to Matthias for this. * ace/Module.cpp (ACE_Module): Added code to zero-out the q_pair_[2] pointers. Thanks to Matthias for this. * tests: Removed the argv name from most main() functions so that we don't get warnings... * examples/Threads: Fixed some errors in the threads examples directory, most of which are ambigious overloads. Also included a (MSVC 4.1) makefile for all tests in this directory. Thanks to Matthias for this. * examples/Threads: Renamed all the files by removing the word "test_" at the beginning. This is redundant! * tests/TSS_Test.cpp: If we are running AIX (i.e., if ACE_TEMPLATES_REQUIRE_PRAGMA), then conditionally avoid compiling this test program because it doesn't work unless we split off class Errno due to AIX's rules for generating templates. This is too much work to get right... * ace/OS.i (thr_self): Updated the conditional compilation tests so that we check for ACE_HAS_THREAD_SELF first. Thanks to Chris Lahey for this. * ace/{config-osf1-3.2.h,config-aix-4.1.x.h}: Updated this file so that is has the new ACE_HAS_THREAD_SELF macro, which indicates that the platform uses thread_self() rather than pthread_self(). * ace/config-aix-4.1.x.h: According to Chris Lahey , AIX 4.1.x should have ACE_HAS_PTHREADS rather than ACE_HAS_DCETHREADS. * ace/Thread_Manager: Removed the thread_descriptor_i() methods and replaced them by generalizing the find() method to become find_thread() and find_hthread(). Thanks to Hamutal Yanay for suggesting this. Sun Dec 8 14:39:53 1996 Tim H. Harrison * ace/Timer_Queue: Added a timer_skew_ data member and accessor methods to ACE_Timer_Queue. Also added an expire method that calls gettimeofday and adds the timer_skew_ for you. These changes will help simplify Reactor, Proactor, and ReactorEx code. Sat Dec 7 01:14:04 1996 Irfan Pyarali * tests/Process_Mutex_Test.cpp: Added new test which checks the functionality of a ACE_Process_Mutex. Abandoned mutexes can be created by selecting the correct command-line arguments. * examples/Reactor/ReactorEx/test_reactorEx.cpp: Reverted back to old scheme which does not utilize traits. * ace/Task_T.h: Removed the synchronization trait in Task. This is because template typedefs are only supported by a few platforms. Sigh ;-) Sat Dec 7 16:55:37 1996 Douglas C. Schmidt * ace/Thread_Manager.cpp: Because thread_descriptor_i() only returns 0 or -1 on failure the code for ACE_Thread_Manager::thr_self(ACE_hthread_t &) should read: if (-1 == this->thread_descriptor_i (id, td)) return -1; handle = &td.thr_handle_; Thanks to Matthias for reporting this. * ace/OS: Added a new static instance of ACE_thread_key_t to work around the pthreads implementation on MVS (which doesn't store TSS keys as ints!). Thanks to Chuck Gehr for reporting this. * ace/config-mvs.h: Added #define ACE_TEMPLATES_REQUIRE_SOURCE for MVS C++. Thanks to Chuck Gehr for reporting this. * ace/Signal.cpp: ace_dispatcher was being set to ace_signal_handlers_dispatch() which calls ACE_Sig_Handlers::dispatch (when ACE_HAS_SIC_C_FUNC is defined), whereas it was set to ACE_SigHanlder::dispatch (no s) if not defined. I intended to set this to ace_signal_handler_dispatch (no s). Thanks to Chuck Gehr for reporting this. * ace/Makefile: Fixed a small typo where I wasn't matching char *getenv in the sed regular expression. * ace/{OS,Synch}: Moved various classes around so that things will compile correctly when ACE_WIN32 is defined but ACE_HAS_THREADS is *not* defined. Thanks to Robert Lyng for reporting this. Sat Dec 7 16:55:37 1996 Matthias Kerkhoff * ace/Module: Added some values to the enum so Module clients can decide whether the reader, the writer or both should be automatically deleted. * ace/{Stream,Module,Task}: Changed some function arguments from u_long to int (because enums are represented as ints). * ace/Task: Added a new virtual function to ACE_Task_Base (module_closed), which by default calls ACE_Task_Base::close(1). Please note the changed flags argument. This allows clients to differ between calls originated from a Module and/or Stream from those which result from ~ACE_Task_Exit(). ~ACE_Task_Exit() calls ACE_Task_Base::close(0). This may be or not be a problem to existing applications. It may (hopefully not) be neccessary to change ACE_Task_Base::module_close back to calling ACE_Task_Base::close(0). Fri Dec 06 14:44:20 1996 David L. Levine * ace/OS.cpp: added ::spa () function to allow command line args to be passed to programs in VxWorks * ace/OS.i: (ACE_OS::gettimeofday): VxWorks returns nsec instead of usec, so convert Fri Dec 6 01:21:48 1996 Irfan Pyarali * examples/Reactor/ReactorEx/test_reactorEx.cpp: Rewrote the example such that the test now uses the new Notification Strategy scheme in ACE. This allows a message queue consumer to wait in ReactorEx without spawning a new thread, or creating extra Win32 events. This make the example smaller and much cleaner. * ace/Task_T.h: Added synchronization trait to Task. * ace/Task_T.i (msg_queue): Added a check to delete the old message_queue if we had created it. * ace/ReactorEx.cpp (remove_handler): Removed the call to set reactorEx of the event handler to zero becauses the event handler may no longer be there after the handle_close() completes. Thu Dec 05 21:18:49 1996 David L. Levine * ace/OS.cpp (thr_create): Oops, needed to add another check if thr_id == 0 before assigning *thr_handle = *thr_id, for systems such as Solaris 2.4 that don't have PTHREADS. Wed Dec 4 09:09:56 1996 David L. Levine * ace/Log_Msg.cpp (log): added printout to stderr before call to exit(). Silent calls to exit() are bad :-} * performance-tests/Synch-Benchmarks/Options.cpp (print_results): only use rusage if ACE_HAS_PRUSAGE_T is #defined * examples/IPC_SAP/SOCK_SAP/CPP-in{client,server}.cpp: use blocking connect on VxWorks * ace/config-vxworks*.h: added ACE_LACKS_MPROTECT and ACE_HAS_STRERROR * include/makeinclude/platform_vxworks*: removed INCLDIRS and added indlib.o to GreenHills LIBS * Makefile (cleanrelease and release): changed "rm -r" of ACE.tar.gz to "rm -f", that's probably what was meant Wed Dec 4 00:27:07 1996 Irfan Pyarali * ace/config-win32-msvc*.0.h: Added NOMINMAX. * ace/Registry: Removed NOMINMAX and VC_PLUS_PLUS_NESTED_CLASS_PROBLEM flags from the header file. The VC_PLUS_PLUS_NESTED_CLASS_PROBLEM flag is no longer needed and NOMINMAX is defined at the project level. Thanks to Matthias Kerkhoff for suggesting this. Mon Dec 2 14:13:44 1996 Douglas C. Schmidt * ace: Changed all occurrences of ACE_Event_Handler reactorex() to reactorEx() to be consistent. Thanks to Matthias for suggesting this. * ace/Message_Queue.cpp (close): We didn't allocate the memory for the notification_strategy_, so we darn well can't delete it! Thanks to Matthias for finding this. * ace/Log_Msg.cpp (ACE_TSS_cleanup): Made the ACE_TSS_cleanup function extern "C" for MVS C++ and compilers like it... Thanks to Chuck Gehr for reporting this. * tests/Naming_Test.cpp (main): Added delete ns_context to close things down and free up the semaphores. Thanks to David Levine for suggesting this. * examples/Reactor/Misc/test_demuxing.cpp (handle_input): Fixed a "typo" where we were accessing mb->msg_priority() *after* deleting it! Thanks to Matthias for finding this. Mon Dec 2 09:57:15 1996 David L. Levine * tests/run_tests.*: updated lists of tests to be run * tests/*.cpp: removed trailing .cpp from argument to ACE_START_TEST because it would appear in the log file name Mon Dec 2 00:08:51 1996 Douglas C. Schmidt * ace/Log_Record.cpp (dump): There was an error on line 19 of Log_Record.cpp: ACE_DEBUG ((LM_DEBUG, "\npid_ = %s\n", this->pid_)); should be changed to: ACE_DEBUG ((LM_DEBUG, "\npid_ = %d\n", this->pid_)); Thanks to Sandro Doro for reporting this. * examples/Reactor/Misc/test_handle_set.cpp: Updated the test to remove a warning caused by sloppy nesting of loop counters. Mon Dec 2 00:23:23 1996 Irfan Pyarali * ace/Strategies.{h,cpp}: Update the base-class and added documentation. * tests/test_config.h: Added ACE_INIT_LOG, ACE_APPEND_LOG and ACE_APPEND_LOG to facilitate the appending of log messages to a file. Also changed Pipe_Test to use this new mechanism. * test/Naming_Test: Changed test to use "lite" implementation to speed things up. * netsvcs/lib: Fixed multiple type mismatch warnings. * ace/ReactorEx: Fixed syntax errors in recently modified ReactorEx.* files * ace/ace.{mdp.mak}: Added Strategies.cpp to VC++ makefile. Sun Dec 1 19:19:02 1996 Douglas C. Schmidt * ace/Service_Config: Moved the #inclusion of ace/Proactor.h and ace/ReactorEx.h from the *.h file to the *.cpp file to avoid problems with circular dependencies. * ace/Reactor: Added a new parameter to the Reactor's initialization methods so that we can install a subclass of ACE_Timer_Queue. This is in anticipation of Tim's new "real-time" implementation of a timer queue. * ace/Reactor: Changed the internal Reactor name ACE_Notification_Handler to ACE_Reactor_Notify to be consistent with the ACE_ReactorEx_Notify class. * examples/Reactor/Misc/test_demuxing.cpp: Revised this test so that it now illustrates the new notification mechanism of the ACE_Message_Queue class. * examples/Reactor/Misc: Changed the name of the signal_tester.cpp file to test_demuxing.cpp, which is really what this does. * ace/{Strategies,Message_Queue}: Created a suite of "Notification Strategies" that are used with the new ACE_Message_Queue notification scheme. This works as follows: 1. There's a new virtual hook method on ACE_Message_Queue called notify(). Whenever a new Message_Block is enqueued the notify() hook is called. By default, this does nothing. 2. If you want to do something with the notify() hook, you have two choices: a. You can subclass from ACE_Message_Queue and override this method. This is an example of the "Template Method" pattern. b. You can configure an ACE_Notification_Strategy * into an ACE_Message_Queue. An ACE_Notification_Strategy is the vehicle for extending the behavior of ACE_Message_Queue wrt notification *without subclassing*. Thus, it's an example of the Bridge/Strategy patterns. 3. ACE_Notification_Strategy is defined in ace/Strategies.{h,cpp}. There are two pre-defined subclasses: a. ACE_Reactor_Notification_Strategy -- integrates the ACE_Message_Queue notification into the ACE_Reactor::notify() method. b. ACE_ReactorEx_Notification_Strategy -- integrates the ACE_Message_Queue notification into the ACE_ReactorEx::notify() method. Both of these can be used almost identically in order to seamlessly integrate multiple threads of control, inserting ACE_Message_Blocks in one or more ACE_Message_Queues, with the various ACE event demultiplexors (i.e., ACE_Reactor and ACE_ReactorEx). * ace: Created a new pair of files called Strategies_T.cpp and Strategies_T.h and move the template ACE_*Strategies classes into those files. This was necessary since there are now new non-template notification strategies in Strategies.{h,cpp}. * ace/Message_Queue: Created a new "notification hook" mechanism that makes it possible for event demuxers (like ACE_Reactor and ACE_ReactorEx) to be informed automatically when a Message_Block is inserted into the Message_Queue. This is useful for sitations where you'd like to integrate multiple threads (each of which is pumping data into an ACE_Message_Queue) with an ACE_Reactor or an ACE_ReactorEx. Thanks to Matthias Kerkhoff and Luca for suggesting this. * ace/Synch.h: Modified the implementation of ACE_Null_Condition_Mutex::wait() so that it always returns -1 and sets errno to ETIME. This reflects the fact that if you'll never be awakened if you "sleep" on a Null_Condition... * ace/ReactorEx: Generalized the ACE_ReactorEx so that its notify() method now behaves like the ACE_Reactor, i.e., it can queue up ACE_Event_Handlers that are dispatched in the ReactorEx thread of control. * tests: Renamed the Shared_Memory_MM_Test.cpp to MM_Shared_Memory_Test.cpp and remove the Shared_Memory_SV_Test.cpp since it was redundant to the SV_Shared_Memory_Test.cpp. * tests/SV_Shared_Memory_Test.cpp (main): Revised the SVSV IPC shared memory test to be more robust. * ace/SV_Semaphore_Simple.cpp (open): If the char *name == 0 then use ACE_DEFAULT_SEM_KEY instead. * ace/Memory_Pool: Generalized the ACE_Shared_Memory_Pool so that there can be more than 1 shared memory pool active at a time (similar to what we did for ACE_MMAP_Memory_Pool). * ace/Memory_Pool.h: There was an unnecessary ACE_SV_Semaphore_Complex in ACE_Shared_Memory_Pool that was left over from earlier days. I've removed this. * ace/Memory_Pool.cpp (ACE_Shared_Memory_Pool): Revised the constructor so that if we get a NULL pool_name we'll initialize the * examples/Makefile: Added the System_V_IPC and Shared_Memory directories. * ace/Message_Queue.h: Added a virtual destructor to ACE_Message_Queue so that it can be destroyed appropriately, even if subclassed. * ace/Message_Queue.h: Renamed enqueue() to enqueue_prio() to be consistent with the other names (e.g., enqueue_head() and enqueue_tail(). Updated the test programs to reflect this. Sun Dec 1 12:06:46 1996 David L. Levine * ace/config-vxworks*.h: Removed #define ACE_HAS_STRBUF_T: copy and paste error Sun Dec 1 00:15:45 1996 Irfan Pyarali * ace/OS.h: ACE_NEW_RETURN and ACE_NEW were reverted back to the old implementation. This is temporary till the infinite loop problem with ACE_ERROR, ACE_DEBUG and ACE_TRACE being called from ACE_Log_Msg::instance() is fixed. * ace/Synch.h: Repositioned ACE_Semaphore such that there are no problems in compiling ACE_Process_Semaphore under Win32. * ace/config-win32-msvc4.0.h: Changed ACE_HAS_STL to ACE_HAS_STANDARD_CPP_LIBRARY which is more descriptive (and what is expected by stdcpp.h). * ace/Registry.h: Added the setting of NOMINMAX and VC_PLUS_PLUS_NESTED_CLASS_PROBLEM flags so that STL behaves properly. * ace/Log_Msg.cpp (open): Fixed a small bug such that msg_ostream is only set this to cerr if it hasn't already been set. * STL: Updated the STL directory will latest code from http://www.rahul.net/terris/ and also added the original readme2.stl file. Created ACE_Changes which has the list of changes made to the STL distribution. Sat Nov 30 12:02:00 1996 Douglas C. Schmidt * ace/OS.h: Added a new pragma that disables warning #4097 in MSVC++ (typedef-name used as synonym for class-name). This keeps Win32 clients from getting warning on Win32. Thanks to Matthias Kerkhoff for this. * ace/Log_Msg.cpp: Created a new macro called ACE_NEW_RETURN_I, which is used withing ACE_Log_Msg::instance(). We can't afford to call ACE_LOG_MSG->instance() from within ACE_Log_Msg::instance() or else we will recurse infinitely! Thanks to Irfan for finding this. * ace/OS.i (mprotect): Added a #if !defined (ACE_LACKS_MPROTECT) conditional compilation directive to support the EPLX real time OS from CDC (based on LYNX). Thanks to Alexandre Karev for reporting this. Sat Nov 20 12:23:45 1996 Prashant Jain * tests/Naming_Test.cpp (main): Added code that creates a unique backing store name and removes the backing store every time the test is run. Fri Nov 29 12:54:12 1996 Douglas C. Schmidt * ace/Stream.cpp (open): Changed tail->close() and head->close() to delete tail and delete head now that we've got our new changes. * ace/Module: Moved the destructor from the private part of the class to the public part and changed things so that close() no longer "deletes this." This is too confusing and error-prone. In addition, changed the Module destructor so that it will try to call close() only if close hasn't already been called. * ace/Synch.h: Moved ACE_Process_Semaphore out of the ACE_HAS_THREADS section since this is available on platforms that don't have threads. * Now that Log_Msg.h is being #included in OS.h, I removed all other #includes of Log_Msg.h throughout the rest of ACE. * ace/OS.h: Rearranged the definition of the ACE_NEW and ACE_NEW_RETURN macros so that they come at the end of OS.h. This enables us to #include "ace/Log_Msg.h" here, as well, so that we can make use of the ACE_LOG_MSG macro in the definition of ACE_NEW and ACE_NEW_RETURN. * ace/Singleton.cpp (instance): Updated the ACE_Singleton implementation to use the new ACE_NEW and ACE_NEW_RETURN macros. * ace/OS.h: Revised the ACE_NEW and ACE_NEW_RETURN macros so that they check to see if the constructor of the newly allocated object failed (i.e., by checking the ACE_LOG_MSG->op_status() value). * tests/Reactors_Test.cpp: Added an ACE_ASSERT() after each Reactor we create in order to make sure it worked. * tests/Reactors_Test.cpp: Added an ACE_Service_Config daemon instance within main() in order to ensure that the Reactor is cleaned up appropriately. This avoids problems with NT 4.0, where there seems to be a bug if you don't shut down sockets explicitly when the process exits. * tests/Pipe_Test.cpp (main): Improved the pipe test so that it automatically iterates multiple times in order to test whether there are problems with rapidly opening and closing NT socket handles... Thu Nov 28 03:07:48 1996 Irfan Pyarali * netsvcs: netsvcs.mak and netsvcs.mdp were changed such that it becomes easier to find ace.lib while compiling netsvcs.lib. * tests/Pipe_Test.cpp: Add more instances of ACE_Pipes to the test and also added an option to close down the pipe. Thu Nov 28 00:53:16 1996 Douglas C. Schmidt * ace/config-sunos4-g++.h: This config file contained two exclusive definitions #define ACE_HAS_SVR4_SIGNAL_T and #define ACE_HAS_SUNOS4_SIGNAL_T The first one was moved out. Thanks to Alexandre Karev for reporting this. * ace/OS.h: #elif defined (ACE_HAS_SUNOS4_SIGNAL_T) was changed from typedef void (*ACE_SignalHandler)(void); typedef void (*ACE_SignalHandlerV)(void); to typedef void (*ACE_SignalHandler)(...); typedef void (*ACE_SignalHandlerV)(...); to make gcc happy. The first one was moved out. Thanks to Alexandre Karev for reporting this. * ace/Pipe.cpp (close): Arrgh! Fixed a total braino where we weren't using ACE_OS::closesocket() to close down the Win32 ACE_Pipe implementation, which uses sockets... Thanks to Irfan and Tilo for helping me figure this one out! * tests/CPP_Test.cpp: Completely reworked this test so that it should run correctly on Win32 and UNIX. Wed Nov 27 16:50:17 1996 Douglas C. Schmidt * Put out a new beta of ACE 4.0.33. * tests/Mutex_Test.cpp (test): Fixed the test() function so that it doesn't use the ACE_Thread_Control unless we explicitly want to use threads. * tests/test_config.h: Added addition information about the process id and thread id of the main thread. * ace/Synch.h: Speed things up a bit by conditionally #including "ace/SV_Semaphore_Complex.h" only if we are compiling on a non-Win32 platform or a POSIX platform. Thanks to Matthias Kerkhoff for this. * ace/SV_Semaphore_Complex.h: Incorporated the new ACE_USING macro, which is useful if you have class b { a() }; class d : private b { b::a() // still works, but depriciated using b::a() // should be used instead }; Thanks to Matthias Kerkhoff for this. * ace/OS.h: Added a new macro called ACE_USING, which is used to distinguish between platforms that support namespace "using" semantics and those that don't. Thanks to Matthias Kerkhoff for this. * examples/Misc/test_XtReactor[12].cpp: Had to add the infamous #define String XtString before including Xm/PushB.h. Also, there were some references to XtReactor when the class is now ACE_XtReactor. Thanks to Gonzalo Diethelm for reporting this. * ace/XtReactor.cpp (ACE_XtReactor): timeout_ was not being initialized on the constructor, and that caused a core dump. Thanks to Gonzalo Diethelm for reporting this. * ace/SOCK.h: Put the open() call in the protected part of the class since we generally don't want clients to call this directly. Thanks to Eric Newton for pointing this out. * ace/ACE.cpp: Fixed a bug where sin.sin_family was being set rather than sin.sin_len. Thanks to Chuck Gehr for reporting this. * ace/ACE.cpp: Enhanced the ACE::{send_n,recv_n} methods so that they check to see if errno == EWOULDBLOCK when ACE_OS::send() or ACE_OS::recv() returns -1. If that's the case, then they keep iterating. Thanks to Mehdi TABATABAI for this suggestion. * ace/Log_Msg.h: Fixed ACE_RETURN so that it only has 1 parameter if ACE_NLOGGING is enabled. Thanks to Antonio Tortorici for reporting this. * ace/config-vxworks*.h: Added ACE_NTRACE macros so that tracing doesn't magically turn on! * ace/Task.cpp (activate): the &ACE_Task_Base::svc_run() argument needs a cast to ACE_THR_FUNC, because that's what ACE_Thread_Manager::spawn_n() requires. On VxWorks, ACE_THR_FUNC functions return an int, while svc_run() returns void *. Thanks to David Levine for this. * ace/Thread_Manager.cpp (kill_thr): I was mistakenly passing in the thr_handle_ where I should have been passing in the thr_id_. In addition, made sure we don't set errno to the wrong value... Thanks to Ross Dargahi for reporting this. * ace/{Synch_T,Synch}.h: If we don't actually own the lock anymore, don't try to do a release. Thanks to Jonathan Biggar for reporting this bug. * ace/ACE.cpp (handle_timed_complete): Added an ex_handles mask so that non-blocking connects will work correctly on Win32. Thanks to Antonio Tortorici for reporting this fix. * ace/Message_Queue.h: Updated the documentation to stress the fact that the timeouts are specified in *absolute* time, rather than in relative time. Thanks to Bob Dunmire for reporting this. * tests/test_config.h: Modified the ACE_END_TEST macro so that the log file is closed. This works around a problem on VxWorks where destructors of static objects don't get closed automatically. Thanks to David Levine for this fix. * ace/OS.i (rand_r): Added a fix for Digital UNIX so that rand_r works correctly in MT settings. Thanks to Thilo Kielmann for this. Wed Nov 27 16:12:00 1996 Tim H. Harrison * ace/Stream.cpp: Fixed a bug in ACE_Stream::open to allow applications to specify a tail or a head without having to specify both. This was needed by the ACE_Pipeline application since it only needs a Pipeline-specific tail (not a head). Tue Nov 26 18:00:25 1996 Douglas C. Schmidt * ace: Functions should not be declared with ACE_INLINE in a .cpp file. Fixed this problem in the following files: SPIPE_Acceptor.cpp:116:ACE_INLINE TLI_Acceptor.cpp:145:ACE_INLINE int TLI_Acceptor.cpp:192:ACE_INLINE Task.cpp:121:ACE_INLINE int Task.cpp:130:ACE_INLINE void * ace/{OS,Thread}: Added Chuck Gehr's suggested change for the pthread_keycreate() routine, which must take extern "C" functions on MVC C++. This fix isn't perfect, but it should allow the ACE library to build... * man: Updated all of the manual pages and HTML files. * ace/Signal.cpp: Updated the code so that we don't try to register a static C++ dispatch method if ACE_HAS_SIG_C_FUNC is defined. This fixes problems with the MVS C++ compiler... Thanks to Chuck Gehr for this suggestion. * ace/OS.h: Added extern "C" { } wrappers around the signal handling mechanisms if ACE_HAS_SIG_C_FUNC is defined. This fixes problems with the MVS C++ compiler... Thanks to Chuck Gehr for this suggestion. * ace/Reactor.cpp (open): Moved the initialization of the ACE_Timer_Queue field to *before* the handler_rep_.open() call. We do this first in case the handler_rep_ call fails (which it sometimes does on Win32 when we restart applications quickly due to the use of sockets as a notification mechanism). At least this way the timer_queue_ isn't 0, so we can still use the Reactor as a timer... Thanks to Tilo Christ for motivating me to fix this. * ace/OS.i: Apparently, DIGITAL_UNIX gethostbyname() returns thread-specific storage, so we can use this for gethostbyname_r(). * ace/OS.i: Need to add: #else after line 3268: return (size_t) ACE_OS::sysconf (_SC_THREAD_STACK_MIN); otherwise we get a compile error: line 3296.1: CBC1331(W) Return value of type "unsigned int" is expected This is because no code ends up getting generated. Thanks to Chuck Gehr for this fix. * ace/OS.i (ACE_PTHREAD_CLEANUP_PUSH): Removed an extraneous set of parens. Thanks to Chuck Gehr for this fix. * ace/OS.cpp (thr_create): Oops, needed to add a check if thr_id == 0 before assigning *thr_handle = *thr_id! Thanks to Prashant for finding this. Tue Nov 26 21:06:13 1996 Irfan Pyarali * ace/Pipe.cpp (open): This change relates to Win32 code only. Removed the reuse_addr flag to acceptor.open() so that we don't try to reuse the acceptor socket immediately. Apparently, this causes no end of trouble on Win32 as the following connect() call fails (randomly). Now it should be possible to create multiple ACE_Pipes in one process and hence create multiple Reactors also without any problems. * tests/Pipe_Test.cpp: Added a ACE_Pipe test to check for the creation of multiple pipes in a process. Also changed the relevant makefiles and scripts. Tue Nov 26 11:27:33 1996 David L. Levine * tests/{CPP_Test,Mutex_Test,Shared_Memory_MM_Test,SPIPE_Test}.cpp: added VXWORKS support for these tests by spawning a new thread instead of forking a new process (the same as on Win32) * netsvcs/clients/Naming/Client/Client_Test.cpp (open): Added a return 0 for success. * ace/Singleton.h: Modified the use of the ACE_NEW_RETURN macro so we not only check if new has failed, but also check that the constructor has succeeded. If it hasn't, we bail out... Thanks to Luca for this suggestion. * ace/Log_Msg: Added a 4th parameter to log_hexdump() in order to print out a comment. Thanks to Luca for this. * ace/ACE.cpp (ldfind): Changed the implementation to look for ACE_DLL_SUFFIX rather than '.' since '.' might exist in the pathname already... * Removed all the NT-specific svc.conf files and updated the other files to use the new "auto-dll-suffix" feature in ACE. * ace/Synch_T.cpp (ts_get): Fixed a nasty bug introduced by recent changes to ACE_TSS<>::ts_get(). The ACE_Mutex should be ACE_Thread_Mutex. This should fix lots of nasty run-time bugs seen with recent versions of the ACE 0.33 beta... Tue Nov 26 14:40:00 1996 David L. Levine * Log_Msg.cpp: fake out TSS on VxWorks in Log_Msg::instance() by using a spare field in the task control block * tests/{CPP_Test,Mutex_Test,Shared_Memory_MM_Test,SPIPE_Test}.cpp: added VXWORKS support for these tests by spawning a new thread instead of forking a new process (the same as on Win32) * OS.h: VxWorks can't handle the ACE_THR_FUNC typedef if it's in the extern "C" block, so I moved it back out. Also, the horrible GreenHills hack is no longer required. * OS.i: there's an ACE_OS_CALL_RETURN before a ::strncpy() call, I changed it to ACE_OS_CALL. * OS.i: Added call to VxWorks ::mkdir() * Pipe.cpp: VxWorks doesn't know about TCP_NODELAY. * INET_Addr.cpp: get_host_name() is missing a return statement, on VxWorks only * Thread_Manager.i: in ACE_Thread_Control::thr_mgr(), there were two consecutive return statements, removed the first one. * Time_Request_Reply.{h,cpp}: GreenHills warns that "type qualifiers are meaningless" for declaration of const ACE_UINT32 time(), so I removed them. * UPIPE_Stream.cpp, line 95: warning: integer conversion resulted in a change of sign, so we cast n to int. * Map_Manager.cpp: in ACE_Map_Manager::resize_i(), variable foo is unnecessary, so we omitted it. * tests/CPP_Test.cpp (and a few others) have references to argv[0]: Tue Nov 26 03:15:22 1996 Irfan Pyarali * tests: Added Map_Manager_Test and Message_Queue_Test to makefiles (NT and UNIX) and one-button scripts. * tests: (Barrier_Test.cpp Buffer_Stream_Test.cpp Mutex_Test.cpp Priority_Buffer_Test.cpp Recursive_Mutex_Test.cpp Shared_Memory_MM_Test.cpp) Fixed typos mainly and other small changes. Also fixed logging file problems so to make logging of tests more accurate. Mon Nov 25 00:23:40 1996 Douglas C. Schmidt * performance-tests/Synch-Benchmarks/Options.cpp (Options): Reordered the initialization of data members to keep G++ from complaining. * performance-tests/Synch-Benchmarks/pipe_thr_test.cpp: Changed some types so that we don't get warnings. * tests/Mutex_Test.cpp (test): Added a "return 0". Thanks to David Levine for reporting this. * ace/TTY_IO.cpp: Rearranged some definitions so that we don't get "unused variable" warnings from g++. * ace/SOCK_Dgram.cpp (recv): Rearranged some definitions so that we don't get "unused variable" warnings from g++. * tests/Priority_Buffer_Test.cpp (consumer): Fixed a typo -- I was missing a *... Thanks to David Levine for reporting this. * ace/OS.h (ACE_SVC_FACTORY_DECLARE): Changed the macro so that it defines a function with `extern "C"' linkage in order to be consistent. * ace/OS.cpp (thr_create): Moved the conditional compilation test for ACE_HAS_THR_C_FUNC outside of ACE_HAS_SETKIND_NP since MVS doesn't have this! Thanks to Chuck Gehr for this info. * ace/OS.i (thr_sigsetmask): Replaced the tests for ACE_HAS_DCETHREADS and ACE_HAS_SETKIND_NP with ACE_LACKS_PTHREAD_THR_SIGSETMASK, which is more appropriate. * ace/OS.cpp (ace_mutex_lock_cleanup_adapter): Changed the signature so that it returns "void" rather than "void *". Thanks to Chuck Gehr for this. * ace/OS.h: Removed #include to avoid problems on MVS. Thanks to Chuck Gehr for this. * ace/config-sunos5.5-sunc++-4.1.h: It looks like SunC++ 4.1 still doesn't fix their template typedefs bugs. So I've commented this out in the config file. Thanks to Fred LaBar for reporting this. * ace/ACE.cpp (ldfind): Added support for a new feature that will append the default suffix (e.g., ".dll" or ".so") for a shared library on the current platform to the name of the file if it cannot find an suffix. It will also check that a provided suffix will match the default suffix for that platform and if it doesn't it will produce a log entry with a warning. This change will allow unified svc.conf-files for both UNIX and WinNT. Thanks to Tilo Christ for this. * ace/OS.cpp (thr_create): Came up with a remarkably clever scheme that should make it possible to utilize the ACE library *without change* on MVS, where the frigging C++ compiler requires all functions passed to pthread_create() have an extern "C" linkage. The trick was to generalize the thread adapter mechanism used for Win32. * ace/OS: Added a new macro called ACE_PTHREAD_CLEANUP_PUSH that selects the right mechanism (e.g., ace_spawn_adapter or not) for passing functions to pthread_cleanup_push(). * ace/config-mvs.h: Added a new macro called ACE_HAS_THR_C_FUNC which expresses the fact that the MVS C++ compiler *must* have an extern "C" function passed to pthread_create(). * ace/OS.h: Modified all uses of ACE_OS::mutex_lock_cleanup() to use the extern "C" ace_spawn_adapter() on platforms MVS like MVS that can't deal with non-C functions to pthread_create. Thanks to Chuck Gehr for reporting this. * ace/OS.cpp (thr_create): Added Chuck Gehr's patches for MVS. Sun Nov 24 12:30:45 1996 Douglas C. Schmidt * ace: Added Chuck Gehr's config-mvs.h file! * ace: Began adding support for WinSock 2.0. Thanks to Luca for this. * ace/UPIPE_{Acceptor,Connector,Stream}: Updated the UPIPE components so that they keep a reference count that keeps track of the number of "owners" (which should always be 2 -- one for the connector-side and one for the acceptor-side). By keeping this count, we can ensure that we don't close down the underlying ACE_Stream until both sides have called close(). This will remove a nasty bug that was lurking in some of the tests. * ace/Message_Block.h: Added a new copy() method that assumes the buf passed in is a NUL-terminated string. * tests/UPIPE_SAP_Test.cpp: Modified this test so that threads exit in a well-defined order. This should prevent problems on Win32. * ace/OS.i: Changed SIGNAL_SAFE_OS_CALLS to ACE_HAS_SIGNAL_SAFE_OS_CALLS to be consistent... * ace/config-vxworks*.h: Removed the SIGNAL_SAFE_OS_CALLS #define from the VxWorks config files. There's no need to use this by default. * ace/Event_Handler: Moved all the default implementations of the virtual methods in ACE_Event_Handler from the *.i file to the *.cpp and made them no longer be inlines. This will fix some problems with some compilers (e.g., MSVC++ 4.1) and is also more reasonable since there's really no purpose for inlining these virtual functions since they are rarely called. Thanks to James Michael Dwyer for reporting this problem. Sat Nov 23 12:39:03 1996 Douglas C. Schmidt * ace/Svc_Conf.y: Changed the parser so that it accepts DLL pathnames that lack *.dll or *.so suffixes. This is necessary so that we can automatically append the correct suffix depending on the platform. Thanks to Tilo Christ for suggesting this. * ace/Makefile: Updated the Makefile so that it will automatically insert the appropriate so that conditions for include of ace/OS.h can be checked correctly. Fri Nov 22 18:12:49 1996 Douglas C. Schmidt * ace/OS.i (thr_sigsetmask): DCE threads (at least as implemented by Digital) have no means for setting the signal mask on a per-thread basis. Therefore, modified the code so that it correctly returns ACE_NOTSUP_RETURN(-1) for DCEthreads. Thanks to Thilo Kielmann for chasing this down. * performance-tests/Synch-Benchmarks/synch_driver.cpp (run_test): Fixed this implementation so that it will shut down correctly when a signal occurs or a timeout occurs (whichever comes first). Fri Nov 22 08:02:39 1996 Irfan Pyarali * ace.{mdp,mak}: Changed ace.mak so that it links with the non-debug version of Microsoft's multithreaded dll when compiled with the release option Thu Nov 21 10:37:40 1996 Douglas C. Schmidt * ace/Service_Config: Changed the implementation of the Service_Config class so that it no longer inherits from ACE_Event_Handler. This was causing problems because the new reactor() method in the ACE_Event_Handler was conflicting with the static reactor() method on ACE_Service_Config. * ace/OS.cpp (detach): Since we no longer use an ACE_Recursive_Thread_Mutex, we can remove the line else if (ACE_TSS_Cleanup::lock_.get_nesting_level () > 1) // ... Thanks to Matthias Kerkhoff for reporting this. * ace/Thread_Manager.cpp (spawn_n): Replaced int i with size_t i to avoid warnings between signed and unsigned values. * ace: There is an easy way to speed up the "Update dependencies" in MSVC. Just keep the the compiler from complaining about missing header by inserting a comment like below in the #include-directives which are not used in Win32. Therefore, instead of #include we use #include /**/ Please let me know if this causes problems for any pre-processors. Thanks to Matthias Kerkhoff for this suggestion! * ace/OS.cpp: Added support for AfxBeginThread in ACE_OS::thr_create() and ACE_OS::exit(). Now ACE should work with MFC when you give the THR_USE_AFX flag to ACE_OS::thr_create()! Thanks to Matthias Kerkhoff for this! * ace/Malloc_T.cpp (avail_chunks): Changed the return value to ssize_t so we can return -1 if we can't get the lock. Thanks to Tilo for reporting this. * ace/config-sunos4-sun3.x.h: Added new #ifdefs for Sun C++ 3.0.1 on SunOS 4.1.3. Thanks to Eric Parker for these fixes. * ace/Stack.h: Added a new method called peek() to the ACE_Unbounded_Queue classes so that the first element can be retrieved without removing it. Thanks to Luca for this suggestion. * ace/SString.cpp (ACE_CString): Changed ACE_CString so that it uses memcpy() rather than str(n)cpy() so that we can store any structure into it. Thanks to Luca for this suggestion. * ace/Acceptor: Since we moved the reactor() accessors to ACE_Event_Handler we can omit these from the Acceptor and Svc_Handler. * ace: Updated the ACE_Reactor and ACE_ReactorEx so that they automatically sets the pointers in ACE_Event_Handlers. Thanks to Luca for this suggestion. * ace/Event_Handler: Added pointers to all the ACE demultiplexors (e.g., ACE_Reactor, ACE_ReactorEx, and ACE_Proactor) to ACE_Event_Handler, along with set/get accessor methods. This supports a very common use-case where an event handler keeps track of its demultiplexor. Thanks to Luca for this suggestion. * ace/OS.cpp: Since we do not use the recursion count from the Recursive Mutex any more in ACE_TSS_Cleanup::exit() we can replace the Recursive Mutex by a regular ACE_Thread_Mutex that is recursive on NT natively and more efficient. Thanks to Detlef for suggesting this. * ace/OS.cpp: Since we do not use the recursion count from the Recursive Mutex any more in ACE_TSS_Cleanup::exit() we can replace the Recursive Mutex by a regular ACE_Thread_Mutex that is recursive on NT natively and more efficient. Thanks to Detlef for suggesting this. * ace: Backed out all of Detlef's changes to ACE_OS and ACE_TSS::ts_get(). It turns out that this is unnecessary since he reimplemented ACE_TSS_Cleanup so that it no longer needs to hold the lock when callbacks are made. Once again, Detlef proves that he's a macho man, not a boy ;-) Thu Nov 21 08:12:51 1996 David L. Levine * include/makeinclude/platform_sunos5_sunc++_4.1.GNU: put back the LD definition * include/makeinclude/platform_osf1_4.0_g++.GNU: added LD definition to work with latest wrapper_macros.GNU Wed Nov 20 10:32:52 1996 Irfan Pyarali * tests: Mutex_Test.cpp Priority_Buffer_Test.cpp Reader_Writer_Test.cpp Thread_Pool_Test.cpp were changed slightly to remove some compile time warnings. Wed Nov 20 21:35:28 1996 David L. Levine * ace/Svc_Conf_l.cpp: added #include of ace/config.h so that conditions for include of ace/OS.h can be checked. Wed Nov 20 02:38:40 1996 Douglas C. Schmidt * ace/Service_Config.cpp: Moved the definition of logger_key_ to OS.h and changed it to a macro (ACE_LOGGER_KEY) so that it will be portable to Win32 and UNIX. Thanks to Tilo for reporting this. * ace/OS: Changed the return value of ACE_OS::getgid() from uid_t to gid_t to be POSIX compliant. * ace/OS.cpp (thr_create): Fixed a typo where we were assigning stacksize rather than size. Thanks Thilo. * ace/OS.cpp (thr_create): Added a new piece of code for ACE_NEEDS_HUGE_THREAD_STACKSIZE, which is necessary to create a larger per-thread stack size in order to run ACE_Log_Msg::log. Thanks to Thilo for this. * tests/TSS_Test.cpp: Changed the name of the static variable "lock" to "cout_lock" to avoid a potential namespace clash on Digital UNIX. Thanks to Thilo Kielmann for reporting this. * ace/SOCK_Dgram.cpp (recv): Added a cast (char *) io_vec->iov_base so that this would work correctly on platforms where iov_base is a void * (e.g., AIX and HP/UX). Thanks to Alan Stewart for the change. * ace/OS.h: Added a few new changes for Digital UNIX 4.0a. These should fix problems with ctime_r() and asctime_r(). Thanks to Dave Trumble for the fixes. * tests/UPIPE_SAP_Test.cpp: Disabled this test if we don't have threads and (STREAM Pipes or Win32). Thanks to Thilo Kielmann's for this info. Tue Nov 19 23:09:08 1996 Tim H. Harrison * ace/Log_Record.cpp (print): Added a call to ACE_OS::fflush before returning. This change was suggested by Luca in order to help prevent messages from getting lost when applications exit. We're unsure of the affects this will have on performance, so we may change this back in the future. Tue Nov 19 00:06:57 1996 Douglas C. Schmidt * Released a beta version of ACE 4.0.33 for testing. * ace/TTY_IO.h: Added the ACE_Export macro before the ACE_TTY_IO class to make things work correctly for Win32 DLLs. Thanks to William L. Gerecke for fixing this. * ace/OS.h: Improved the support for RLIMIT_NOFILE. Thanks to Alan Stewart for reporting this. * ace/OS.h: Removed the following code from OS.h because it is causing problems on some platforms: #if (!defined (timespec) && !defined (m88k)) #define timestruc_t struct timespec #endif /* timespec */ Thanks to Fred LeBar for reporting this. * ace/OS.cpp (thr_create): Needed to create an ACE_OS::NULL_hthread so that we can assign the "NULL thread handle" on POSIX platforms. Thanks to Alan Stewart for reporting this. * ace/OS.i: The HP/UX C++ compiler is unable to grok inline functions with multiple returns. So I recoded the ACE_OS::event* methods to avoid this. Thanks to Alan Stewart for reporting this. * ace/OS.h: Moved the "undef" of t_errno until after the inclusion of mman.h and dlfcn.h to prevent problems with DU4.0a. Thanks to David Trumble for reporting this. * ace/Pipe.cpp (open): Fixed a typo where this->ACE_SOCK::set_option() was being used instead of writer.set_option(). Thanks to Tilo Christ for reporting this. * ace/Message_Queue.h: Fixed a bug where ACE_Message_Queue &queue_; should be: ACE_Message_Queue &queue_; Thanks to Rick Orr for reporting this. * apps/Makefile: Updated the Makefile so that it no longer tries to look for Synch-Benchmarks. Thanks to Amos Shapira for reporting this. * ace/Activation_Queue.cpp (dequeue): Added a sanity check to make sure that we actually deleted the first element in the queue. Thanks to Andres Kruse for reporting this. * include/makeinclude/platform_sunos5_sunc++_4.1.GNU: Added a minor change to remove the libACE.a archive prior to creating a new one. This works around bugs with the SunOS 4.x C++ compiler. Thanks to Andres Kruse for reporting this. * ace/Malloc_T.cpp (avail_chunks): Added Fred LeBar's code and comments for computing the available chunks. * tests/Mutex_Test.cpp: Rewrote the Mutex_Test so that it behaves correctly on UNIX and Win32. Thanks to Irfan for reporting the problem. * ace/Log_Msg.cpp (sync): Somehow, the statement that updated the pid_ after sync() is called following a fork() got removed, so I put it back in. * ace/config-sunos5.*-g++.h: Added the -D_REENTRANT flag to the config files for the G++ version of ACE. This fixes a nasty problem that otherwise arises when compiling on SunOS 5.x. Thanks to Hanan Herzog for reporting this. Tue Nov 19 21:14:15 1996 David L. Levine * performance-tests/Synch-Benchmarks/Benchmark.{h,cpp}: use thread ID class for VxWorks as well as Pthreads. * OS.i, config-{osf1-4.0,sunos5.[45]}-g++.h: Moved GNU #include out of config files and into OS.i. * ace/Svc_Conf_l.cpp: added #include of ace/OS.h for HPUX and VxWorks. * ace/Token.cpp: reordered initializations in Ace_Queue_Entry ctor to match declaration order. Mon Nov 18 00:47:27 1996 Douglas C. Schmidt * ace/OS.h: Added a new #define called ACE_HAS_BROKEN_CONVERSIONS to workaround problems with the HP/UX C++ compiler, which doesn't seem to be able to grok foo->operator T *(). Thanks to Alan Stewart for reporting this bug and the fix. Also updated the config-hpux*.h files with this define. * examples/Misc: Added a new test (test_get_opt.cpp) which exercises the ACE_Get_Opt class. Sun Nov 17 13:00:02 1996 Douglas C. Schmidt * ace/Get_Opt: Replaced the GNU-based implementation of class ACE_Get_Opt with an implementation based on BSD UNIX. The advantage here is that the BSD version is not encumbered by the GNU GPL. Thus, ACE has no more dependencies on GNU GPL. Thanks to James Hu for finding the BSD code. Mon Nov 18 00:13:25 1996 Tim H. Harrison * ace/stdcpp.h: Added this file to ACE. This file contains the portability ugliness for the Standard C++ Library. As implementations of the "standard" emerge, this file will need to be updated. Although not very useful now, we are gearing up for a support for STL on UNIX and NT. * ace/OS.h: Added an include "ace/stdcpp.h". * ace/Log_Record.h (ACE_Log_Record): Removed the iostream include mess that got accidentally committed to the release. Sun Nov 17 00:13:25 1996 Tim H. Harrison * For some totally evil reason, MSVC++ will not allow any use of the "allocator" symbol. It's an STL thing. As a result, I've had to change all of the following files to rename allocator to alloc: Local_Name_Space_T.cpp, Map_Manager.cpp, Malloc_T.cpp, Message_Block.cpp, Read_Buffer.cpp, SString.cpp. The root of the problem can be seen by compiling the code below: template class foo {}; int foo; // compile error because of the foo<> class. int main () { return 0; } * Service_Config.{h,cpp}: We have to change the allocator accessors to alloc. This is probably going to break many things. If necessary, we can conditionally compile in the old accessors for platforms that are not using STL and MSVC++. * ace/Task.h: Added ACE_Export macros to the class definitions. Sun Nov 17 13:00:02 1996 Douglas C. Schmidt * ace: Added Thilo Kielmann's patches for OSF/1 4.0a. * ace/OS: Revised the implementation of ACE_OS::asctime_r() and ACE_OS::ctime_r() to simplify common cases. However, this may have broken some code on OSF/1 4.0a. Can someone please check this? * tests/SPIPE_Test.cpp: Conditionally compiled this file so that we only build the SPIPE test if (1) we're running on Win32 or (2) ACE_HAS_STREAM_PIPES. Thanks to David Levine for this suggestion. * ace/OS.i (ctime_r): Fixed a typo that was caused by a misplaced #endif. Thanks to Eshel Liran for reporting this. * ace/Time_Value: Disabled ACE_TRACE within these method in order to prevent infinite recursion. * ace/Log_Record: Originally, when verbose mode was enabled you can get the date and time down to the seconds. However, it is useful for performance testings to have milliseconds displayed in the log. To accomplish this, I changed ACE_Log_Msg and ACE_Log_Record to they also keep track of and print the microsec time, as well. Thanks to Luca for suggesting this. * ace/Map_Manager.cpp: updated all the ACE_Map_Manager methods so their read and write Guards use the ACE_*_GUARD macros. * ace/Malloc_T.cpp: Updated all the ACE_Malloc methods so their read and write Guards use the ACE_*_GUARD macros. * ace/OS.cpp (svc_run): Added an ACE_DEBUG announcing that an exception has propagated beyond the outermost svc_run() function. Thanks to Luca for this suggestion. * tests/test_config.h: VxWorks passes in a NULL argv (arrghhh...). Therefore, to work around this in the ./tests directory, I changed the ACE_START_TEST macro to take a NAME parameter, and then I added the following local variable: const char *program = argv ? argv[0] : NAME; Thanks to David Levine for this fix. Sat Nov 16 12:01:08 1996 Douglas C. Schmidt * examples/Threads/test_tss2.cpp: Added Detlef's new test for ACE_TSS. * ace/Synch_T.cpp (ts_get): Added Detlef's changes to fix deadlock problems with ACE_TSS on NT. Fri Nov 15 18:01:26 1996 Douglas C. Schmidt * ace/ACE_SOCK_Stream.cpp: NT will signal an abortive close to the opposite party if a socket is closed before all of its data has been sent out. According to the NT SDK-docs, you should do a shutdown before the closesocket() in order to prepare a graceful close. Thus, I've placed an ACE_SOCK_Stream::close_writer() method just before the call to ACE_SOCK::close() in the new close() of the ACE_SOCK_Stream class. Thanks to Tilo Christ for this suggestion. * ace/INET_Addr.cpp: The function ACE_INET_Addr::addr_to_string was a virtual function that is also inline and defined in the .i file. Some compilers have a problem with this, so I moved it into the *.cpp file. In addition, its sister function was also virtual and is defined as: ACE_INLINE int ACE_INET_Addr::string_to_addr (const char s[]) in the .cpp file. I removed the ACE_INLINE directive. Thanks to Fred LaBar for reporting this. Thu Nov 14 16:20:20 1996 Douglas C. Schmidt * ace/Malloc_T.cpp: Added a new method to ACE_Malloc that will return the number of chunks available on the free list. Thanks to Fred Labar for this. Wed Nov 13 01:22:16 1996 Douglas C. Schmidt * ace/ReactorEx.cpp (handle_events): I've changed siginfo_t on Win32 (which was previously typedef'd to int) so that it has the following structure: struct siginfo_t { siginfo_t (ACE_HANDLE handle); ACE_HANDLE si_handle_; // Win32 HANDLE that has become signaled. }; Then, I've changed the ACE_ReactorEx::handle_events() method to look like this: // Assign the ``signaled'' HANDLE so that callers can get // it. siginfo_t sig (relative_handles[relative_index]); if (relative_handlers[relative_index]->handle_signal (0, &sig) == -1) Thus, you can refer to the signaled handle as si_handle_ within the handle_signal() call back. Thanks to Matthias Kerkhoff for suggesting this. * ace/System_Time.h: Made ACE_System_Time::get_local_time() a static member function. Thanks to Matthias Kerkhoff for suggesting this. * ace/Message_Queue.h: The internal variables for counting the bytes stored in the queue were declared as of type int (in Message_Queue.h). But they are set (e.g. with ACE_Message_Queue::ACE_Message_Queue) with values of size_t. When running tests/Priority_Buffer_Test, the high_water_mark_ is preset with the value LONG_MAX. While assigning this value from size_t to int, this becomes -1 and the queue is always believed to be full :-( The fix is to change the internal data structures in Message_Queue.h from int to size_t. Thanks to Thilo Kielmann for reporting this. * tests: Fixed problems with the following three tests: Priority_Buffer_Test.cpp Reader_Writer_Test.cpp UPIPE_SAP_Test.cpp When these are compiled with gcc on Digital UNIX 4.0a the static ACE_Thread_Manager thr_mgr; was never getting initialized due to gcc compiler bugs. The fix is to replace the static thread manager with the ACE_Service_Config::thr_mgr() singleton. Thanks to Thilo Kielmann for reporting this. Tue Nov 12 19:43:12 1996 Douglas C. Schmidt * ace/Thread_Manager.cpp (spawn_n): Was missing a 0 after ?. Thanks to Thilo Kielmann for reporting this. * ace/Log_Msg.h: Created a new macro call ACE_ERROR_BREAK(X) { ACE_ERROR(X); break;} for use within switch and loop statements. Thanks to Luca for this idea. * ace/Pipe.cpp: Enabled the "reuse addr" flag for accepting and connecting the Win32 version of ACE_Pipe. Thanks to Luca for reporting this problem. * ace/OS.i (thr_join): ACE_Thread::join () has a default second parameter (the status) set to 0. This is not handled in ACE_OS::thr_join(). To avoid getting a system error in NT we handle this as we did with ACE_OS::thr_create() and the thr_handle parameter. * ace/config-irix6.2-sgic++.h: Updated the set of patches required for IRIX 6.2. Thanks to Amos Shapira for reporting this. Sun Nov 10 15:40:17 1996 Tim H. Harrison * ace/Token_Invariants.cpp: Moved static data declarations out of ACE_Token_Invariant_Manager::instance and into the header file. This is supposed to help with a g++ problem on VxWorks. Sun Nov 10 13:22:03 1996 Douglas C. Schmidt * ace/Pipe.cpp (open): Set the loopback socket into TCP_NODELAY mode so that we don't block for 200 ms... Thanks to Luca Priorelli . * ace/Thread_Manager: Created a new version of spawn_n() that gives parameters for stack, stack_size, and also for the assigned ACE_hthread_t's. Thanks to Thilo Kielmann for suggesting this. Sun Nov 10 13:56:38 1996 Prashant Jain * tests/Reactors_Test.cpp (main): Fixed the test so that the output of the test goes to a log file instead of STDOUT. Sat Nov 9 11:23:13 1996 Douglas C. Schmidt * ace/Synch.i: Fixed a bug in ACE_Thread_Mutex_Guard. The call: this->owner_ == block ? this->lock_.acquire () : this->lock_.tryacquire (); should be this->owner_ = block ? this->lock_.acquire () : this->lock_.tryacquire (); Thanks to Alexander Smundak for reporting this. Sat Nov 9 01:44:15 1996 Irfan Pyarali * ace/Message_Queue: Added forward and reverse iterators to Message_Queue. Also, added typedefs to Message_Queue for ITERATOR, and REVERSE_ITERATOR. This makes the Queue like an STL collection and also makes it easier to use since you don't have to define types for the iterators. Please see test/Message_Queue_Test.cpp for an example. * ace/Map_Manager: Added reverse iterator to Map_Manager. Also, added typedefs to Map_Manager for ENTRY, ITERATOR, and REVERSE_ITERATOR. This makes the Map more like an STL collection and also makes it easier to use since you don't have to define types for the iterators and the entry. Please see test/Map_Manager_Test.cpp for an example. Note that the new typedefs does not break existing code. Fri Nov 8 20:04:26 1996 Douglas C. Schmidt * ace/Malloc.h: Fixed a typo on line 176 that reads: #include "ace/Sync_T.h" It should read: #include "ace/Synch_T.h" Thanks to Todd Barkalow for reporting this. Wed Nov 6 00:38:02 1996 Douglas C. Schmidt * ace/Pipe: Added the const qualifier to the following methods: ACE_HANDLE ACE_Pipe::read_handle (void) const; ACE_HANDLE ACE_Pipe::write_handle (void) const; Thanks to Luca for reporting this. * ace/config-win32-msvc4.0.h: Redefined ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES since it looks like MSVC++ 4.0 still doesn't work. Maybe this is fixed in 4.2? Tue Nov 5 03:09:44 1996 Douglas C. Schmidt * ace/Strategies.cpp: I'd forgotten to update one of the accept(*svc_handler) calls to use the new accept(svc_handler->peer()) syntax. * netsvcs/lib/Server_Logging_Handler.cpp: Added a cast to (COUNTER) 0 when initializing ::request_count_ to avoid problems on Win32. Thanks to Luca for pointing this out. * ace/Thread_Manager: Added a new thr_self() method that return the unique ID of the thread. This is not strictly necessary (because a thread can always just call ). However, we put it here to be complete. Thanks to Hamutal Yanay for suggesting this. * ace/OS.cpp (thr_create): I was accidentally closing down ::CloseHandle (thr_handle) (where thr_handle is a HANDLE *) when I should have been doing a ::CloseHandle (handle) instead. Thanks to Luca for finding this! Tue Nov 5 14:26:32 1996 David Levine * include/makeinclude/wrapper_macros.GNU: Changed LINK.{c,cc} commands to use LD instead of CXX. Changed all platform macros files (except for g++ on VxWorks) to correspond. * tests/run_tests.sh: changed -e test to -f for portability and reordered tests. Thanks to Michael Michael Rueger for originally creating run_tests.sh, and for maintaining it, and to Alan Stewart for suggesting fixes/enhancements. * tests/Time_Service_Test.cpp and Tokens_Test.cpp: changed to return 0 on success instead of 42 Fri Nov 1 03:53:39 1996 Irfan Pyarali * STL: Added STL files to $WRAPPER_ROOT/STL. This code is a modified version (changes for VC++ compiler) of the publicly available implementation of STL from HP. Currently, ACE_Registry uses these STL classes. Fri Nov 1 00:25:01 1996 Douglas C. Schmidt * ace/CORBA_Handler.cpp (process_events): There was a very subtle race condition in the ACE_MT_CORBA_Handler. process_events() accessed the singleton directly without taking the mutex. At startup the process_event thread is kicked off from the constructor and the instance_ is set. Hence the race. The solution is to attempt to take the mutex before accessing the instance. Thanks to David Artus for reporting the problem and providing the fix. * ace/Log_Msg.cpp (log): Improved the performance of the Log_Msg mechanism by not doing any parsing of the format string if the user has disabled this priority. * ace/Reactor.cpp: Added a chance for the open() method of the Notification_Pipe failing. Thanks to Luca for pointing this out. * ace/Reactor.cpp (handle_events): Added a change to the semantics of the ACE_Reactor so that it doesn't fall out of the event loop when signals arrive that it handles. Thanks to Stuart Powell for this fix. * ace/Service_Repository.cpp (remove): Fixed a bug with Service_Record::remove() that was failing if there were only two records and we are removing the first one. Thanks to Alex Villazon for reporting this. * ace: Recompiled everything on Solaris with G++ and CC and it seems to work fine. * ace/Module: Replaced the use of char * with const char * for assigning the Module a name. * ace: Split the Task.{cpp,i.h} file into Task_T.{cpp,i,h} in order to factor out the new non-template ACE_Task_Base and ACE_Task_Exit classes. This is required for GCC-based compilers that include the *.cpp files... Thu Oct 31 00:36:38 1996 Douglas C. Schmidt * ace/Malloc_T.h: Made the destructor of ACE_Allocator_Adapter virtual. * ace/Thread: Reorganized the ACE_Thread so that the ACE_HAS_THREADS #ifdef is no longer required... * ace/Strategies.h: Changed all the destructors to be virtual so that G++ will stop complaining... * ace/Thread_Manager: Reorganized the ACE_Thread_Manager so that the ACE_HAS_THREADS #ifdef is no longer required... * ace/config-win32-msvc4.0.h: Added Dieter Quehl's great hack to get ACE to compile correctly on Win32 with MFC! * ace/Task: I've rearranged the implementation of ACE_Task<> in the following way: 1. Defined a non-template class ACE_Task_Base from which the ACE_Task<...> inherits (instead of inheriting from Ace_Service_Object, which ACE_Task_Base now inherits from. 2. Move all methods that don't depend on the or modifers from the ACE_Task template to ACE_Task_Base. There are two motivations for making this change: 1. It reduces ``template bloat'' by factoring out common code that can be shared between ACE_Task and ACE_Task. 2. It makes it possible for the Thread_Manager to use ACE_Task_Base *'s for managing groups of ACE_Tasks in a fully polymorphic manner. Note that the new changes don't break any existing code that uses ACE_Task. Thanks to Hamutal Yanay and Ari Erev's for suggesting these changes. * ace/Thread_Manager: Changed the use of ACE_Task to ACE_Service_Object because this avoids nasty problems with template type conflicts. The right solution is probably to create a new non-template base class for ACE_Task called ACE_Task_Base and move all the ACE_Task operations into there that don't involve the Message_Queue directly. I'll need to think more about this... * ace/SOCK_Stream: Added new timed send_n() and recv_n() methods, which use the underlying timed ACE::send() and ACE::recv() calls. * ace/ACE.cpp: Added new timed send_n() and recv_n() methods, which use the underlying timed ACE::send() and ACE::recv() calls. Wed Oct 30 00:27:21 1996 Douglas C. Schmidt * ace/OS.h: Changed MAXHOSTNAMELEN on Win32 from (MAX_COMPUTERNAME_LENGTH+1) (which is around 16 or so) to 256. Thanks to Tilo Christ for this suggestion. * ace: Made #define STRICT a compile time option if the ACE_HAS_STRICT flag is enabled. This prevents ACE from breaking existing application (i.e., non-ACE) code. Thanks to Karlheinz for pointing this out! * ace/Synch_T.cpp: Fixed a typo in ACE_Condition::wait (void). return ACE_OS::cond_wait (&this->cond_, this->mutex_.lock_); should read return ACE_OS::cond_wait (&this->cond_, &this->mutex_.lock_); Thanks to Dieter Quehl for reporting this! * ace/Svc_Handler.h: Removed the operator ACE_PEER_STREAM &() from the ACE_Svc_Handler class since we don't need it anymore due to the changes below. * ace/{Acceptor,Connector}.cpp: Removed the use of operator ACE_PEER_STREAM &() in the Acceptor::accept() and Connector::connect() code and replaced it with svc_handler->peer(). This works much better and is more intuitive. Wed Oct 30 00:30:00 1996 Irfan Pyarali * Registry: Added a Name Service implementation to ACE based on Win32 Registry. The ACE_Registry interface is inspired by the interface specified in the CORBA Naming Service Specification. The implementation is done through Win32 Reg*() functions. Other than providing an OO wrapper for the Win32 Reg*() functions, ACE_Registry provides an abstraction for iteration over the elements of the Registry. This only works on Win32 platforms (unless you are brave enough to reimplement the Win32 Registry API on UNIX and link it in underneath ACE!). * ace/Local_Name_Space_T.cpp: Moved SEH out of methods of Name_Space_Map to the methods of Local_Name_Space. Some of the calls to Local_Name_Space methods used the allocator to either malloc or find or free shared memory. Adding SEH to these methods ensured that any exception raised due to remapping would be caught and handled appropriately. Also, to fool the stupid MFC compiler, we added _i methods so that it stopped bitching about destructors not getting called correctly. * Added three new tests to /examples/Naming. Thanks to Lothar for providing these tests. Tue Oct 29 18:10:09 1996 Douglas C. Schmidt * ace/ACE.cpp (send): Integrated a new and simpler version of timed ACE::send(). Thanks to Vital Aza for coming up with this. * ace/XtReactor.cpp: When the ACE_Reactor is constructed it creates the notify pipe and registers it with the attach() method. The XtReactor overloads this method BUT because the attach occurs when constructing the base class ACE_Reactor, the ACE_Reactor attach() is called not the XtReactor attach(). This means that the notify pipe is registered with the ACE_Reactor event handling code not the XtReactor and so notfications don't work. To get around this we simply close and re-opened the notification handler in the constructor of the XtReactor. Thanks to Rodney Skinner for this fix. * ace/XtReactor.cpp (schedule_timer): The ACE_Reactor returns a timer_id from it's equivalent call but the XtReactor always returns 0. To fix this we simply replaced the "return 0;" in the function with "return result;" Thanks to Rodney Skinner for reporting this. Tue Oct 29 00:02:44 1996 Douglas C. Schmidt * ace/config-win32-msvc4.0.h: Defined the STRICT symbol based on a suggestion from Luca. STRICT type checking in WINDOWS.H enhances type safety for Windows programs by using distinct types to represent all the different HANDLES in Windows. So for example, STRICT prevents you from mistakenly passing an HPEN to a routine expecting an HBITMAP. Note that if you have STRICT type checking enabled in one file, but not in another, the C++ compiler will generate different external link symbols for a single function. This will result in link-time errors If you are mixing STRICT and non-STRICT code, you must be aware of linkage inconsistencies. In general, all MFC programming and all C++ should be done with STRICT. If you have legacy C code, then not using STRICT is acceptable * ace/OS.cpp (thr_create): Added a special check for the situation where we have both ACE_HAS_PTHREADS and ACE_HAS_STHREADS defined. In this case, we are running on Solaris, where ACE_thread_t and ACE_hthread_t are the same. Therefore, we can copy the value of the *thr_id into the *thr_handle. This ensures that the ACE_Thread_Manager behaves correctly with respect to suspending and resuming threads and ACE_Tasks. * ace/Trace.cpp (ACE_Trace): Changed the use of LM_DEBUG to LM_TRACE in the constructor and destructor. Thanks to Luca for this! * ace/OS.i: Added a cast to of (HMODULE) handle so that the STRICT macro would work correctly for Win32. Thanks to Luca for this. * ace/config-win32-msvc4.0.h: According to Luca, ACE compiles file with ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES undefined on NT. So I undefined it! If there are any problems with this, please let me know. * ace/SOCK_Dgram: Added Luca Priorelli implementation of recv() for SOCK Dgrams that allows clients to read from a socket without having to provide a buffer to read. * examples/Threads/test_task_four.cpp: This is a new test program to test the new interfaces. Thanks to Hamutal Yanay & Ari Erev for this. * tests/test_config.h: Added a call to the new ACE_OS::mkdir() wrapper to create the log directory if one doesn't already exist. This should solve some nasty problems with NT reported by Tilo Christ . * ace/OS.h: Added a new macro ACE_DEFAULT_DIR_PERMS and changed the spelling of the existing ACE_DEFAULT_PERMS to ACE_DEFAULT_FILE_PERMS, which is more accurate. Mon Oct 28 21:35:12 1996 Douglas C. Schmidt * ace/OS.h: Added a wrapper for the mkdir() system call. We need it for some of the tests. * ace/Task: Changed the name of ACE_Task_Exit<>::set_this() to ACE_Task_Exit<>::set_task(). Thanks to Hamutal Yanay & Ari Erev for suggesting this. * ace/{Task,Thread_Manager}: Integrated Hamutal Yanay & Ari Erev's enhancements to add ACE_Task support to the ACE_Thread_Manager. This allows the ACE