diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-12-23 18:17:00 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-12-23 18:17:00 +0000 |
commit | d4e2bd09872286771a656041ae27747a352b0e08 (patch) | |
tree | d0f631667a56aa89d04002c1ad05012f3b9bf1ce | |
parent | 1e66a853e4bb15ef4b76bf1afeb80e4d53d9638f (diff) | |
download | ATCD-d4e2bd09872286771a656041ae27747a352b0e08.tar.gz |
ChangeLogTag:Thu Dec 23 12:16:38 1999 Christopher Kohlhoff <chris@kohlhoff.com>
-rw-r--r-- | ChangeLog-99b | 30 | ||||
-rw-r--r-- | TAO/ChangeLog-99c | 17 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Makefile.bor | 178 | ||||
-rw-r--r-- | TAO/tao/Makefile.bor | 2 | ||||
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | ace/Auto_IncDec_T.cpp | 163 | ||||
-rw-r--r-- | ace/Makefile.bor | 2 | ||||
-rw-r--r-- | ace/OS.h | 8 | ||||
-rw-r--r-- | ace/OS.i | 4 | ||||
-rw-r--r-- | tests/Makefile.bor | 2 | ||||
-rw-r--r-- | tests/Malloc_Test.cpp | 15 | ||||
-rw-r--r-- | tests/run_tests.bat | 4 |
12 files changed, 344 insertions, 82 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b index 984db2477ba..268f08c960f 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,3 +1,33 @@ +Thu Dec 23 12:16:38 1999 Christopher Kohlhoff <chris@kohlhoff.com> + + * ace: Added missing files Capabilities.cpp and Configuration.cpp + to $ACE_ROOT/ace/Makefile.bor. + + * ACE/tests: Added new tests Auto_IncDec_Test and + Capabilities_test to Makefile.bor. + + * ACE/tests: Fixed syntax error in a Borland C++Builder specific + section of Auto_IncDec_Test.cpp. + + * ACE/tests: Fixed Malloc_Test so that it does not fail with + Borland C++Builder. + + * ACE/tests/ Changed run_tests.bat so that it does not invoke + ACE_Init_Test when run with the "bor" command line + argument. This test uses MFC and need not be built or run. + +Thu Dec 23 11:46:38 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * ace/OS.h: Moved + + #if defined (ACE_HAS_SYS_FILIO_H) + # include /**/ <sys/filio.h> + #endif /* ACE_HAS_SYS_FILIO_H */ + + from OS.i to OS.h so that the FIONREAD macro will be defined for + the ACE_SOCK_Dgram::recv() method even if inline = 0. Thanks to + Alain Sauron <sauron@syseca.thomson-csf.com> for reporting this. + Wed Dec 22 11:29:43 1999 Nanbor Wang <nanbor@cs.wustl.edu> * bin/auto_compile_win32.pl: Renamed ImplRepo.dsw to diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index dd033f2c6d5..9608c3ec4ab 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,8 +1,23 @@ +Thu Dec 23 12:16:38 1999 Christopher Kohlhoff <chris@kohlhoff.com> + + * TAO/orbsvcs/orbsvcs/: Modified Makefile.bor to include new + source files, and to ensure tao_idl is executed for all .idl + files before compiling any .cpp files. This change should also + make it easier to keep the makefile up to date. + + [ Note that the tao_idl flag "-I..\..\tao" added in the last + release has been removed. After further discussions with Mike + Gingell it was determined that the cause of the problem was + actually an incorrect TAO_ROOT environment variable. Fixing this + removed the need for the extra flag. ] + + * TAO/tao: Added files ImplRepo[CS].cpp to Makefile.bor. + Thu Dec 23 12:06:42 1999 Nanbor Wang <nanbor@cs.wustl.edu> * utils/NamingViewer/StdAfx.h: Moved the inclusion of corba.h. ACE headers must come first to avoid conflicts among MFC and - non-MFC windows header files. + non-MFC windows header files. Added macro check against ACE's MFC support. diff --git a/TAO/orbsvcs/orbsvcs/Makefile.bor b/TAO/orbsvcs/orbsvcs/Makefile.bor index 11ff417e887..2581696521d 100644 --- a/TAO/orbsvcs/orbsvcs/Makefile.bor +++ b/TAO/orbsvcs/orbsvcs/Makefile.bor @@ -5,57 +5,72 @@ NAME = orbsvcs TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe \ - -I..\.. -I..\..\tao -Ge 1 -Wb,export_macro=TAO_ORBSVCS_Export \ + -I..\.. -Ge 1 -Wb,export_macro=TAO_ORBSVCS_Export \ -Wb,export_include=orbsvcs_export.h +IDLFILES = \ + $(IDLDIR)\CosEventChannelAdmin.idl \ + $(IDLDIR)\CosEventComm.idl \ + $(IDLDIR)\CosLifeCycle.idl \ + $(IDLDIR)\CosNaming.idl \ + $(IDLDIR)\CosNotification.idl \ + $(IDLDIR)\CosNotifyChannelAdmin.idl \ + $(IDLDIR)\CosNotifyComm.idl \ + $(IDLDIR)\CosNotifyFilter.idl \ + $(IDLDIR)\CosPropertyService.idl \ + $(IDLDIR)\CosTrading.idl \ + $(IDLDIR)\CosTradingDynamic.idl \ + $(IDLDIR)\CosTradingRepos.idl \ + $(IDLDIR)\DsLogAdmin.idl \ + $(IDLDIR)\LifeCycleService.idl \ + $(IDLDIR)\RtecDefaultEventData.idl \ + $(IDLDIR)\RtecEventChannelAdmin.idl \ + $(IDLDIR)\RtecEventComm.idl \ + $(IDLDIR)\RtecScheduler.idl \ + $(IDLDIR)\RtecUDPAdmin.idl \ + $(IDLDIR)\TimeBase.idl \ + $(IDLDIR)\TimeService.idl + OBJFILES = \ - $(OBJDIR)\CosEventCommC.obj \ - $(OBJDIR)\CosEventCommS.obj \ + $(OBJDIR)\BasicLog_i.obj \ + $(OBJDIR)\BasicLogFactory_i.obj \ + $(OBJDIR)\BCU.obj \ + $(OBJDIR)\Config_Scheduler.obj \ + $(OBJDIR)\Constraint_Interpreter.obj \ + $(OBJDIR)\Constraint_l.obj \ + $(OBJDIR)\Constraint_Nodes.obj \ + $(OBJDIR)\Constraint_Visitors.obj \ + $(OBJDIR)\Constraint_y.obj \ + $(OBJDIR)\ConsumerAdmin_i.obj \ + $(OBJDIR)\CosEvent_Utilities.obj \ $(OBJDIR)\CosEventChannelAdminC.obj \ $(OBJDIR)\CosEventChannelAdminS.obj \ - $(OBJDIR)\CosNamingC.obj \ - $(OBJDIR)\CosNamingS.obj \ + $(OBJDIR)\CosEventCommC.obj \ + $(OBJDIR)\CosEventCommS.obj \ $(OBJDIR)\CosLifeCycleC.obj \ $(OBJDIR)\CosLifeCycleS.obj \ + $(OBJDIR)\CosNamingC.obj \ + $(OBJDIR)\CosNamingS.obj \ + $(OBJDIR)\CosNotificationC.obj \ + $(OBJDIR)\CosNotificationS.obj \ + $(OBJDIR)\CosNotifyChannelAdminC.obj \ + $(OBJDIR)\CosNotifyChannelAdminS.obj \ + $(OBJDIR)\CosNotifyCommC.obj \ + $(OBJDIR)\CosNotifyCommS.obj \ + $(OBJDIR)\CosNotifyFilterC.obj \ + $(OBJDIR)\CosNotifyFilterS.obj \ + $(OBJDIR)\CosPropertyService_i.obj \ $(OBJDIR)\CosPropertyServiceC.obj \ $(OBJDIR)\CosPropertyServiceS.obj \ $(OBJDIR)\CosTradingC.obj \ - $(OBJDIR)\CosTradingS.obj \ $(OBJDIR)\CosTradingDynamicC.obj \ $(OBJDIR)\CosTradingDynamicS.obj \ $(OBJDIR)\CosTradingReposC.obj \ $(OBJDIR)\CosTradingReposS.obj \ - $(OBJDIR)\EC_Negation_Filter.obj \ - $(OBJDIR)\ImplRepoC.obj \ - $(OBJDIR)\ImplRepoS.obj \ - $(OBJDIR)\LifeCycleServiceC.obj \ - $(OBJDIR)\LifeCycleServiceS.obj \ - $(OBJDIR)\TimeBaseC.obj \ - $(OBJDIR)\TimeBaseS.obj \ - $(OBJDIR)\RtecDefaultEventDataC.obj \ - $(OBJDIR)\RtecDefaultEventDataS.obj \ - $(OBJDIR)\RtecEventCommC.obj \ - $(OBJDIR)\RtecEventCommS.obj \ - $(OBJDIR)\RtecSchedulerC.obj \ - $(OBJDIR)\RtecSchedulerS.obj \ - $(OBJDIR)\RtecEventChannelAdminC.obj \ - $(OBJDIR)\RtecEventChannelAdminS.obj \ - $(OBJDIR)\RtecUDPAdminC.obj \ - $(OBJDIR)\RtecUDPAdminS.obj \ - $(OBJDIR)\TimeServiceC.obj \ - $(OBJDIR)\TimeServiceS.obj \ - \ - $(OBJDIR)\BCU.obj \ - $(OBJDIR)\Config_Scheduler.obj \ - $(OBJDIR)\Constraint_Interpreter.obj \ - $(OBJDIR)\Constraint_l.obj \ - $(OBJDIR)\Constraint_Nodes.obj \ - $(OBJDIR)\Constraint_Visitors.obj \ - $(OBJDIR)\Constraint_y.obj \ - $(OBJDIR)\ConsumerAdmin_i.obj \ - $(OBJDIR)\CosEvent_Utilities.obj \ - $(OBJDIR)\CosPropertyService_i.obj \ + $(OBJDIR)\CosTradingS.obj \ $(OBJDIR)\Dispatching_Modules.obj \ + $(OBJDIR)\DsLogAdminC.obj \ + $(OBJDIR)\DsLogAdminS.obj \ $(OBJDIR)\DynSched.obj \ $(OBJDIR)\EC_Basic_Factory.obj \ $(OBJDIR)\EC_Basic_Filter_Builder.obj \ @@ -73,6 +88,7 @@ OBJFILES = \ $(OBJDIR)\EC_Gateway.obj \ $(OBJDIR)\EC_Gateway_UDP.obj \ $(OBJDIR)\EC_MT_Dispatching.obj \ + $(OBJDIR)\EC_Negation_Filter.obj \ $(OBJDIR)\EC_Null_Factory.obj \ $(OBJDIR)\EC_Null_Scheduling.obj \ $(OBJDIR)\EC_ObserverStrategy.obj \ @@ -101,16 +117,43 @@ OBJFILES = \ $(OBJDIR)\Event_Utilities.obj \ $(OBJDIR)\EventChannel_i.obj \ $(OBJDIR)\Hash_Naming_Context.obj \ - $(OBJDIR)\Interpreter.obj \ - $(OBJDIR)\Interpreter_Utils.obj \ - $(OBJDIR)\Interpreter_Utils_T.obj \ + $(OBJDIR)\Interpreter.obj \ + $(OBJDIR)\Interpreter_Utils.obj \ $(OBJDIR)\IOR_Multicast.obj \ - $(OBJDIR)\IR_Helper.obj \ + $(OBJDIR)\Iterator_i.obj \ + $(OBJDIR)\LifeCycleServiceC.obj \ + $(OBJDIR)\LifeCycleServiceS.obj \ $(OBJDIR)\Local_ESTypes.obj \ + $(OBJDIR)\Log_Constraint_Interpreter.obj \ + $(OBJDIR)\Log_Constraint_Visitors.obj \ + $(OBJDIR)\Log_i.obj \ + $(OBJDIR)\LogMgr_i.obj \ + $(OBJDIR)\LogRecordStore.obj \ $(OBJDIR)\Memory_Pools.obj \ $(OBJDIR)\Module_Factory.obj \ - $(OBJDIR)\Naming_Context_Interface.obj \ + $(OBJDIR)\Naming_Context_Interface.obj \ $(OBJDIR)\Naming_Utils.obj \ + $(OBJDIR)\Notify_Constraint_Interpreter.obj \ + $(OBJDIR)\Notify_Constraint_Visitors.obj \ + $(OBJDIR)\Notify_ConsumerAdmin_i.obj \ + $(OBJDIR)\Notify_Dispatcher.obj \ + $(OBJDIR)\Notify_EventChannel_i.obj \ + $(OBJDIR)\Notify_EventChannelFactory_i.obj \ + $(OBJDIR)\Notify_Filter_i.obj \ + $(OBJDIR)\Notify_FilterAdmin_i.obj \ + $(OBJDIR)\Notify_FilterFactory_i.obj \ + $(OBJDIR)\Notify_ProxyConsumer_i.obj \ + $(OBJDIR)\Notify_ProxyPushConsumer_i.obj \ + $(OBJDIR)\Notify_ProxyPushSupplier_i.obj \ + $(OBJDIR)\Notify_ProxySupplier_i.obj \ + $(OBJDIR)\Notify_QoSAdmin_i.obj \ + $(OBJDIR)\Notify_StructuredProxyPushConsumer_i.obj \ + $(OBJDIR)\Notify_StructuredProxyPushSupplier_i.obj \ + $(OBJDIR)\Notify_StructuredPushConsumer.obj \ + $(OBJDIR)\Notify_StructuredPushSupplier.obj \ + $(OBJDIR)\Notify_SupplierAdmin_i.obj \ + $(OBJDIR)\NotifyPublish_i.obj \ + $(OBJDIR)\NotifySubscribe_i.obj \ $(OBJDIR)\Offer_Iterators.obj \ $(OBJDIR)\Persistent_Context_Index.obj \ $(OBJDIR)\Persistent_Entries.obj \ @@ -121,6 +164,16 @@ OBJFILES = \ $(OBJDIR)\Reconfig_Sched_Utils.obj \ $(OBJDIR)\Reconfig_Scheduler.obj \ $(OBJDIR)\RT_Task.obj \ + $(OBJDIR)\RtecDefaultEventDataC.obj \ + $(OBJDIR)\RtecDefaultEventDataS.obj \ + $(OBJDIR)\RtecEventChannelAdminC.obj \ + $(OBJDIR)\RtecEventChannelAdminS.obj \ + $(OBJDIR)\RtecEventCommC.obj \ + $(OBJDIR)\RtecEventCommS.obj \ + $(OBJDIR)\RtecSchedulerC.obj \ + $(OBJDIR)\RtecSchedulerS.obj \ + $(OBJDIR)\RtecUDPAdminC.obj \ + $(OBJDIR)\RtecUDPAdminS.obj \ $(OBJDIR)\Runtime_Scheduler.obj \ $(OBJDIR)\SchedEntry.obj \ $(OBJDIR)\Scheduler.obj \ @@ -135,39 +188,64 @@ OBJFILES = \ $(OBJDIR)\TAO_TIO.obj \ $(OBJDIR)\TAO_UTO.obj \ $(OBJDIR)\Time_Utilities.obj \ + $(OBJDIR)\TimeBaseC.obj \ + $(OBJDIR)\TimeBaseS.obj \ $(OBJDIR)\Timer_Helper.obj \ $(OBJDIR)\Timer_Module.obj \ + $(OBJDIR)\TimeServiceC.obj \ + $(OBJDIR)\TimeServiceS.obj \ $(OBJDIR)\Trader.obj \ - $(OBJDIR)\Trader_Constraint_Visitors.obj \ + $(OBJDIR)\Trader_Constraint_Visitors.obj \ $(OBJDIR)\Trader_Utils.obj \ - $(OBJDIR)\Transient_Naming_Context.obj + $(OBJDIR)\Transient_Naming_Context.obj \ + $(OBJDIR)\Offer_Database.obj \ + $(OBJDIR)\Trader_Interfaces.obj RESOURCE = $(OBJDIR)\orbsvcs.res CFLAGS = $(ACE_CFLAGS) $(TAO_CFLAGS) $(ORBSVCS_BUILD_CFLAGS) $(ORBSVCS_CFLAGS) -CPPDIR = .;AV;Event;concurrency;Sched;Trader;Naming;CosEvent;Time;Property;Log +CPPDIR = .;AV;Event;concurrency;Sched;Trader;Naming;CosEvent;Time;Property;Log;Notify IDLDIR = . LIBFILES = $(ACE_LIB) $(TAO_LIB) +all: idl_src_files orbsvcs_lib + !include <$(ACE_ROOT)\include\makeinclude\build_core_library.bor> +orbsvcs_lib: $(TARGET) + + # # IDL Build rules # +idl_src_files: $(IDLFILES:.idl=C.cpp) $(IDLFILES:.idl=S.cpp) + +$(IDLDIR)\CosEventChannelAdminC.cpp $(IDLDIR)\CosEventChannelAdminS.cpp: $(IDLDIR)\CosEventChannelAdmin.idl + $(TAO_IDL) $** + $(IDLDIR)\CosEventCommC.cpp $(IDLDIR)\CosEventCommS.cpp: $(IDLDIR)\CosEventComm.idl $(TAO_IDL) $** -$(IDLDIR)\CosEventChannelAdminC.cpp $(IDLDIR)\CosEventChannelAdminS.cpp: $(IDLDIR)\CosEventChannelAdmin.idl +$(IDLDIR)\CosLifeCycleC.cpp $(IDLDIR)\CosLifeCycleS.cpp: $(IDLDIR)\CosLifeCycle.idl $(TAO_IDL) $** $(IDLDIR)\CosNamingC.cpp $(IDLDIR)\CosNamingS.cpp: $(IDLDIR)\CosNaming.idl $(TAO_IDL) $** -$(IDLDIR)\CosLifeCycleC.cpp $(IDLDIR)\CosLifeCycleS.cpp: $(IDLDIR)\CosLifeCycle.idl +$(IDLDIR)\CosNotificationC.cpp $(IDLDIR)\CosNotificationS.cpp: $(IDLDIR)\CosNotification.idl + $(TAO_IDL) $** + +$(IDLDIR)\CosNotifyChannelAdminC.cpp $(IDLDIR)\CosNotifyChannelAdminS.cpp: $(IDLDIR)\CosNotifyChannelAdmin.idl + $(TAO_IDL) $** + +$(IDLDIR)\CosNotifyCommC.cpp $(IDLDIR)\CosNotifyCommS.cpp: $(IDLDIR)\CosNotifyComm.idl + $(TAO_IDL) $** + +$(IDLDIR)\CosNotifyFilterC.cpp $(IDLDIR)\CosNotifyFilterS.cpp: $(IDLDIR)\CosNotifyFilter.idl $(TAO_IDL) $** $(IDLDIR)\CosPropertyServiceC.cpp $(IDLDIR)\CosPropertyServiceS.cpp: $(IDLDIR)\CosPropertyService.idl @@ -182,7 +260,7 @@ $(IDLDIR)\CosTradingDynamicC.cpp $(IDLDIR)\CosTradingDynamicS.cpp: $(IDLDIR)\Cos $(IDLDIR)\CosTradingReposC.cpp $(IDLDIR)\CosTradingReposS.cpp: $(IDLDIR)\CosTradingRepos.idl $(TAO_IDL) $** -$(IDLDIR)\ImplRepoC.cpp $(IDLDIR)\ImplRepoS.cpp: $(IDLDIR)\ImplRepo.idl +$(IDLDIR)\DsLogAdminC.cpp $(IDLDIR)\DsLogAdminS.cpp: $(IDLDIR)\DsLogAdmin.idl $(TAO_IDL) $** $(IDLDIR)\LifeCycleServiceC.cpp $(IDLDIR)\LifeCycleServiceS.cpp: $(IDLDIR)\LifeCycleService.idl @@ -191,13 +269,13 @@ $(IDLDIR)\LifeCycleServiceC.cpp $(IDLDIR)\LifeCycleServiceS.cpp: $(IDLDIR)\LifeC $(IDLDIR)\RtecDefaultEventDataC.cpp $(IDLDIR)\RtecDefaultEventDataS.cpp: $(IDLDIR)\RtecDefaultEventData.idl $(TAO_IDL) $** -$(IDLDIR)\RtecEventCommC.cpp $(IDLDIR)\RtecEventCommS.cpp: $(IDLDIR)\RtecEventComm.idl +$(IDLDIR)\RtecEventChannelAdminC.cpp $(IDLDIR)\RtecEventChannelAdminS.cpp: $(IDLDIR)\RtecEventChannelAdmin.idl $(TAO_IDL) $** -$(IDLDIR)\RtecSchedulerC.cpp $(IDLDIR)\RtecSchedulerS.cpp: $(IDLDIR)\RtecScheduler.idl +$(IDLDIR)\RtecEventCommC.cpp $(IDLDIR)\RtecEventCommS.cpp: $(IDLDIR)\RtecEventComm.idl $(TAO_IDL) $** -$(IDLDIR)\RtecEventChannelAdminC.cpp $(IDLDIR)\RtecEventChannelAdminS.cpp: $(IDLDIR)\RtecEventChannelAdmin.idl +$(IDLDIR)\RtecSchedulerC.cpp $(IDLDIR)\RtecSchedulerS.cpp: $(IDLDIR)\RtecScheduler.idl $(TAO_IDL) $** $(IDLDIR)\RtecUDPAdminC.cpp $(IDLDIR)\RtecUDPAdminS.cpp: $(IDLDIR)\RtecUDPAdmin.idl diff --git a/TAO/tao/Makefile.bor b/TAO/tao/Makefile.bor index 8ec7804913a..6c18f2d6e9b 100644 --- a/TAO/tao/Makefile.bor +++ b/TAO/tao/Makefile.bor @@ -51,6 +51,8 @@ OBJFILES = \ $(OBJDIR)\IIOP_Factory.obj \ $(OBJDIR)\IIOP_Profile.obj \ $(OBJDIR)\IIOP_Transport.obj \ + $(OBJDIR)\ImplRepoC.obj \ + $(OBJDIR)\ImplRepoS.obj \ $(OBJDIR)\InconsistentTypeCodeC.obj \ $(OBJDIR)\Interceptor.obj \ $(OBJDIR)\InterceptorC.obj \ @@ -658,7 +658,6 @@ Darren DeRidder <darren.deridder@bridgewatersys.com> John Tucker <jtucker@infoglide.com> Oleg Orlov <orlov@diasoft.ru> Timothy Canham <Timothy.Canham@jpl.nasa.gov> -Chris Uzdavinis <chris@uzdavinis.com> Randy Heiland <heiland@ncsa.uiuc.edu> Joyce Fu <fu@gsao.med.ge.com> Surender Kumar <csk037@lmpsil02.comm.mot.com> diff --git a/ace/Auto_IncDec_T.cpp b/ace/Auto_IncDec_T.cpp index d915b51e672..68497c4e1bd 100644 --- a/ace/Auto_IncDec_T.cpp +++ b/ace/Auto_IncDec_T.cpp @@ -1,32 +1,157 @@ // $Id$ -#ifndef ACE_AUTO_INCDEC_T_C -#define ACE_AUTO_INCDEC_T_C +//============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// Auto_IncDec_Test.cpp +// +// = DESCRIPTION +// This is a simple test of the Auto Increment/Decrement Class in +// ACE. +// +// = AUTHOR +// Edan Ayal <EdanA@cti2.com> +// +//============================================================================ -#define ACE_BUILD_DLL +#include "ace/Auto_IncDec_T.h" +#include "ace/Thread_Manager.h" +#include "tests/test_config.h" -#if !defined (ACE_LACKS_PRAGMA_ONCE) -# pragma once -#endif /* ACE_LACKS_PRAGMA_ONCE */ +ACE_RCSID(tests, Auto_IncDec_Test, "Auto_IncDec_Test.cpp, by Edan Ayal") -#include "ace/Auto_IncDec_T.h" -#include "ace/Log_Msg.h" +#if defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 +USELIB("..\ace\aced.lib"); +//--------------------------------------------------------------------------- +#endif /* defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 */ -ACE_RCSID(ace, Auto_IncDec_T, "Auto_IncDec_T.cpp, by Edan Ayal") +#if defined (ACE_HAS_THREADS) -#if !defined (__ACE_INLINE__) -#include "ace/Auto_IncDec_T.i" -#endif /* __ACE_INLINE__ */ +// Default number of threads. +static size_t n_threads = 15; -ACE_ALLOC_HOOK_DEFINE(ACE_Auto_IncDec) +typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> INTERLOCKED_INT; +static INTERLOCKED_INT current_threads_in_first_section; +static INTERLOCKED_INT current_threads_in_second_section; -template <class ACE_SAFELY_INCREMENTABLE_DECREMENTABLE> void -ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::dump (void) const +static void * +worker (void *) { -// ACE_TRACE ("ACE_Auto_IncDec<ACE_SAFELY_INCREMENTABLE_DECREMENTABLE>::dump"); + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT (" (%t) worker starting\n"))); + + { // First section. + ACE_Auto_IncDec<INTERLOCKED_INT> threads_in_section_auto_inc_dec + (current_threads_in_first_section); + + // Wait according to the number of threads... + ACE_Time_Value pause (current_threads_in_first_section.value (), + 0); + ACE_OS::sleep (pause); + } - ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); - ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); + { // Second section. + ACE_Auto_IncDec<INTERLOCKED_INT> threads_in_section_auto_inc_dec + (current_threads_in_second_section); + + // Wait according to the number of threads inside the previous + // section... + ACE_Time_Value pause (current_threads_in_first_section.value (), + 0); + ACE_OS::sleep (pause); + } + + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT (" (%t) worker exiting\n"))); + return 0; } -#endif /* ACE_AUTO_INCDEC_T_C */ +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; +template class ACE_Auto_IncDec<ACE_Atomic_Op<ACE_Thread_Mutex, int> >; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Atomic_Op<ACE_Thread_Mutex, int> +#pragma instantiate ACE_Auto_IncDec<ACE_Atomic_Op<ACE_Thread_Mutex, int> > +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +#else +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Auto_IncDec<int>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Auto_IncDec<int> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ +#endif /* ACE_HAS_THREADS */ + +// Spawn off threads. + +int +main (int, ASYS_TCHAR *[]) +{ + ACE_START_TEST (ASYS_TEXT ("Auto_IncDec_Test")); + +#if defined (ACE_HAS_THREADS) + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT (" (%t) main thread starting\n"))); + + current_threads_in_first_section = 0; + current_threads_in_second_section = 0; + + if (ACE_Thread_Manager::instance ()->spawn_n + (n_threads, + ACE_THR_FUNC (worker), + 0, + THR_NEW_LWP) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("%p\n"), + ASYS_TEXT ("spawn_n")), + -1); + // Make sure at least one thread is started... + ACE_Thread::yield (); + + while (ACE_Thread_Manager::instance ()->count_threads ()) + { + // wait according to the number of threads... + ACE_DEBUG ((LM_DEBUG, + " %d in first section, %d in second section\n", + current_threads_in_first_section.value (), + current_threads_in_second_section.value ())); + + ACE_Time_Value pause (1, 0); + ACE_OS::sleep (pause); + } + + ACE_Thread_Manager::instance ()->wait (); + + ACE_ASSERT (current_threads_in_first_section.value () == 0 + && current_threads_in_second_section.value () == 0); + + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT (" (%t) exiting main thread\n"))); +#else + int counter = 0; + { + ACE_Auto_IncDec<int> Auto_IncDec1 (counter); + ACE_ASSERT (counter == 1); + + ACE_Auto_IncDec<int> Auto_IncDec2 (counter); + ACE_ASSERT (counter == 2); + + { + ACE_ASSERT (counter == 2); + ACE_Auto_IncDec<int> Auto_IncDec3 (counter); + ACE_ASSERT (counter == 3); + } + + ACE_ASSERT (counter == 2); + } + + ACE_ASSERT (counter == 0); + +#endif /* ACE_HAS_THREADS */ + + ACE_END_TEST; + return 0; +} diff --git a/ace/Makefile.bor b/ace/Makefile.bor index 68dcb1dda72..ecab3ea6eae 100644 --- a/ace/Makefile.bor +++ b/ace/Makefile.bor @@ -16,7 +16,9 @@ OBJFILES = \ $(OBJDIR)\Asynch_IO_Impl.obj \ $(OBJDIR)\Based_Pointer_Repository.obj \ $(OBJDIR)\Basic_Types.obj \ + $(OBJDIR)\Capabilities.obj \ $(OBJDIR)\CDR_Stream.obj \ + $(OBJDIR)\Configuration.obj \ $(OBJDIR)\Containers.obj \ $(OBJDIR)\CORBA_Handler.obj \ $(OBJDIR)\CORBA_Ref.obj \ @@ -5142,6 +5142,10 @@ typedef double ACE_timer_t; typedef int ACE_Rusage; # endif /* ACE_HAS_PRUSAGE_T */ +#if defined (ACE_HAS_SYS_FILIO_H) +# include /**/ <sys/filio.h> +#endif /* ACE_HAS_SYS_FILIO_H */ + # if defined (ACE_WIN32) // = typedef for the _stat data structure typedef struct _stat ACE_stat; @@ -5307,8 +5311,8 @@ private: u_long minimum_policed_size_; int ttl_; int priority_; -#endif - +#endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \ + defined (ACE_HAS_WINSOCK2_GQOS) */ }; #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -89,10 +89,6 @@ extern "C" void * _dlsym (void *, const char *); # include /**/ <sysent.h> #endif /* ACE_HAS_SYSENT_H_*/ -#if defined (ACE_HAS_SYS_FILIO_H) -# include /**/ <sys/filio.h> -#endif /* ACE_HAS_SYS_FILIO_H */ - #if defined (ACE_HAS_SVR4_GETTIMEOFDAY) # if !defined (m88k) && !defined (SCO) extern "C" int gettimeofday (struct timeval *tp, void * = 0); diff --git a/tests/Makefile.bor b/tests/Makefile.bor index fae1b218d22..cdaa9546c89 100644 --- a/tests/Makefile.bor +++ b/tests/Makefile.bor @@ -7,12 +7,14 @@ TESTS = \ Aio_Platform_Test \ Atomic_Op_Test \ + Auto_IncDec_Test \ Barrier_Test \ Basic_Types_Test \ Buffer_Stream_Test \ Cache_Map_Manager_Test \ Cached_Conn_Test \ Cached_Accept_Conn_Test \ + Capabilities_Test \ CDR_Test \ Collection_Test \ Conn_Test \ diff --git a/tests/Malloc_Test.cpp b/tests/Malloc_Test.cpp index 361f493a52e..d974ef23ebd 100644 --- a/tests/Malloc_Test.cpp +++ b/tests/Malloc_Test.cpp @@ -23,7 +23,7 @@ #include "ace/Auto_Ptr.h" #include "Malloc_Test.h" -ACE_RCSID(tests, SV_Shared_Memory_Test, "$Id$") +ACE_RCSID(tests, SV_Shared_Memory_Test, "Malloc_Test.cpp,v 4.22 1999/12/13 22:24:42 nanbor Exp") #if defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 USELIB("..\ace\aced.lib"); @@ -47,6 +47,16 @@ typedef ACE_Malloc<ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> MALLOC; // occur. #endif /* linux */ +#if defined (ACE_WIN32) +// When looking for the file to execute a process on Win32, the directory from +// containing the parent process file is searched first. Since certain Win32 +// configurations (e.g. Borland C++Builder) put the output files in a different +// directory we will use this feature rather than specifying '.\'. +# define EXE_LOCATION ACE_TEXT ("") +#else +# define EXE_LOCATION ACE_TEXT (".") ACE_DIRECTORY_SEPARATOR_STR +#endif /*ACE_WIN32*/ + // Parents <ACE_Malloc> base address in shared memory. static const void *PARENT_BASE_ADDR = ACE_DEFAULT_BASE_ADDR; @@ -279,8 +289,7 @@ main (int argc, ASYS_TCHAR *[]) // No arguments means we're the parent process. ACE_Process_Options options (1); - options.command_line (ACE_TEXT (".") - ACE_DIRECTORY_SEPARATOR_STR + options.command_line (EXE_LOCATION ACE_TEXT ("Malloc_Test") ACE_PLATFORM_EXE_SUFFIX ACE_TEXT (" run_as_test")); diff --git a/tests/run_tests.bat b/tests/run_tests.bat index dda96016f5f..bffe105d7d9 100644 --- a/tests/run_tests.bat +++ b/tests/run_tests.bat @@ -1,5 +1,5 @@ @echo off -rem $Id$ +rem run_tests.bat,v 4.71 1999/11/08 05:39:06 nanbor Exp rem To run this script, the first argument must be either bor rem or msc. This will determine if the borland tests are run, or @@ -62,7 +62,7 @@ if not "%arg%" == "" goto runtest :runall -call %run_cmd% %dopure% %platform% ACE_Init_Test +if not "%platform%" == "bor" call %run_cmd% %dopure% %platform% ACE_Init_Test call %run_cmd% %dopure% %platform% Atomic_Op_Test call %run_cmd% %dopure% %platform% Auto_IncDec_Test call %run_cmd% %dopure% %platform% Barrier_Test |