diff options
Diffstat (limited to 'examples')
371 files changed, 0 insertions, 46994 deletions
diff --git a/examples/ASX/CCM_App/CCM_App.cpp b/examples/ASX/CCM_App/CCM_App.cpp deleted file mode 100644 index e0330cf53de..00000000000 --- a/examples/ASX/CCM_App/CCM_App.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#define ACE_BUILD_SVC_DLL -// $Id$ - -#include "ace/Stream.h" -#include "ace/Task.h" -#include "ace/Module.h" - -typedef ACE_Task<ACE_SYNCH> MT_Task; -typedef ACE_Stream<ACE_SYNCH> MT_Stream; -typedef ACE_Module<ACE_SYNCH> MT_Module; - -class ACE_Svc_Export Test_Task : public MT_Task -{ -public: - virtual int open (void *); - virtual int close (u_long); - virtual int init (int, char *[]); - virtual int fini (void); - virtual int suspend (void); - virtual int resume (void); -}; - -int -Test_Task::open (void *) -{ - ACE_DEBUG ((LM_DEBUG, "opening %s\n", this->name () ? this->name () : "task")); - return 0; -} - -int -Test_Task::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "closing %s\n", this->name () ? this->name () : "task")); - return 0; -} - -int -Test_Task::suspend (void) -{ - ACE_DEBUG ((LM_DEBUG, "suspending in %s\n", this->name () ? this->name () : "task")); - return 0; -} - -int -Test_Task::resume (void) -{ - ACE_DEBUG ((LM_DEBUG, "resuming in %s\n", this->name () ? this->name () : "task")); - return 0; -} - -int -Test_Task::init (int, char *[]) -{ - ACE_DEBUG ((LM_DEBUG, "initializing %s\n", this->name () ? this->name () : "task")); - - return 0; -} - -int -Test_Task::fini (void) -{ - ACE_DEBUG ((LM_DEBUG, "finalizing %s\n", this->name () ? this->name () : "task")); - return 0; -} - -// Dynamically linked functions used to control configuration. - -extern "C" ACE_Svc_Export MT_Stream *make_stream (void); -extern "C" ACE_Svc_Export MT_Module *make_da (void); -extern "C" ACE_Svc_Export MT_Module *make_ea (void); -extern "C" ACE_Svc_Export MT_Module *make_mr (void); -extern "C" ACE_Svc_Export ACE_Service_Object *make_task (void); - -ACE_Service_Object * -make_task (void) -{ - return new Test_Task; -} - -MT_Stream * -make_stream (void) -{ - return new MT_Stream; -} - -MT_Module * -make_da (void) -{ - return new MT_Module ("Device_Adapter", new Test_Task, new Test_Task); -} - -MT_Module * -make_ea (void) -{ - return new MT_Module ("Event_Analyzer", new Test_Task, new Test_Task); -} - -MT_Module * -make_mr (void) -{ - return new MT_Module ("Multicast_Router", new Test_Task, new Test_Task); -} diff --git a/examples/ASX/CCM_App/Makefile b/examples/ASX/CCM_App/Makefile deleted file mode 100644 index 6f03c075e2e..00000000000 --- a/examples/ASX/CCM_App/Makefile +++ /dev/null @@ -1,158 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for CCM tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = SC_Client \ - SC_Server - -LSRC = $(addsuffix .cpp,$(BIN)) \ - CCM_App.cpp - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VSHLIB) $(SHLIBA) $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/SC_Client.o .shobj/SC_Client.so: SC_Client.cpp -.obj/SC_Server.o .shobj/SC_Server.so: SC_Server.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/CCM_App.o .shobj/CCM_App.so: CCM_App.cpp \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/ASX/CCM_App/SC_Client.cpp b/examples/ASX/CCM_App/SC_Client.cpp deleted file mode 100644 index b1dc59ae2ee..00000000000 --- a/examples/ASX/CCM_App/SC_Client.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// Pretty simple, eh? ;-) -// $Id$ - - -int -main (int, char *[]) -{ - return 0; -} diff --git a/examples/ASX/CCM_App/SC_Server.cpp b/examples/ASX/CCM_App/SC_Server.cpp deleted file mode 100644 index df46bd50149..00000000000 --- a/examples/ASX/CCM_App/SC_Server.cpp +++ /dev/null @@ -1,63 +0,0 @@ -// Simple driver program for the server. -// $Id$ - - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Signal.h" - -class Event_Handler : public ACE_Event_Handler -{ -public: - virtual int handle_input (ACE_HANDLE handle); - virtual int handle_close (ACE_HANDLE, - ACE_Reactor_Mask); -}; - -int -Event_Handler::handle_input (ACE_HANDLE handle) -{ - char buf[BUFSIZ]; - - ssize_t n = ACE_OS::read (handle, buf, sizeof buf); - - if (n == -1) - return -1; - else if (ACE_OS::write (ACE_STDOUT, buf, n) != n) - return -1; - else - return 0; -} - -int -Event_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "closing Event_Handler\n")); - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config loggerd; - Event_Handler handler; - ACE_Sig_Adapter shutdown_handler ((ACE_Sig_Handler_Ex) ACE_Service_Config::end_reactor_event_loop); - - if (ACE::register_stdin_handler (&handler, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); - - if (loggerd.open (argc, argv) == -1 && errno != ENOENT) - ACE_ERROR ((LM_ERROR, "%p\n%a", "open", 1)); - - else if (ACE_Service_Config::reactor ()->register_handler - (SIGINT, &shutdown_handler) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); - - // Perform logging service until we receive SIGINT. - - loggerd.run_reactor_event_loop (); - - return 0; -} diff --git a/examples/ASX/CCM_App/svc.conf b/examples/ASX/CCM_App/svc.conf deleted file mode 100644 index f77d9b14d9d..00000000000 --- a/examples/ASX/CCM_App/svc.conf +++ /dev/null @@ -1,21 +0,0 @@ -static ACE_Service_Manager "-d -p 4911" - -dynamic My_Task Service_Object *.shobj/CCM_App:make_task() "-p 3000" - -stream dynamic CCM_App STREAM *.shobj/CCM_App:make_stream() active -{ - dynamic Device_Adapter Module *.shobj/CCM_App:make_da() - dynamic Event_Analyzer Module *.shobj/CCM_App:make_ea() - dynamic Multicast_Router Module *.shobj/CCM_App:make_mr() "-p 3001" -} - -stream CCM_App -{ - remove Device_Adapter - remove Event_Analyzer - remove Multicast_Router -} - -remove CCM_App -remove My_Task - diff --git a/examples/ASX/Event_Server/Event_Server/Consumer_Router.cpp b/examples/ASX/Event_Server/Event_Server/Consumer_Router.cpp deleted file mode 100644 index 67c61bca9b4..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Consumer_Router.cpp +++ /dev/null @@ -1,138 +0,0 @@ -// $Id$ - -#include "Consumer_Router.h" -#include "Options.h" - -Consumer_Router::Consumer_Router (Peer_Router_Context *prc) - : Peer_Router (prc) -{ -} - -// Initialize the Router. - -int -Consumer_Router::open (void *) -{ - if (this->is_writer ()) - { - // Set the Peer_Router_Context to point back to us so that if - // any Consumer's "accidentally" send us data we'll be able to - // handle it. - this->context ()->peer_router (this); - - // Make this an active object to handle the error cases in a - // separate thread. - return this->activate (Options::instance ()->t_flags ()); - } - else // if (this->is_reader ()) - - // Nothing to do since this side is primarily used to transmit to - // Consumers, rather than receive. - return 0; -} - -int -Consumer_Router::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing Consumer_Router %s\n", - this->is_reader () ? "reader" : "writer")); - - if (this->is_writer ()) - // Inform the thread to shut down. - this->msg_queue ()->deactivate (); - - // Both writer and reader call release(), so the context knows when - // to clean itself up. - this->context ()->release (); - return 0; -} - -// Handle incoming messages in a separate thread. - -int -Consumer_Router::svc (void) -{ - assert (this->is_writer ()); - - ACE_Thread_Control tc (this->thr_mgr ()); - - ACE_DEBUG ((LM_DEBUG, - "(%t) starting svc in Consumer_Router\n")); - - for (ACE_Message_Block *mb = 0; - this->getq (mb) >= 0; - ) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) warning: Consumer_Router is forwarding a message to Supplier_Router\n")); - - // Pass this message down to the next Module's writer Task. - if (this->put_next (mb) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%t) send_peers failed in Consumer_Router\n"), - -1); - } - - ACE_DEBUG ((LM_DEBUG, - "(%t) stopping svc in Consumer_Router\n")); - return 0; - // Note the implicit ACE_OS::thr_exit() via destructor. -} - -// Send a <Message_Block> to the supplier(s). - -int -Consumer_Router::put (ACE_Message_Block *mb, - ACE_Time_Value *) -{ - // Perform the necessary control operations before passing - // the message down the stream. - - if (mb->msg_type () == ACE_Message_Block::MB_IOCTL) - { - this->control (mb); - return this->put_next (mb); - } - - // If we're the reader side then we're responsible for broadcasting - // messages to Consumers. - - else if (this->is_reader ()) - { - if (this->context ()->send_peers (mb) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%t) send_peers failed in Consumer_Router\n"), - -1); - else - return 0; - } - else // if (this->is_writer ()) - - // Queue up the message to processed by Consumer_Router::svc(). - // Since we don't expect to be getting many of these messages, we - // queue them up and run them in a separate thread to avoid taxing - // the main thread. - return this->putq (mb); -} -// Return information about the Client_Router ACE_Module. - -int -Consumer_Router::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_INET_Addr addr; - const char *mod_name = this->name (); - - if (this->context ()->acceptor ().get_local_addr (addr) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s\t %d/%s %s (%s)\n", - mod_name, addr.get_port_number (), "tcp", - "# consumer router", this->is_reader () ? "reader" : "writer"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (mod_name)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, mod_name, length); - return ACE_OS::strlen (mod_name); -} diff --git a/examples/ASX/Event_Server/Event_Server/Consumer_Router.h b/examples/ASX/Event_Server/Event_Server/Consumer_Router.h deleted file mode 100644 index cdaf7090b97..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Consumer_Router.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (_CONSUMER_ROUTER_H) -#define _CONSUMER_ROUTER_H - -#include "ace/SOCK_Acceptor.h" -#include "ace/UPIPE_Acceptor.h" -#include "ace/Svc_Handler.h" -#include "Peer_Router.h" - -class Consumer_Router : public Peer_Router - // = TITLE - // Provides the interface between one or more Consumers and the - // Event Server ACE_Stream. -{ -public: - Consumer_Router (Peer_Router_Context *prc); - // Initialization method. - -protected: - // = ACE_Task hooks. - - // All of these methods are called via base class pointers by the - // ACE Stream apparatus. Therefore, we can put them in the - // protected section. - - virtual int open (void *a = 0); - // Called by the Stream to initialize the router. - - virtual int close (u_long flags = 0); - // Called by the Stream to shutdown the router. - - virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0); - // Called by the Consumer_Handler to pass a message to the Router. - // The Router queues up this message, which is then processed in the - // <svc> method in a separate thread. - - virtual int svc (void); - // Runs in a separate thread to dequeue messages and pass them up - // the stream. - - // = Dynamic linking hooks. - - virtual int info (char **info_string, size_t length) const; - // Returns information about this service. -}; - -#endif /* _CONSUMER_ROUTER_H */ diff --git a/examples/ASX/Event_Server/Event_Server/Event_Analyzer.cpp b/examples/ASX/Event_Server/Event_Server/Event_Analyzer.cpp deleted file mode 100644 index 5f90e1941ad..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Event_Analyzer.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// $Id$ - -#include "Options.h" -#include "Event_Analyzer.h" - -int -Event_Analyzer::open (void *) -{ - return 0; -} - -int -Event_Analyzer::close (u_long) -{ - return 0; -} - -int -Event_Analyzer::control (ACE_Message_Block *mb) -{ - ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr (); - ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd; - - switch (cmd = ioc->cmd ()) - { - case ACE_IO_Cntl_Msg::SET_LWM: - case ACE_IO_Cntl_Msg::SET_HWM: - this->water_marks (cmd, *(size_t *) mb->cont ()->rd_ptr ()); - break; - default: - break; - } - return 0; -} - -int -Event_Analyzer::put (ACE_Message_Block *mb, ACE_Time_Value *) -{ - if (Options::instance ()->debug ()) - ACE_DEBUG ((LM_DEBUG, "(%t) passing through Event_Analyser::put() (%s)\n", - this->is_reader () ? "reader" : "writer")); - - if (mb->msg_type () == ACE_Message_Block::MB_IOCTL) - this->control (mb); - - return this->put_next (mb); -} - -int -Event_Analyzer::init (int, char *[]) -{ - return 0; -} - -int -Event_Analyzer::fini (void) -{ - return 0; -} - -int -Event_Analyzer::info (char **strp, size_t length) const -{ - const char *mod_name = this->name (); - - if (*strp == 0 && (*strp = ACE_OS::strdup (mod_name)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, mod_name, length); - return ACE_OS::strlen (mod_name); -} diff --git a/examples/ASX/Event_Server/Event_Server/Event_Analyzer.h b/examples/ASX/Event_Server/Event_Server/Event_Analyzer.h deleted file mode 100644 index a9497730421..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Event_Analyzer.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (_EVENT_ANALYZER_H) -#define _EVENT_ANALYZER_H - -#include "ace/Stream.h" -#include "ace/Module.h" -#include "ace/Task.h" -#include "ace/Synch.h" - -class Event_Analyzer : public ACE_Task<ACE_SYNCH> - // = TITLE - // This is a "no-op" class that just forwards all its message - // blocks onto its neighboring Module in the Stream. In a real - // application these tasks would be where the Stream processing - // would go. -{ -public: - virtual int open (void *a = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0); - - // Dynamic linking hooks. - virtual int init (int argc, char *argv[]); - virtual int fini (void); - virtual int info (char **info_string, size_t length) const; - -private: - virtual int control (ACE_Message_Block *); -}; - -#endif /* _EVENT_ANALYZER_H */ diff --git a/examples/ASX/Event_Server/Event_Server/Makefile b/examples/ASX/Event_Server/Event_Server/Makefile deleted file mode 100644 index 72dbafcb086..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Makefile +++ /dev/null @@ -1,347 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Event Server test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = event_server - -FILES = Options \ - Supplier_Router \ - Event_Analyzer \ - Consumer_Router \ - Peer_Router - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LDLIBS = $(addprefix .shobj/,$(SHOBJ)) -#### -lGateway is needed for template instantiations with g++ -fno-implicit-templates -LIBS = -lGateway - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Options.o .shobj/Options.so: Options.cpp \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread.h Options.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - Options.i -.obj/Supplier_Router.o .shobj/Supplier_Router.so: Supplier_Router.cpp Supplier_Router.h \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - Peer_Router.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - Options.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - Options.i -.obj/Event_Analyzer.o .shobj/Event_Analyzer.so: Event_Analyzer.cpp Options.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - Options.i Event_Analyzer.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/Consumer_Router.o .shobj/Consumer_Router.so: Consumer_Router.cpp Consumer_Router.h \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.i \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - Peer_Router.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - Options.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - Options.i -.obj/Peer_Router.o .shobj/Peer_Router.so: Peer_Router.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Get_Opt.h Options.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - Options.i Peer_Router.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/ASX/Event_Server/Event_Server/Options.cpp b/examples/ASX/Event_Server/Event_Server/Options.cpp deleted file mode 100644 index 1255bbecf6a..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Options.cpp +++ /dev/null @@ -1,191 +0,0 @@ -// $Id$ - -#include "ace/Get_Opt.h" -#include "ace/Synch.h" -#include "ace/Thread.h" - -#include "Options.h" - -/* static */ -Options *Options::instance_ = 0; - -Options * -Options::instance (void) -{ - if (Options::instance_ == 0) - Options::instance_ = new Options; - - return Options::instance_; -} - -Options::Options (void) - : thr_count_ (4), - t_flags_ (THR_DETACHED), - high_water_mark_ (8 * 1024), - low_water_mark_ (1024), - message_size_ (128), - initial_queue_length_ (0), - iterations_ (100000), - debugging_ (0), - verbosity_ (0), - consumer_port_ (ACE_DEFAULT_SERVER_PORT), - supplier_port_ (ACE_DEFAULT_SERVER_PORT + 1) -{ -} - -Options::~Options (void) -{ -} - -void Options::print_results (void) -{ -#if !defined (ACE_WIN32) - ACE_Profile_Timer::ACE_Elapsed_Time et; - ACE_Profile_Timer::Rusage rusage; - - this->itimer_.elapsed_time (et); - this->itimer_.get_rusage (rusage); - - if (this->verbose ()) - { -#if defined (ACE_HAS_PRUSAGE_T) - ACE_OS::printf ("final concurrency hint = %d\n", ACE_Thread::getconcurrency ()); - ACE_OS::printf ("%8d = lwpid\n" - "%8d = lwp count\n" - "%8d = minor page faults\n" - "%8d = major page faults\n" - "%8d = input blocks\n" - "%8d = output blocks\n" - "%8d = messages sent\n" - "%8d = messages received\n" - "%8d = signals received\n" - "%8ds, %dms = wait-cpu (latency) time\n" - "%8ds, %dms = user lock wait sleep time\n" - "%8ds, %dms = all other sleep time\n" - "%8d = voluntary context switches\n" - "%8d = involuntary context switches\n" - "%8d = system calls\n" - "%8d = chars read/written\n", - rusage.pr_lwpid, - rusage.pr_count, - rusage.pr_minf, - rusage.pr_majf, - rusage.pr_inblk, - rusage.pr_oublk, - rusage.pr_msnd, - rusage.pr_mrcv, - rusage.pr_sigs, - rusage.pr_wtime.tv_sec, rusage.pr_wtime.tv_nsec / 1000000, - rusage.pr_ltime.tv_sec, rusage.pr_ltime.tv_nsec / 1000000, - rusage.pr_slptime.tv_sec, rusage.pr_slptime.tv_nsec / 1000000, - rusage.pr_vctx, - rusage.pr_ictx, - rusage.pr_sysc, - rusage.pr_ioch); -#else - /* Someone needs to write the corresponding dump for rusage... */ -#endif /* ACE_HAS_PRUSAGE_T */ - } - - ACE_OS::printf ("---------------------\n" - "real time = %.3f\n" - "user time = %.3f\n" - "system time = %.3f\n" - "---------------------\n", - et.real_time, et.user_time, et.system_time); -#endif /* ACE_WIN32 */ -} - -void -Options::parse_args (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - - ACE_Get_Opt get_opt (argc, argv, "c:bdH:i:L:l:M:ns:t:T:v"); - int c; - - while ((c = get_opt ()) != EOF) - switch (c) - { - case 'b': - this->t_flags (THR_BOUND); - break; - case 'c': - this->consumer_port (ACE_OS::atoi (get_opt.optarg)); - break; - case 'd': - this->debugging_ = 1; - break; - case 'H': - this->high_water_mark (ACE_OS::atoi (get_opt.optarg)); - break; - case 'i': - this->iterations (ACE_OS::atoi (get_opt.optarg)); - break; - case 'L': - this->low_water_mark (ACE_OS::atoi (get_opt.optarg)); - break; - case 'l': - this->initial_queue_length (ACE_OS::atoi (get_opt.optarg)); - break; - case 'M': - this->message_size (ACE_OS::atoi (get_opt.optarg)); - break; - case 'n': - this->t_flags (THR_NEW_LWP); - break; - case 's': - this->supplier_port (ACE_OS::atoi (get_opt.optarg)); - break; - case 'T': - if (ACE_OS::strcasecmp (get_opt.optarg, "ON") == 0) - ACE_Trace::start_tracing (); - else if (ACE_OS::strcasecmp (get_opt.optarg, "OFF") == 0) - ACE_Trace::stop_tracing (); - break; - case 't': - this->thr_count (ACE_OS::atoi (get_opt.optarg)); - break; - case 'v': - this->verbosity_ = 1; - break; - default: - ::fprintf (stderr, "%s\n" - "\t[-b] (THR_BOUND)\n" - "\t[-c consumer port]\n" - "\t[-d] (enable debugging)\n" - "\t[-H high water mark]\n" - "\t[-i number of test iterations]\n" - "\t[-L low water mark]\n" - "\t[-M] message size \n" - "\t[-n] (THR_NEW_LWP)\n" - "\t[-q max queue size]\n" - "\t[-s supplier port]\n" - "\t[-t number of threads]\n" - "\t[-v] (verbose) \n", - argv[0]); - ::exit (1); - /* NOTREACHED */ - break; - } - - if (this->verbose ()) - ACE_OS::printf ("%8d = initial concurrency hint\n" - "%8d = total iterations\n" - "%8d = thread count\n" - "%8d = low water mark\n" - "%8d = high water mark\n" - "%8d = message_size\n" - "%8d = initial queue length\n" - "%8d = THR_BOUND\n" - "%8d = THR_NEW_LWP\n", - ACE_Thread::getconcurrency (), - this->iterations (), - this->thr_count (), - this->low_water_mark (), - this->high_water_mark (), - this->message_size (), - this->initial_queue_length (), - (this->t_flags () & THR_BOUND) != 0, - (this->t_flags () & THR_NEW_LWP) != 0); -} diff --git a/examples/ASX/Event_Server/Event_Server/Options.h b/examples/ASX/Event_Server/Event_Server/Options.h deleted file mode 100644 index 639f013ac73..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Options.h +++ /dev/null @@ -1,102 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (OPTIONS_H) -#define OPTIONS_H - -#include "ace/OS.h" -#include "ace/Profile_Timer.h" - -class Options - // = TITLE - // Option Singleton for Event Server. -{ - friend class ACE_Shutup_GPlusPlus; // Turn off g++ warning... -public: - static Options *instance (void); - - void parse_args (int argc, char *argv[]); - - void stop_timer (void); - void start_timer (void); - - void thr_count (size_t count); - size_t thr_count (void); - - void initial_queue_length (size_t length); - size_t initial_queue_length (void); - - void high_water_mark (size_t size); - size_t high_water_mark (void); - - void low_water_mark (size_t size); - size_t low_water_mark (void); - - void message_size (size_t size); - size_t message_size (void); - - void iterations (size_t n); - size_t iterations (void); - - void t_flags (long flag); - long t_flags (void); - - void supplier_port (u_short port); - u_short supplier_port (void); - - void consumer_port (u_short port); - u_short consumer_port (void); - - int debug (void); - int verbose (void); - - void print_results (void); - -private: - Options (void); - ~Options (void); - - ACE_Profile_Timer itimer_; - // Time the process. - - size_t thr_count_; - // Number of threads to spawn. - - long t_flags_; - // Flags to thr_create(). - - size_t high_water_mark_; - // ACE_Task high water mark. - - size_t low_water_mark_; - // ACE_Task low water mark. - - size_t message_size_; - // Size of a message. - - size_t initial_queue_length_; - // Initial number of items in the queue. - - size_t iterations_; - // Number of iterations to run the test program. - - int debugging_; - // Extra debugging info. - - int verbosity_; - // Extra verbose messages. - - u_short consumer_port_; - // Port that the Consumer_Router is using. - - u_short supplier_port_; - // Port that the Supplier_Router is using. - - static Options *instance_; - // Static Singleton. - - -}; - -#include "Options.i" -#endif /* OPTIONS_H */ diff --git a/examples/ASX/Event_Server/Event_Server/Options.i b/examples/ASX/Event_Server/Event_Server/Options.i deleted file mode 100644 index b3ce4e2e807..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Options.i +++ /dev/null @@ -1,137 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Option manager for ustreams */ - -inline void -Options::supplier_port (u_short port) -{ - this->supplier_port_ = port; -} - -inline u_short -Options::supplier_port (void) -{ - return this->supplier_port_; -} - -inline void -Options::consumer_port (u_short port) -{ - this->consumer_port_ = port; -} - -inline u_short -Options::consumer_port (void) -{ - return this->consumer_port_; -} - -inline void -Options::start_timer (void) -{ - this->itimer_.start (); -} - -inline void -Options::stop_timer (void) -{ - this->itimer_.stop (); -} - -inline void -Options::thr_count (size_t count) -{ - this->thr_count_ = count; -} - -inline size_t -Options::thr_count (void) -{ - return this->thr_count_; -} - -inline void -Options::initial_queue_length (size_t length) -{ - this->initial_queue_length_ = length; -} - -inline size_t -Options::initial_queue_length (void) -{ - return this->initial_queue_length_; -} - -inline void -Options::high_water_mark (size_t size) -{ - this->high_water_mark_ = size; -} - -inline size_t -Options::high_water_mark (void) -{ - return this->high_water_mark_; -} - -inline void -Options::low_water_mark (size_t size) -{ - this->low_water_mark_ = size; -} - -inline size_t -Options::low_water_mark (void) -{ - return this->low_water_mark_; -} - -inline void -Options::message_size (size_t size) -{ - this->message_size_ = size; -} - -inline size_t -Options::message_size (void) -{ - return this->message_size_; -} - -inline void -Options::iterations (size_t n) -{ - this->iterations_ = n; -} - -inline size_t -Options::iterations (void) -{ - return this->iterations_; -} - -inline void -Options::t_flags (long flag) -{ - this->t_flags_ |= flag; -} - -inline long -Options::t_flags (void) -{ - return this->t_flags_; -} - -inline int -Options::debug (void) -{ - return this->debugging_; -} - -inline int -Options::verbose (void) -{ - return this->verbosity_; -} - diff --git a/examples/ASX/Event_Server/Event_Server/Peer_Router.cpp b/examples/ASX/Event_Server/Event_Server/Peer_Router.cpp deleted file mode 100644 index a281735a35b..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Peer_Router.cpp +++ /dev/null @@ -1,354 +0,0 @@ -// $Id$ - -#if !defined (_PEER_ROUTER_C) -#define _PEER_ROUTER_C - -#include "ace/Service_Config.h" -#include "ace/Get_Opt.h" -#include "Options.h" -#include "Peer_Router.h" - -int -Peer_Router_Context::send_peers (ACE_Message_Block *mb) -{ - PEER_ITERATOR map_iter = this->peer_map_; - int bytes = 0; - int iterations = 0; - - // Skip past the header and get the message to send. - ACE_Message_Block *data_block = mb->cont (); - - // "Multicast" the data to *all* the registered peers. - - for (PEER_ENTRY *ss = 0; - map_iter.next (ss) != 0; - map_iter.advance ()) - { - if (Options::instance ()->debug ()) - ACE_DEBUG ((LM_DEBUG, - "(%t) sending to peer via handle %d\n", - ss->ext_id_)); - iterations++; - // Increment reference count before sending since the - // Peer_Handler might be running in its own thread of control. - bytes += ss->int_id_->put (data_block->duplicate ()); - } - - mb->release (); - return bytes == 0 ? 0 : bytes / iterations; -} - -int -Peer_Router_Context::unbind_peer (ROUTING_KEY key) -{ - return this->peer_map_.unbind (key); -} - -void -Peer_Router_Context::release (void) -{ - this->reference_count_--; - - if (this->reference_count_ == 0) - delete this; -} - -int -Peer_Router_Context::bind_peer (ROUTING_KEY key, - Peer_Handler *peer_handler) -{ - return this->peer_map_.bind (key, peer_handler); -} - -Peer_Router_Context::Peer_Router_Context (u_short port) - : reference_count_ (2) // 1 Consumer + 1 Supplier -{ - // Perform initializations. - - if (this->open (ACE_INET_Addr (port)) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "Acceptor::open")); - - else if (this->peer_map_.open () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "Map_Manager::open")); - - else - { - ACE_INET_Addr addr; - - if (this->acceptor().get_local_addr (addr) != -1) - ACE_DEBUG ((LM_DEBUG, - "(%t) initializing %s on port = %d, handle = %d, this = %u\n", - addr.get_port_number () == Options::instance ()->supplier_port () ? - "Supplier_Handler" : "Consumer_Handler", - addr.get_port_number (), - this->acceptor().get_handle (), - this)); - else - ACE_ERROR ((LM_ERROR, - "%p\n", "get_local_addr")); - } -} - -Peer_Router_Context::~Peer_Router_Context (void) -{ - // Free up the handle and close down the listening socket. - ACE_DEBUG ((LM_DEBUG, - "(%t) closing down Peer_Router_Context")); - - // Close down the Acceptor and take ourselves out of the Reactor. - this->handle_close (); - - PEER_ITERATOR map_iter = this->peer_map_; - - // Make sure to take all the handles out of the map. - - for (PEER_ENTRY *ss = 0; - map_iter.next (ss) != 0; - map_iter.advance ()) - { - if (Options::instance ()->debug ()) - ACE_DEBUG ((LM_DEBUG, - "(%t) closing down peer on handle %d\n", - ss->ext_id_)); - - if (ACE_Service_Config::reactor ()->remove_handler - (ss->ext_id_, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR ((LM_ERROR, "(%t) p\n", "remove_handle")); - } - - // Close down the map. - this->peer_map_.close (); -} - -Peer_Router * -Peer_Router_Context::peer_router (void) -{ - return this->peer_router_; -} - -void -Peer_Router_Context::peer_router (Peer_Router *pr) -{ - this->peer_router_ = pr; -} - -int -Peer_Router_Context::make_svc_handler (Peer_Handler *&sh) -{ - ACE_NEW_RETURN (sh, Peer_Handler (this), -1); - return 0; -} - -Peer_Handler::Peer_Handler (Peer_Router_Context *prc) - : prc_ (prc) -{ -} - -#if 0 - -// Right now, Peer_Handlers are purely Reactive, i.e., they all run in -// a single thread of control. It would be easy to make them Active -// Objects by calling activate() in Peer_Handler::open(), making -// Peer_Handler::put() enqueue each message on the message queue, and -// (3) then running the following svc() routine to route each message -// to its final destination within a separate thread. Note that we'd -// want to move the svc() call up to the Consumer_Router and -// Supplier_Router level in order to get the right level of control -// for input and output. - -Peer_Handler::svc (void) -{ - ACE_Thread_Control thread_control (tm); - - ACE_Message_Block *db, *hb; - int n; - - // Do an endless loop - for (;;) - { - db = new Message_Block (BUFSIZ); - hb = new Message_Block (sizeof (ROUTING_KEY), Message_Block::MB_PROTO, db); - - if ((n = this->peer_.recv (db->rd_ptr (), db->size ())) == -1) - LM_ERROR_RETURN ((LOG_ERROR, "%p", "recv failed"), -1); - else if (n == 0) // Client has closed down the connection. - { - if (this->prc_->peer_router ()->unbind_peer (this->get_handle ()) == -1) - LM_ERROR_RETURN ((LOG_ERROR, "%p", "unbind failed"), -1); - LM_DEBUG ((LOG_DEBUG, "(%t) shutting down \n")); - return -1; // We do not need to be deregistered by reactor - // as we were not registered at all - } - else - // Transform incoming buffer into a Message and pass - // downstream. - { - db->wr_ptr (n); - *(long *) hb->rd_ptr () = this->get_handle (); // Structure assignment. - hb->wr_ptr (sizeof (long)); - - if (this->prc_->peer_router ()->reply (hb) == -1) - { - cout << "Peer_Handler.svc : peer_router->reply failed" << endl ; - return -1; - } - } - } - return 0; -} -#endif - -int -Peer_Handler::put (ACE_Message_Block *mb, ACE_Time_Value *tv) -{ -#if 0 - // If we're running as Active Objects just enqueue the message here. - return this->putq (mb, tv); -#else - ACE_UNUSED_ARG (tv); - - int result = 0; - - result = this->peer ().send_n (mb->rd_ptr (), - mb->length ()); - // Release the memory. - mb->release (); - return result; -#endif -} - -// Initialize a newly connected handler. - -int -Peer_Handler::open (void *) -{ - char buf[BUFSIZ], *p = buf; - - if (this->prc_->peer_router ()->info (&p, sizeof buf) != -1) - ACE_DEBUG ((LM_DEBUG, "(%t) creating handler for %s, handle = %d\n", - buf, this->get_handle ())); - else - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "info"), -1); -#if 0 - // If we're running as an Active Object activate the Peer_Handler - // here. - if (this->activate (Options::instance ()->t_flags ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activation of thread failed"), -1); - ACE_DEBUG ((LM_DEBUG, - "(%t) Peer_Handler::open registering with Reactor for handle_input\n")); -#else - // Register with the Reactor to receive messages from our Peer. - if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_handler"), -1); -#endif - - // Insert outselves into the routing map. - else if (this->prc_->bind_peer (this->get_handle (), this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "bind_peer"), -1); - - // Turn off non-blocking I/O in case it was turned on. - else if (this->peer ().disable (ACE_NONBLOCK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "disable non-blocking I/O"), -1); - else - return 0; -} - -// Receive a message from a Peer. - -int -Peer_Handler::handle_input (ACE_HANDLE h) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) input arrived on handle %d\n", h)); - - ACE_Message_Block *db = new ACE_Message_Block (BUFSIZ); - ACE_Message_Block *hb = new ACE_Message_Block (sizeof (ROUTING_KEY), - ACE_Message_Block::MB_PROTO, db); - - // Check for memory failures. - if (db == 0 || hb == 0) - { - hb->release (); - db->release (); - errno = ENOMEM; - return -1; - } - - ssize_t n = this->peer ().recv (db->rd_ptr (), db->size ()); - - if (n == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "recv failed"), -1); - else if (n == 0) // Client has closed down the connection. - { - if (this->prc_->unbind_peer (this->get_handle ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "unbind failed"), -1); - - ACE_DEBUG ((LM_DEBUG, "(%t) shutting down handle %d\n", h)); - return -1; // Instruct the ACE_Reactor to deregister us by returning -1. - } - else - { - // Transform incoming buffer into a Message. - - // First, increment the write pointer to the end of the newly - // read data block. - db->wr_ptr (n); - - // Second, copy the "address" into the header block. - *(ACE_HANDLE *) hb->rd_ptr () = this->get_handle (); - - // Third, update the write pointer in the header block. - hb->wr_ptr (sizeof (ACE_HANDLE)); - - // Finally, pass the message through the stream. Note that we - // use <Task::put> here because this gives the method at *our* - // level in the stream a chance to do something with the message - // before it is sent up the other side. For instance, if we - // receive messages in the Supplier_Router, it will just call - // <put_next> and send them up the stream to the Consumer_Router - // (which broadcasts them to consumers). However, if we receive - // messages in the Consumer_Router, it will reply to the - // Consumer with an error since it's not correct for Consumers - // to send messages. - return this->prc_->peer_router ()->put (hb) == -1 ? -1 : 0; - } -} - -Peer_Router::Peer_Router (Peer_Router_Context *prc) - : prc_ (prc) -{ - -} - -Peer_Router_Context * -Peer_Router::context (void) const -{ - return this->prc_; -} - -int -Peer_Router::control (ACE_Message_Block *mb) -{ - ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr (); - ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds command; - - switch (command = ioc->cmd ()) - { - case ACE_IO_Cntl_Msg::SET_LWM: - case ACE_IO_Cntl_Msg::SET_HWM: - this->water_marks (command, *(size_t *) mb->cont ()->rd_ptr ()); - break; - default: - return -1; - } - return 0; -} - -#endif /* _PEER_ROUTER_C */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Acceptor<Peer_Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_Map_Iterator<ROUTING_KEY, Peer_Handler *, ACE_RW_Mutex>; -template class ACE_Map_Manager<ROUTING_KEY, Peer_Handler *, ACE_RW_Mutex>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/ASX/Event_Server/Event_Server/Peer_Router.h b/examples/ASX/Event_Server/Event_Server/Peer_Router.h deleted file mode 100644 index dc69440c743..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Peer_Router.h +++ /dev/null @@ -1,133 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (_PEER_ROUTER_H) -#define _PEER_ROUTER_H - -#include "ace/Acceptor.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/Map_Manager.h" - -// Type of search key for CONSUMER_MAP -typedef ACE_HANDLE ROUTING_KEY; - -// Forward declarations. -class Peer_Router; -class Peer_Router_Context; - -class Peer_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_SYNCH> - // = TITLE - // Receive input from a Peer and forward to the appropriate - // <Peer_Router>. -{ -public: - Peer_Handler (Peer_Router_Context * = 0); - // Initialization method. - - virtual int open (void * = 0); - // Called by the ACE_Acceptor::handle_input() to activate this - // object. - - virtual int handle_input (ACE_HANDLE); - // Receive input from the peer. - - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); - // Send output to a peer. - -protected: - Peer_Router_Context *prc_; - // Pointer to router context. -}; - -class Peer_Router_Context : public ACE_Acceptor<Peer_Handler, ACE_SOCK_ACCEPTOR> - // = TITLE - // Defines state and behavior shared between both Tasks in a - // Peer_Router Module. - // - // = DESCRIPTION - // This class also serves as an Acceptor, which creates - // Peer_Handlers when Peers connect. -{ -public: - // = Initialization and termination methods. - Peer_Router_Context (u_short port); - - virtual int unbind_peer (ROUTING_KEY); - // Remove the <Peer_Handler *> from the <PEER_MAP> that corresponds - // to the <ROUTING_KEY>. - - virtual int bind_peer (ROUTING_KEY, Peer_Handler *); - // Add a <Peer_Handler> to the <PEER_MAP> that's associated with the - // <ROUTING_KEY>. - - int send_peers (ACE_Message_Block *mb); - // Send the <ACE_Message_Block> to the peer(s). - - int make_svc_handler (Peer_Handler *&sh); - // Create a new <Peer_Handler> for each connection. - - // = Set/Get Router Task. - Peer_Router *peer_router (); - void peer_router (Peer_Router *); - - void release (void); - // Decrement the reference count and delete <this> when count == 0; - -private: - Peer_Router *peer_router_; - // Pointer to the <Peer_Router> that we are accepting for. - - // = Useful typedefs - typedef ACE_Map_Manager <ROUTING_KEY, Peer_Handler *, ACE_RW_Mutex> PEER_MAP; - typedef ACE_Map_Iterator<ROUTING_KEY, Peer_Handler *, ACE_RW_Mutex> PEER_ITERATOR; - typedef ACE_Map_Entry<ROUTING_KEY, Peer_Handler *> PEER_ENTRY; - - PEER_MAP peer_map_; - // Map used to keep track of active peers. - - int reference_count_; - // Keep track of when we can delete ourselves. - - ~Peer_Router_Context (void); - // Private to ensure dynamic allocation. - - friend class Friend_Of_Peer_Router_Context; - // declare a friend class to avoid compiler warnings because the - // destructor is private. -}; - -class Peer_Router : public ACE_Task<ACE_SYNCH> - // = TITLE - // This abstract base class provides mechanisms for routing - // messages to/from a ACE_Stream from/to one or more peers (which - // are typically running on remote hosts). - // - // = DESCRIPTION - // A subclass of Peer_Router overrides the open(), close(), and - // put() methods in order to specialize the behavior of the router - // to meet application-specific requirements. -{ -protected: - Peer_Router (Peer_Router_Context *prc); - // Initialization method. - - virtual int control (ACE_Message_Block *); - // Handle control messages arriving from adjacent Modules. - - Peer_Router_Context *context (void) const; - // Returns the routing context. - - typedef ACE_Task<ACE_SYNCH> inherited; - // Helpful typedef. - -private: - Peer_Router_Context *prc_; - // Reference to the context shared by the writer and reader Tasks in - // the Consumer and Supplier Modules. - - // = Prevent copies and pass-by-value. - Peer_Router (const Peer_Router &) {} - void operator= (const Peer_Router &) {} -}; - -#endif /* _PEER_ROUTER_H */ diff --git a/examples/ASX/Event_Server/Event_Server/Supplier_Router.cpp b/examples/ASX/Event_Server/Event_Server/Supplier_Router.cpp deleted file mode 100644 index ebcb664cca7..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Supplier_Router.cpp +++ /dev/null @@ -1,138 +0,0 @@ -// $Id$ - -#include "Supplier_Router.h" -#include "Options.h" - -// Handle outgoing messages in a separate thread. - -int -Supplier_Router::svc (void) -{ - assert (this->is_writer ()); - - ACE_Thread_Control tc (this->thr_mgr ()); - - ACE_DEBUG ((LM_DEBUG, "(%t) starting svc in Supplier_Router\n")); - - for (ACE_Message_Block *mb = 0; - this->getq (mb) >= 0; - ) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) warning: Supplier_Router is forwarding a message via send_peers\n")); - - // Broadcast the message to the Suppliers. - - if (this->context ()->send_peers (mb) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%t) send_peers failed in Supplier_Router\n"), - -1); - } - - ACE_DEBUG ((LM_DEBUG, "(%t) stopping svc in Supplier_Router\n")); - return 0; - // Note the implicit ACE_OS::thr_exit() via ACE_Thread_Control's - // destructor. -} - -Supplier_Router::Supplier_Router (Peer_Router_Context *prc) - : Peer_Router (prc) -{ -} - -// Initialize the Supplier Router. - -int -Supplier_Router::open (void *) -{ - if (this->is_reader ()) - { - // Set the Peer_Router_Context to point back to us so that all the - // Peer_Handler's <put> their incoming <Message_Blocks> to our - // reader Task. - this->context ()->peer_router (this); - return 0; - } - - else // if (this->is_writer () - // Make this an active object to handle the error cases in a - // separate thread. - return this->activate (Options::instance ()->t_flags ()); -} - -// Close down the router. - -int -Supplier_Router::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing Supplier_Router %s\n", - this->is_reader () ? "reader" : "writer")); - - if (this->is_writer ()) - // Inform the thread to shut down. - this->msg_queue ()->deactivate (); - - // Both writer and reader call release(), so the context knows when - // to clean itself up. - this->context ()->release (); - return 0; -} - -// Send an <ACE_Message_Block> to the supplier(s). - -int -Supplier_Router::put (ACE_Message_Block *mb, - ACE_Time_Value *) -{ - // Perform the necessary control operations before passing - // the message up the stream. - - if (mb->msg_type () == ACE_Message_Block::MB_IOCTL) - { - this->control (mb); - return this->put_next (mb); - } - - // If we're the reader then we are responsible for pass messages up - // to the next Module's writer Task. - - else if (this->is_reader ()) - return this->put_next (mb); - else // if (this->is_writer ()) - { - // Someone is trying to write to the Supplier. In this - // implementation this is considered an error. However, we'll - // just go ahead and forward the message to the Supplier (who - // hopefully is prepared to receive it). - ACE_DEBUG ((LM_WARNING, "(%t) warning: sending to a Supplier\n")); - - // Queue up the message to processed by Supplier_Router::svc(). - // Since we don't expect to be getting many of these messages, - // we queue them up and run them in a separate thread to avoid - // taxing the main thread. - return this->putq (mb); - } -} - -// Return information about the Supplier_Router ACE_Module. - -int -Supplier_Router::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_INET_Addr addr; - const char *mod_name = this->name (); - - if (this->context ()->acceptor ().get_local_addr (addr) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s\t %d/%s %s (%s)\n", - mod_name, addr.get_port_number (), "tcp", - "# supplier router", this->is_reader () ? "reader" : "writer"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (mod_name)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, mod_name, length); - return ACE_OS::strlen (mod_name); -} diff --git a/examples/ASX/Event_Server/Event_Server/Supplier_Router.h b/examples/ASX/Event_Server/Event_Server/Supplier_Router.h deleted file mode 100644 index 42d067a6454..00000000000 --- a/examples/ASX/Event_Server/Event_Server/Supplier_Router.h +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (_SUPPLIER_ROUTER_H) -#define _SUPPLIER_ROUTER_H - -#include "ace/INET_Addr.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/Map_Manager.h" -#include "ace/Svc_Handler.h" -#include "Peer_Router.h" - -class Supplier_Router : public Peer_Router - // = TITLE - // Provides the interface between one or more Suppliers and the - // Event Server ACE_Stream. - // - // = DESCRIPTION - // When used on the "reader" side of a Stream, this Router Task - // simply forwards all messages up the stream. When used on the - // "writer" side, this Router Task queues up outgoing messages - // to suppliers and sends them in a separate thread. The reason - // for this is that it's really an "error" for a - // <Supplier_Router> to send messages to Suppliers, so we don't - // expect this to happen very much. when it does we use a - // separate thread to avoid taxing the main thread. -{ -public: - Supplier_Router (Peer_Router_Context *prc); - // Initialization method. - -protected: - // = ACE_Task hooks. - - // All of these methods are called via base class pointers by the - // ACE Stream apparatus. Therefore, we can put them in the - // protected section. - - virtual int open (void *a = 0); - // Called by the Stream to initialize the router. - - virtual int close (u_long flags = 0); - // Called by the Stream to shutdown the router. - - virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0); - // Called by the <SUPPLIER_HANDLER> to pass a message to the Router. - // The Router queues up this message, which is then processed in the - // <svc> method in a separate thread. - - virtual int svc (void); - // Runs in a separate thread to dequeue messages and pass them up - // the stream. - - virtual int info (char **info_string, size_t length) const; - // Dynamic linking hook. -}; - -#endif /* _SUPPLIER_ROUTER_H */ diff --git a/examples/ASX/Event_Server/Event_Server/event_server.cpp b/examples/ASX/Event_Server/Event_Server/event_server.cpp deleted file mode 100644 index 59bcf1039d8..00000000000 --- a/examples/ASX/Event_Server/Event_Server/event_server.cpp +++ /dev/null @@ -1,142 +0,0 @@ -// $Id$ - -// Test the event server. - -#include "ace/Stream.h" -#include "ace/Service_Config.h" -#include "Options.h" -#include "Consumer_Router.h" -#include "Event_Analyzer.h" -#include "Supplier_Router.h" - -typedef ACE_Stream<ACE_SYNCH> MT_Stream; -typedef ACE_Module<ACE_SYNCH> MT_Module; - -class Quit_Handler : public ACE_Sig_Adapter - // = TITLE - // Handle SIGINT and terminate the entire application. -{ -public: - Quit_Handler (void); - virtual int handle_input (ACE_HANDLE fd); -}; - -Quit_Handler::Quit_Handler (void) - : ACE_Sig_Adapter (ACE_Sig_Handler_Ex (ACE_Service_Config::end_reactor_event_loop)) -{ - // Register to trap input from the user. - if (ACE::register_stdin_handler (this, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); - // Register to trap the SIGINT signal. - else if (ACE_Service_Config::reactor ()->register_handler - (SIGINT, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_handler")); -} - -int -Quit_Handler::handle_input (ACE_HANDLE) -{ - Options::instance ()->stop_timer (); - ACE_DEBUG ((LM_INFO, "(%t) closing down the test\n")); - Options::instance ()->print_results (); - - ACE_Service_Config::end_reactor_event_loop (); - return 0; -} - -int -main (int argc, char *argv[]) -{ -#if defined (ACE_HAS_THREADS) - ACE_Service_Config daemon; - - Options::instance ()->parse_args (argc, argv); - { - // Primary ACE_Stream for EVENT_SERVER application. - MT_Stream event_server; - - // Enable graceful shutdowns... - Quit_Handler quit_handler; - - Peer_Router_Context *src; - // Create the Supplier_Router's routing context, which contains - // context shared by both the write-side and read-side of the - // Supplier_Router Module. - ACE_NEW_RETURN (src, - Peer_Router_Context (Options::instance ()->supplier_port ()), - -1); - - MT_Module *srm = 0; - // Create the Supplier Router module. - ACE_NEW_RETURN (srm, MT_Module - ("Supplier_Router", - new Supplier_Router (src), - new Supplier_Router (src)), - -1); - - MT_Module *eam = 0; - // Create the Event Analyzer module. - ACE_NEW_RETURN (eam, MT_Module - ("Event_Analyzer", - new Event_Analyzer, - new Event_Analyzer), - -1); - - Peer_Router_Context *crc; - // Create the Consumer_Router's routing context, which contains - // context shared by both the write-side and read-side of the - // Consumer_Router Module. - ACE_NEW_RETURN (crc, - Peer_Router_Context (Options::instance ()->consumer_port ()), - -1); - - MT_Module *crm = 0; - // Create the Consumer Router module. - ACE_NEW_RETURN (crm, MT_Module - ("Consumer_Router", - new Consumer_Router (crc), - new Consumer_Router (crc)), - -1); - - // Push the Modules onto the event_server stream. - - if (event_server.push (srm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "push (Supplier_Router)"), -1); - - if (event_server.push (eam) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "push (Event_Analyzer)"), -1); - - if (event_server.push (crm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "push (Consumer_Router)"), -1); - - // Set the high and low water marks appropriately. - - int wm = Options::instance ()->low_water_mark (); - - if (event_server.control (ACE_IO_Cntl_Msg::SET_LWM, &wm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "push (setting low watermark)"), -1); - - wm = Options::instance ()->high_water_mark (); - if (event_server.control (ACE_IO_Cntl_Msg::SET_HWM, &wm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "push (setting high watermark)"), -1); - - Options::instance ()->start_timer (); - - // Perform the main event loop waiting for the user to type ^C or - // to enter a line on the ACE_STDIN. - - daemon.run_reactor_event_loop (); - // The destructor of event_server will close down the stream and - // call the close() hooks on all the ACE_Tasks. - } - - // Wait for the threads to exit. - ACE_Service_Config::thr_mgr ()->wait (); - ACE_DEBUG ((LM_DEBUG, "exiting main\n")); -#else - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); -#endif /* ACE_HAS_THREADS */ - return 0; -} diff --git a/examples/ASX/Event_Server/Makefile b/examples/ASX/Event_Server/Makefile deleted file mode 100644 index 6c8d3f443f5..00000000000 --- a/examples/ASX/Event_Server/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Event Server tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = Event_Server \ - Transceiver - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/examples/ASX/Event_Server/README b/examples/ASX/Event_Server/README deleted file mode 100644 index f54d724e1fe..00000000000 --- a/examples/ASX/Event_Server/README +++ /dev/null @@ -1,53 +0,0 @@ -The subdirectory illustrates a number of the ACE ASX framework -features using an ACE_Stream application called the Event Server. For -more information on the design and use of the ACE ASX framework please -see http://www.cs.wustl.edu/~schmidt/C++-USENIX-94.ps.gz and -http://www.cs.wustl.edu/~schmidt/DSEJ-94.ps.gz - -The Event Server example works as follows: - -1. When the ./Event_Server/event_server executable is run it - creates two SOCK_Acceptors, which listen for and accept incoming - connections from Consumers and Suppliers. - -2. The ./Event_Server/Transceiver/transceiver application plays - the role of either a Consumer or a Supplier (but with the current - implementation it can only play one role at a time). The - transceiver process can be started multiple times. Each call - should be either: - - # Consumer - % transceiver -p 10002 -h hostname -C - - or - - # Supplier - % transceiver -p 10003 -h hostname -S - - where 10002 and 10003 are the default Consumer listening port and - the Supplier listening port, respectively, on the event server, - "hostname" is the name of the machine the event_server is running, - and -C and -S indicate that the transceiver plays the role of a - Consumer or Supplier, respectively. I typically run the - Consumer(s) and Supplier(s) in different windows to make it easier - to understand the output. - -3. Once the Consumer(s) and Supplier(s) are connected, you can - type data from any Supplier window. This data will be routed - through the Modules/Tasks in the event_server's Stream and be - forwarded to the Consumer(s). - - Since the transceivers are full-duplex you can also send messages - from the Consumer(s) to Supplier(s), but the Event Server will warn - you about this since it's not really kosher to have Consumers - sending to Suppliers ;-) - -4. When you want to shut down the tranceivers or event server - just type ^C (which generates a SIGINT) or type any input in the - window running the Event Server. - -What makes this example particularly interesting is that once you've -got the hang of the ASX Streams architecture, you can "push" new -filtering Modules onto the event_server Stream and modify the -application's behavior transparently. - diff --git a/examples/ASX/Event_Server/Transceiver/Makefile b/examples/ASX/Event_Server/Transceiver/Makefile deleted file mode 100644 index 8ef56cdc12c..00000000000 --- a/examples/ASX/Event_Server/Transceiver/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the transceiver portion of the Event Server test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = transceiver - -VLDLIBS = $(LDLIBS:%=%$(VAR)) -#### -lGateway is needed for template instantiations with g++ -fno-implicit-templates -LIBS = -lGateway - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/ASX/Event_Server/Transceiver/transceiver.cpp b/examples/ASX/Event_Server/Transceiver/transceiver.cpp deleted file mode 100644 index eef5248ee11..00000000000 --- a/examples/ASX/Event_Server/Transceiver/transceiver.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// $Id$ - -// Test program for the event transceiver. This program can play the -// role of either Consumer or Supplier. You can terminate this -// program by typing ^C.... - -#include "ace/Service_Config.h" -#include "ace/Connector.h" -#include "ace/SOCK_Connector.h" -#include "ace/Get_Opt.h" - -// Port number of event server. -static u_short port_number; - -// Name of event server. -static char *host_name; - -// Are we playing the Consumer ('C') or Supplier ('S') role? -static char role = 'S'; - -// Handle the command-line arguments. - -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "Ch:p:S"); - - port_number = ACE_DEFAULT_SERVER_PORT; - host_name = ACE_DEFAULT_SERVER_HOST; - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'C': - role = c; - break; - case 'h': - host_name = get_opt.optarg; - break; - case 'p': - port_number = ACE_OS::atoi (get_opt.optarg); - break; - case 'S': - role = c; - break; - default: - ACE_ERROR ((LM_ERROR, - "usage: %n [-p portnum] [-h host_name]\n%a", 1)); - /* NOTREACHED */ - break; - } - - // Increment by 1 if we're the supplier to mirror the default - // behavior of the Event_Server (which sets the Consumer port to - // ACE_DEFAULT_SERVER_PORT and the Supplier port to - // ACE_DEFAULT_SERVER_PORT + 1). - if (role == 'S' && port_number == ACE_DEFAULT_SERVER_PORT) - port_number++; -} - -class Event_Transceiver : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> - // = TITLE - // Generate and receives messages from the event server. - // - // = DESCRIPTION - // This class is both a consumer and supplier of events, i.e., - // it is a ``transceiver.'' -{ -public: - Event_Transceiver (void); - - // = Svc_Handler hook called by the <ACE_Connector>. - virtual int open (void *); - // Initialize the transceiver when we are connected. - - // = Demultplexing hooks from the <ACE_Reactor>. - virtual int handle_input (ACE_HANDLE); - // Receive data from STDIN or socket. - - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *); - // Close down via SIGINT. - - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - // Close down the event loop. - -private: - int receiver (void); - // Reads data from socket and writes to ACE_STDOUT. - - int forwarder (void); - // Writes data from ACE_STDIN to socket. -}; - -int -Event_Transceiver::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) -{ - ACE_Service_Config::end_reactor_event_loop (); - return 0; -} - -// Close down via SIGINT. - -int -Event_Transceiver::handle_signal (int signum, - siginfo_t *, - ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); - - ACE_Service_Config::end_reactor_event_loop (); - return 0; -} - -Event_Transceiver::Event_Transceiver (void) -{ - ACE_Sig_Set sig_set; - - sig_set.sig_add (SIGINT); - sig_set.sig_add (SIGQUIT); - - if (ACE_Service_Config::reactor ()->register_handler - (sig_set, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_handler")); -} - -int -Event_Transceiver::open (void *) -{ - if (ACE_Service_Config::reactor ()->register_handler - (this->peer ().get_handle (), this, - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_handler"), -1); - else if (ACE::register_stdin_handler (this, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_stdin_handler"), -1); - return 0; -} - -int -Event_Transceiver::handle_input (ACE_HANDLE handle) -{ - if (handle == ACE_STDIN) - return this->forwarder (); - else - return this->receiver (); -} - - -int -Event_Transceiver::forwarder (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) entering %s forwarder\n", - role == 'C' ? "Consumer" : "Supplier")); - - char buf[BUFSIZ]; - ssize_t n = ACE_OS::read (ACE_STDIN, buf, sizeof buf); - int result = 0; - - if (n <= 0 || this->peer ().send_n (buf, n) != n) - result = -1; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) leaving %s forwarder\n", - role == 'C' ? "Consumer" : "Supplier")); - return result; -} - -int -Event_Transceiver::receiver (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) entering %s receiver\n", - role == 'C' ? "Consumer" : "Supplier")); - - char buf[BUFSIZ]; - - ssize_t n = this->peer ().recv (buf, sizeof buf); - int result = 0; - - if (n <= 0 || ACE_OS::write (ACE_STDOUT, buf, n) != n) - result = -1; - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) leaving %s receiver\n", - role == 'C' ? "Consumer" : "Supplier")); - return result; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - parse_args (argc, argv); - - // Establish the connection. - ACE_Connector<Event_Transceiver, ACE_SOCK_CONNECTOR> connector; - Event_Transceiver transceiver, *tp = &transceiver; - - if (connector.connect (tp, ACE_INET_Addr (port_number, host_name)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", host_name), 1); - - // Run event loop until either the event server shuts down or we get - // a SIGINT. - ACE_Service_Config::run_reactor_event_loop (); - return 0; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Connector<Event_Transceiver, ACE_SOCK_CONNECTOR>; -template class ACE_Map_Iterator<int, ACE_Svc_Tuple<Event_Transceiver> *, ACE_RW_Mutex>; -template class ACE_Map_Manager<int, ACE_Svc_Tuple<Event_Transceiver> *, ACE_RW_Mutex>; -template class ACE_Svc_Tuple<Event_Transceiver>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/ASX/Makefile b/examples/ASX/Makefile deleted file mode 100644 index 38b94b51626..00000000000 --- a/examples/ASX/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the ASX test directory -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = CCM_App \ - Event_Server \ - Message_Queue \ - UPIPE_Event_Server - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/examples/ASX/Message_Queue/Makefile b/examples/ASX/Message_Queue/Makefile deleted file mode 100644 index f76ef41a74a..00000000000 --- a/examples/ASX/Message_Queue/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for Message_Queue tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = buffer_stream \ - bounded_buffer \ - priority_buffer - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/ASX/Message_Queue/bounded_buffer.cpp b/examples/ASX/Message_Queue/bounded_buffer.cpp deleted file mode 100644 index 194fbf07280..00000000000 --- a/examples/ASX/Message_Queue/bounded_buffer.cpp +++ /dev/null @@ -1,130 +0,0 @@ -// This short program copies stdin to stdout via the use of an ASX -// $Id$ - -// Message_Queue. It illustrates an implementation of the classic -// "bounded buffer" program. - - -#include "ace/Message_Queue.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) - -// Global thread manager. -static ACE_Thread_Manager thr_mgr; - -// The producer reads data from the stdin stream, creates a message, -// and then queues the message in the message list, where it is -// removed by the consumer thread. A 0-sized message is enqueued when -// there is no more data to read. The consumer uses this as a flag to -// know when to exit. - -static void * -producer (ACE_Message_Queue<ACE_MT_SYNCH> *msg_queue) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - - // Keep reading stdin, until we reach EOF. - - for (int n; ; ) - { - // Allocate a new message. - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - - n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); - - if (n <= 0) - { - // Send a shutdown message to the other thread and exit. - mb->length (0); - if (msg_queue->enqueue_tail (mb) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put_next")); - break; - } - - // Send the message to the other thread. - else - { - mb->msg_priority (n); - mb->wr_ptr (n); - if (msg_queue->enqueue_tail (mb) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put_next")); - } - } - - // The destructor of ACE_Thread_Control removes the exiting thread - // from the thr_mgr automatically. - return 0; -} - -// The consumer dequeues a message from the ACE_Message_Queue, writes -// the message to the stderr stream, and deletes the message. The -// producer sends a 0-sized message to inform the consumer to stop -// reading and exit. - -static void *consumer (ACE_Message_Queue<ACE_MT_SYNCH> *msg_queue) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - int result = 0; - - // Keep looping, reading a message out of the queue, until we timeout - // or get a message with a length == 0, which signals us to quit. - - for (;;) - { - ACE_Message_Block *mb; - - ACE_Time_Value timeout (ACE_OS::time (0) + 4, 0); // Wait for upto 4 seconds - - result = msg_queue->dequeue_head (mb, &timeout); - - if (result == -1) - break; - - int length = mb->length (); - - if (length > 0) - ACE_OS::write (ACE_STDOUT, mb->rd_ptr (), length); - - mb->release (); - - if (length == 0) - break; - } - - if (result == -1 && errno == EWOULDBLOCK) - ACE_ERROR ((LM_ERROR, "(%t) %p\n%a", "timed out waiting for message", 1)); - - // The destructor of ACE_Thread_Control removes the exiting thread - // from the thr_mgr automatically. - return 0; -} - -// Spawn off two threads that copy stdin to stdout. - -int main (int, char *[]) -{ - // Message list. - ACE_Message_Queue<ACE_MT_SYNCH> msg_queue; - - if (thr_mgr.spawn (ACE_THR_FUNC (producer), (void *) &msg_queue, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); - else if (thr_mgr.spawn (ACE_THR_FUNC (consumer), (void *) &msg_queue, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); - - // Wait for producer and consumer threads to exit. - thr_mgr.wait (); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/ASX/Message_Queue/buffer_stream.cpp b/examples/ASX/Message_Queue/buffer_stream.cpp deleted file mode 100644 index 7d0fcef4160..00000000000 --- a/examples/ASX/Message_Queue/buffer_stream.cpp +++ /dev/null @@ -1,209 +0,0 @@ -// This short program copies stdin to stdout via the use of an ASX -// $Id$ - -// STREAM. It illustrates an implementation of the classic "bounded -// buffer" program using an ASX STREAM containing two Modules. Each -// ACE_Module contains two Tasks. Each ACE_Task contains a -// ACE_Message_Queue and a pointer to a ACE_Thread_Manager. Note how -// the use of these reusable components reduces the reliance on global -// variables, as compared with the bounded_buffer.C example. - - -#include "ace/Synch.h" -#include "ace/Service_Config.h" -#include "ace/Stream.h" -#include "ace/Module.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Stream<ACE_MT_SYNCH> MT_Stream; -typedef ACE_Module<ACE_MT_SYNCH> MT_Module; -typedef ACE_Task<ACE_MT_SYNCH> MT_Task; - -class Common_Task : public MT_Task - // = TITLE - // Methods that are common to the producer and consumer. -{ -public: - Common_Task (void) {} - // ACE_Task hooks - virtual int open (void * = 0); - virtual int close (u_long = 0); -}; - -// Define the Producer interface. - -class Producer : public Common_Task -{ -public: - Producer (void) {} - - // Read data from stdin and pass to consumer. - virtual int svc (void); -}; - -class Consumer : public Common_Task - // = TITLE - // Define the Consumer interface. -{ -public: - Consumer (void) {} - - // Enqueue the message on the ACE_Message_Queue for subsequent - // handling in the svc() method. - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); - - // Receive message from producer and print to stdout. - virtual int svc (void); - -private: - - ACE_Time_Value timeout_; -}; - -// Spawn off a new thread. - -int -Common_Task::open (void *) -{ - if (this->activate (THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), -1); - return 0; -} - -int -Common_Task::close (u_long exit_status) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) thread is exiting with status %d in module %s\n", - exit_status, this->name ())); - - // Can do anything here that is required when a thread exits, e.g., - // storing thread-specific information in some other storage - // location, etc. - return 0; -} - -// The Consumer reads data from the stdin stream, creates a message, -// and then queues the message in the message list, where it is -// removed by the consumer thread. A 0-sized message is enqueued when -// there is no more data to read. The consumer uses this as a flag to -// know when to exit. - -int -Producer::svc (void) -{ - // Keep reading stdin, until we reach EOF. - - for (int n; ; ) - { - // Allocate a new message. - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - - n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); - - if (n <= 0) - { - // Send a shutdown message to the other thread and exit. - mb->length (0); - - if (this->put_next (mb) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put_next")); - break; - } - - // Send the message to the other thread. - else - { - mb->wr_ptr (n); - - if (this->put_next (mb) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put_next")); - } - } - - return 0; -} - -// Simply enqueue the Message_Block into the end of the queue. - -int -Consumer::put (ACE_Message_Block *mb, ACE_Time_Value *tv) -{ - return this->putq (mb, tv); -} - -// The consumer dequeues a message from the ACE_Message_Queue, writes -// the message to the stderr stream, and deletes the message. The -// Consumer sends a 0-sized message to inform the consumer to stop -// reading and exit. - -int -Consumer::svc (void) -{ - int result = 0; - - // Keep looping, reading a message out of the queue, until we - // timeout or get a message with a length == 0, which signals us to - // quit. - - for (;;) - { - ACE_Message_Block *mb; - - this->timeout_.sec (ACE_OS::time (0) + 4); // Wait for upto 4 seconds - - result = this->getq (mb, &this->timeout_); - - if (result == -1) - break; - - int length = mb->length (); - - if (length > 0) - ACE_OS::write (ACE_STDOUT, mb->rd_ptr (), length); - - mb->release (); - - if (length == 0) - break; - } - - if (result == -1 && errno == EWOULDBLOCK) - ACE_ERROR ((LM_ERROR, "(%t) %p\n%a", "timed out waiting for message", 1)); - return 0; -} - -// Main driver function. - -int -main (int, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - // Control hierachically-related active objects - MT_Stream stream; - MT_Module *pm = new MT_Module ("Consumer", new Consumer); - MT_Module *cm = new MT_Module ("Producer", new Producer); - - // Create Producer and Consumer Modules and push them onto the - // STREAM. All processing is performed in the STREAM. - - if (stream.push (pm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "push"), 1); - else if (stream.push (cm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "push"), 1); - - // Barrier synchronization: wait for the threads to exit, then exit - // ourselves. - ACE_Service_Config::thr_mgr ()->wait (); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/ASX/Message_Queue/priority_buffer.cpp b/examples/ASX/Message_Queue/priority_buffer.cpp deleted file mode 100644 index 2d057fd69c2..00000000000 --- a/examples/ASX/Message_Queue/priority_buffer.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// This short program prints the contents of stdin to stdout sorted by -// $Id$ - -// the length of each line via the use of an ASX Message_Queue. It -// illustrates how priorities can be used for ACE Message_Queues. - - -#include "ace/Message_Queue.h" -#include "ace/Read_Buffer.h" -#include "ace/Thread_Manager.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_THREADS) - -// Global thread manager. -static ACE_Thread_Manager thr_mgr; - -// Make the queue be capable of being *very* large. -static const long max_queue = LONG_MAX; - -// The consumer dequeues a message from the ACE_Message_Queue, writes -// the message to the stderr stream, and deletes the message. The -// producer sends a 0-sized message to inform the consumer to stop -// reading and exit. - -static void * -consumer (ACE_Message_Queue<ACE_MT_SYNCH> *msg_queue) -{ - // Keep looping, reading a message out of the queue, until we - // timeout or get a message with a length == 0, which signals us to - // quit. - - for (;;) - { - ACE_Message_Block *mb; - - if (msg_queue->dequeue_head (mb) == -1) - break; - - int length = mb->length (); - - if (length > 0) - ACE_OS::puts (mb->rd_ptr ()); - - // Free up the buffer memory and the Message_Block. - ACE_Service_Config::alloc ()->free (mb->rd_ptr ()); - mb->release (); - - if (length == 0) - break; - } - - return 0; -} - -// The producer reads data from the stdin stream, creates a message, -// and then queues the message in the message list, where it is -// removed by the consumer thread. A 0-sized message is enqueued when -// there is no more data to read. The consumer uses this as a flag to -// know when to exit. - -static void * -producer (ACE_Message_Queue<ACE_MT_SYNCH> *msg_queue) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - - ACE_Read_Buffer rb (ACE_STDIN); - - // Keep reading stdin, until we reach EOF. - - for (;;) - { - // Allocate a new buffer. - char *buffer = rb.read ('\n'); - - if (buffer == 0) - { - // Send a 0-sized shutdown message to the other thread and - // exit. - if (msg_queue->enqueue_tail (new ACE_Message_Block ((size_t) 0)) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put_next")); - break; - } - - // Enqueue the message in priority order. - else - { - // Allocate a new message, but have it "borrow" its memory - // from the buffer. - ACE_Message_Block *mb = new ACE_Message_Block (rb.size (), - ACE_Message_Block::MB_DATA, - 0, - buffer); - mb->msg_priority (rb.size ()); - mb->wr_ptr (rb.size ()); - - ACE_DEBUG ((LM_DEBUG, "enqueueing message of size %d\n", - mb->msg_priority ())); - // Enqueue in priority order. - if (msg_queue->enqueue_prio (mb) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put_next")); - } - } - - // Now read all the items out in priority order (i.e., ordered by - // the size of the lines!). - consumer (msg_queue); - - // The destructor of ACE_Thread_Control removes the exiting thread - // from the thr_mgr automatically. - return 0; -} - -// Spawn off one thread that copies stdin to stdout in order of the -// size of each line. - -int -main (int, char *[]) -{ - // Message queue. - ACE_Message_Queue<ACE_MT_SYNCH> msg_queue (max_queue); - - if (thr_mgr.spawn (ACE_THR_FUNC (producer), (void *) &msg_queue, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); - - // Wait for producer and consumer threads to exit. - thr_mgr.wait (); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/ASX/UPIPE_Event_Server/Consumer_Router.cpp b/examples/ASX/UPIPE_Event_Server/Consumer_Router.cpp deleted file mode 100644 index ce803b0538f..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Consumer_Router.cpp +++ /dev/null @@ -1,139 +0,0 @@ -#include "Consumer_Router.h" -// $Id$ - -#include "Options.h" - -#if defined (ACE_HAS_THREADS) - -typedef Acceptor_Factory<Consumer_Handler, CONSUMER_KEY> CONSUMER_FACTORY; - -int -Consumer_Handler::open (void *a) -{ - CONSUMER_FACTORY *af = (CONSUMER_FACTORY *) a; - this->router_task_ = af->router (); - return this->Peer_Handler<CONSUMER_ROUTER, CONSUMER_KEY>::open (a); -} - -Consumer_Handler::Consumer_Handler (ACE_Thread_Manager *tm) - : Peer_Handler<CONSUMER_ROUTER, CONSUMER_KEY> (tm) -{ -} - -// Create a new handler that will interact with a consumer and point -// its ROUTER_TASK_ data member to the CONSUMER_ROUTER. - -Consumer_Router::Consumer_Router (ACE_Thread_Manager *tm) - : CONSUMER_ROUTER (tm) -{ -} - -// Initialize the Router.. - -int -Consumer_Router::open (void *) -{ - ACE_ASSERT (this->is_reader ()); - char *argv[3]; - - argv[0] = (char *) this->name (); - argv[1] = options.consumer_file (); - argv[2] = 0; - - if (this->init (1, &argv[1]) == -1) - return -1; - - // Make this an active object. - // return this->activate (options.t_flags ()); - - // Until that's done, return 1 to indicate that the object wasn't activated. - return 1; -} - -int -Consumer_Router::close (u_long) -{ - ACE_ASSERT (this->is_reader ()); - this->peer_map_.close (); - this->msg_queue ()->deactivate(); - return 0; -} - - -// Handle incoming messages in a separate thread.. - -int -Consumer_Router::svc (void) -{ - ACE_Thread_Control tc (this->thr_mgr ()); - ACE_Message_Block *mb = 0; - - ACE_ASSERT (this->is_reader ()); - - if (options.debug ()) - ACE_DEBUG ((LM_DEBUG, "(%t) starting svc in %s\n", this->name ())); - - while (this->getq (mb) > 0) - { - if (this->put_next (mb) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%t) put_next failed in %s\n", this->name ()), -1); - - } - return 0; - // Note the implicit ACE_OS::thr_exit() via destructor. -} - -// Send a MESSAGE_BLOCK to the supplier(s).. - -int -Consumer_Router::put (ACE_Message_Block *mb, ACE_Time_Value *) -{ - ACE_ASSERT (this->is_reader ()); - - if (mb->msg_type () == ACE_Message_Block::MB_IOCTL) - { - this->control (mb); - return this->put_next (mb); - } - else -{ -//printf("consumer-Router is routing : send_peers\n"); - return this->send_peers (mb); -} -} - -// Return information about the Client_Router ACE_Module.. - -int -Consumer_Router::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_UPIPE_Addr addr; - const char *mod_name = this->name (); - ACE_UPIPE_Acceptor &sa = (ACE_UPIPE_Acceptor &) *this->acceptor_; - - if (sa.get_local_addr (addr) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s\t /%s %s", - mod_name, "upipe", - "# consumer router\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (mod_name)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, mod_name, length); - return ACE_OS::strlen (mod_name); -} - -#endif /* ACE_HAS_THREADS */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Acceptor<Consumer_Handler, ACE_UPIPE_ACCEPTOR>; -template class ACE_Map_Iterator<long, Consumer_Handler *, ACE_RW_Mutex>; -template class ACE_Map_Manager<long, Consumer_Handler *, ACE_RW_Mutex>; -template class Acceptor_Factory<Consumer_Handler, CONSUMER_KEY>; -template class Peer_Handler<CONSUMER_ROUTER, CONSUMER_KEY>; -template class Peer_Router<Consumer_Handler, CONSUMER_KEY>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/ASX/UPIPE_Event_Server/Consumer_Router.h b/examples/ASX/UPIPE_Event_Server/Consumer_Router.h deleted file mode 100644 index 07e24ae8dab..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Consumer_Router.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// The interface between one or more consumers and an Event Server -// ACE_Stream. - -#if !defined (_CONSUMER_ROUTER_H) -#define _CONSUMER_ROUTER_H - -#include "ace/Thread_Manager.h" -#include "ace/UPIPE_Acceptor.h" -#include "ace/UPIPE_Addr.h" -#include "ace/Svc_Handler.h" -#include "Peer_Router.h" - -#if defined (ACE_HAS_THREADS) - -class Consumer_Handler; // Forward declaration.... - -typedef long CONSUMER_KEY; - -typedef Peer_Router<Consumer_Handler, CONSUMER_KEY> CONSUMER_ROUTER; - -class Consumer_Handler - : public Peer_Handler<CONSUMER_ROUTER, CONSUMER_KEY> -{ -public: - Consumer_Handler (ACE_Thread_Manager *tm = 0); - virtual int open (void *); -}; - -class Consumer_Router : public CONSUMER_ROUTER -{ -public: - Consumer_Router (ACE_Thread_Manager *thr_manager); - -protected: - // ACE_Task hooks.. - virtual int open (void *a = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0); - virtual int svc (void); - - // Dynamic linking hooks. - virtual int info (char **info_string, size_t length) const; -}; -#endif /* ACE_HAS_THREADS */ -#endif /* _CONSUMER_ROUTER_H */ diff --git a/examples/ASX/UPIPE_Event_Server/Event_Analyzer.cpp b/examples/ASX/UPIPE_Event_Server/Event_Analyzer.cpp deleted file mode 100644 index 10133b3c90e..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Event_Analyzer.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include "Event_Analyzer.h" -// $Id$ - - -#if defined (ACE_HAS_THREADS) - -int -Event_Analyzer::open (void *) -{ - return 0; -} - -int -Event_Analyzer::close (u_long) -{ - return 0; -} - -int -Event_Analyzer::control (ACE_Message_Block *mb) -{ - ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr (); - ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd; - - switch (cmd = ioc->cmd ()) - { - case ACE_IO_Cntl_Msg::SET_LWM: - case ACE_IO_Cntl_Msg::SET_HWM: - this->water_marks (cmd, *(size_t *) mb->cont ()->rd_ptr ()); - break; - default: - break; - } - return 0; -} - -int -Event_Analyzer::put (ACE_Message_Block *mb, ACE_Time_Value *) -{ - if (mb->msg_type () == ACE_Message_Block::MB_IOCTL) - this->control (mb); - - return this->put_next (mb); -} - -int -Event_Analyzer::init (int, char *[]) -{ - return 0; -} - -int -Event_Analyzer::fini (void) -{ - return 0; -} - -int -Event_Analyzer::info (char **strp, size_t length) const -{ - const char *mod_name = this->name (); - - if (*strp == 0 && (*strp = ACE_OS::strdup (mod_name)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, mod_name, length); - return ACE_OS::strlen (mod_name); -} - -#endif /* ACE_HAS_THREADS */ diff --git a/examples/ASX/UPIPE_Event_Server/Event_Analyzer.h b/examples/ASX/UPIPE_Event_Server/Event_Analyzer.h deleted file mode 100644 index a815e7d642a..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Event_Analyzer.h +++ /dev/null @@ -1,33 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// Signal router. - -#if !defined (_EVENT_ANALYZER_H) -#define _EVENT_ANALYZER_H - -#include "ace/Stream.h" -#include "ace/Module.h" -#include "ace/Task.h" -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -class Event_Analyzer : public ACE_Task<ACE_MT_SYNCH> -{ -public: - virtual int open (void *a = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0); - - // Dynamic linking hooks. - virtual int init (int argc, char *argv[]); - virtual int fini (void); - virtual int info (char **info_string, size_t length) const; - -private: - virtual int control (ACE_Message_Block *); -}; - -#endif /* ACE_HAS_THREADS */ -#endif /* _EVENT_ANALYZER_H */ diff --git a/examples/ASX/UPIPE_Event_Server/Makefile b/examples/ASX/UPIPE_Event_Server/Makefile deleted file mode 100644 index 635737700a3..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Makefile +++ /dev/null @@ -1,366 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Event Server test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = event_server - -FILES = Options \ - Supplier_Router \ - Event_Analyzer \ - Consumer_Router \ - Peer_Router - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LDLIBS = $(addprefix .shobj/,$(SHOBJ)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Options.o .shobj/Options.so: Options.cpp \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - Options.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - Options.i -.obj/Supplier_Router.o .shobj/Supplier_Router.so: Supplier_Router.cpp Supplier_Router.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.i \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - Peer_Router.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - Options.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - Options.i -.obj/Event_Analyzer.o .shobj/Event_Analyzer.so: Event_Analyzer.cpp Event_Analyzer.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/Consumer_Router.o .shobj/Consumer_Router.so: Consumer_Router.cpp Consumer_Router.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.i \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - Peer_Router.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - Options.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - Options.i -.obj/Peer_Router.o .shobj/Peer_Router.so: Peer_Router.cpp \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - Peer_Router.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.i \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - Options.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - Options.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/ASX/UPIPE_Event_Server/Options.cpp b/examples/ASX/UPIPE_Event_Server/Options.cpp deleted file mode 100644 index f77333da2a3..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Options.cpp +++ /dev/null @@ -1,191 +0,0 @@ -#include "ace/Get_Opt.h" -// $Id$ - -#include "ace/Synch.h" - -#include "Options.h" - -#if defined (ACE_HAS_THREADS) - -Options::Options (void) - : thr_count_ (4), - t_flags_ (THR_DETACHED), - high_water_mark_ (8 * 1024), - low_water_mark_ (1024), - message_size_ (128), - initial_queue_length_ (0), - iterations_ (100000), - debugging_ (0), - verbosity_ (0), - consumer_port_ ("-p 10000"), - supplier_port_ ("-p 10001"), - consumer_file_ ("-f/tmp/conupipe"), - supplier_file_ ("-f/tmp/supupipe") -{ -} - -Options::~Options (void) -{ -} - -void Options::print_results (void) -{ - ACE_Profile_Timer::ACE_Elapsed_Time et; - this->itimer_.elapsed_time (et); - -#if defined (ACE_HAS_PRUSAGE_T) - prusage_t rusage; - this->itimer_.get_rusage (rusage); - - if (options.verbose ()) - { - ACE_OS::printf ("final concurrency hint = %d\n", ACE_OS::thr_getconcurrency ()); - ACE_OS::printf ("%8d = lwpid\n" - "%8d = lwp count\n" - "%8d = minor page faults\n" - "%8d = major page faults\n" - "%8d = input blocks\n" - "%8d = output blocks\n" - "%8d = messages sent\n" - "%8d = messages received\n" - "%8d = signals received\n" - "%8ds, %dms = wait-cpu (latency) time\n" - "%8ds, %dms = user lock wait sleep time\n" - "%8ds, %dms = all other sleep time\n" - "%8d = voluntary context switches\n" - "%8d = involuntary context switches\n" - "%8d = system calls\n" - "%8d = chars read/written\n", - rusage.pr_lwpid, - rusage.pr_count, - rusage.pr_minf, - rusage.pr_majf, - rusage.pr_inblk, - rusage.pr_oublk, - rusage.pr_msnd, - rusage.pr_mrcv, - rusage.pr_sigs, - rusage.pr_wtime.tv_sec, rusage.pr_wtime.tv_nsec / 1000000, - rusage.pr_ltime.tv_sec, rusage.pr_ltime.tv_nsec / 1000000, - rusage.pr_slptime.tv_sec, rusage.pr_slptime.tv_nsec / 1000000, - rusage.pr_vctx, - rusage.pr_ictx, - rusage.pr_sysc, - rusage.pr_ioch); - } -#endif /* ACE_HAS_PRUSAGE_T */ - - ACE_OS::printf ("---------------------\n" - "real time = %.3f\n" - "user time = %.3f\n" - "system time = %.3f\n" - "---------------------\n", - et.real_time, et.user_time, et.system_time); -} - -// Manages the options. -Options options; - -void -Options::parse_args (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - - ACE_Get_Opt getopt (argc, argv, "C:c:bdH:i:L:l:M:nS:s:t:T:v"); - int c; - - while ((c = getopt ()) != -1) - switch (c) - { - case 'b': - this->t_flags (THR_BOUND); - break; - case 'C': - this->consumer_file (getopt.optarg); - break; - case 'c': - this->consumer_port (getopt.optarg); - break; - case 'd': - this->debugging_ = 1; - break; - case 'H': - this->high_water_mark (ACE_OS::atoi (getopt.optarg)); - break; - case 'i': - this->iterations (ACE_OS::atoi (getopt.optarg)); - break; - case 'L': - this->low_water_mark (ACE_OS::atoi (getopt.optarg)); - break; - case 'l': - this->initial_queue_length (ACE_OS::atoi (getopt.optarg)); - break; - case 'M': - this->message_size (ACE_OS::atoi (getopt.optarg)); - break; - case 'n': - this->t_flags (THR_NEW_LWP); - break; - case 'S': - this->supplier_file (getopt.optarg); - break; - case 's': - this->supplier_port (getopt.optarg); - break; - case 'T': - if (ACE_OS::strcasecmp (getopt.optarg, "ON") == 0) - ACE_Trace::start_tracing (); - else if (ACE_OS::strcasecmp (getopt.optarg, "OFF") == 0) - ACE_Trace::stop_tracing (); - break; - case 't': - this->thr_count (ACE_OS::atoi (getopt.optarg)); - break; - case 'v': - this->verbosity_ = 1; - break; - default: - ::fprintf (stderr, "%s\n" - "\t[-b] (THR_BOUND)\n" - "\t[-C consumer file]\n" - "\t[-c consumer port]\n" - "\t[-d] (enable debugging)\n" - "\t[-H high water mark]\n" - "\t[-i number of test iterations]\n" - "\t[-L low water mark]\n" - "\t[-M] message size \n" - "\t[-n] (THR_NEW_LWP)\n" - "\t[-q max queue size]\n" - "\t[-S supplier file]\n" - "\t[-s supplier port]\n" - "\t[-t number of threads]\n" - "\t[-v] (verbose) \n", - argv[0]); - ::exit (1); - /* NOTREACHED */ - break; - } - - if (this->verbose ()) - ACE_OS::printf ("%8d = initial concurrency hint\n" - "%8d = total iterations\n" - "%8d = thread count\n" - "%8d = low water mark\n" - "%8d = high water mark\n" - "%8d = message_size\n" - "%8d = initial queue length\n" - "%8d = THR_BOUND\n" - "%8d = THR_NEW_LWP\n", - ACE_OS::thr_getconcurrency (), - this->iterations (), - this->thr_count (), - this->low_water_mark (), - this->high_water_mark (), - this->message_size (), - this->initial_queue_length (), - (this->t_flags () & THR_BOUND) != 0, - (this->t_flags () & THR_NEW_LWP) != 0); -} - -#endif /* ACE_HAS_THREADS */ diff --git a/examples/ASX/UPIPE_Event_Server/Options.h b/examples/ASX/UPIPE_Event_Server/Options.h deleted file mode 100644 index fff2593e435..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Options.h +++ /dev/null @@ -1,83 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// Option manager for Event Server. - -#if !defined (DEVICE_OPTIONS_H) -#define DEVICE_OPTIONS_H - -#include "ace/OS.h" -#include "ace/Profile_Timer.h" - -#if defined (ACE_HAS_THREADS) - -class Options -{ -public: - Options (void); - ~Options (void); - void parse_args (int argc, char *argv[]); - - void stop_timer (void); - void start_timer (void); - - void thr_count (size_t count); - size_t thr_count (void); - - void initial_queue_length (size_t length); - size_t initial_queue_length (void); - - void high_water_mark (size_t size); - size_t high_water_mark (void); - - void low_water_mark (size_t size); - size_t low_water_mark (void); - - void message_size (size_t size); - size_t message_size (void); - - void iterations (size_t n); - size_t iterations (void); - - void t_flags (long flag); - long t_flags (void); - - void supplier_port (char *port); - char *supplier_port (void); - - void consumer_port (char *port); - char *consumer_port (void); - - void supplier_file (char *file); - char *supplier_file (void); - - void consumer_file (char *file); - char *consumer_file (void); - - int debug (void); - int verbose (void); - - void print_results (void); - -private: - ACE_Profile_Timer itimer_; // Time the process. - size_t thr_count_; // Number of threads to spawn. - long t_flags_; // Flags to thr_create(). - size_t high_water_mark_; // ACE_Task high water mark. - size_t low_water_mark_; // ACE_Task low water mark. - size_t message_size_; // Size of a message. - size_t initial_queue_length_; // Initial number of items in the queue. - size_t iterations_; // Number of iterations to run the test program. - int debugging_; // Extra debugging info. - int verbosity_; // Extra verbose messages. - char *consumer_port_; // Port that the Consumer_Router is using. - char *supplier_port_; // Port that the Supplier_Router is using. - char *consumer_file_; // file that the Consumer_Router is using. - char *supplier_file_; // file that the Supplier_Router is using. -}; - -extern Options options; - -#include "Options.i" -#endif /* ACE_HAS_THREADS */ -#endif /* DEVICE_OPTIONS_H */ diff --git a/examples/ASX/UPIPE_Event_Server/Options.i b/examples/ASX/UPIPE_Event_Server/Options.i deleted file mode 100644 index 4641b301473..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Options.i +++ /dev/null @@ -1,161 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// Option manager for ustreams. - -inline void -Options::supplier_port (char *port) -{ - this->supplier_port_ = port; -} - -inline char * -Options::supplier_port (void) -{ - return this->supplier_port_; -} - -inline void -Options::supplier_file (char *file) -{ - this->supplier_file_ = file; -} - -inline char * -Options::supplier_file (void) -{ - return this->supplier_file_; -} - -inline void -Options::consumer_file (char *file) -{ - this->consumer_file_ = file; -} - -inline char * -Options::consumer_file (void) -{ - return this->consumer_file_; -} - -inline void -Options::consumer_port (char *port) -{ - this->consumer_port_ = port; -} - -inline char * -Options::consumer_port (void) -{ - return this->consumer_port_; -} - -inline void -Options::start_timer (void) -{ - this->itimer_.start (); -} - -inline void -Options::stop_timer (void) -{ - this->itimer_.stop (); -} - -inline void -Options::thr_count (size_t count) -{ - this->thr_count_ = count; -} - -inline size_t -Options::thr_count (void) -{ - return this->thr_count_; -} - -inline void -Options::initial_queue_length (size_t length) -{ - this->initial_queue_length_ = length; -} - -inline size_t -Options::initial_queue_length (void) -{ - return this->initial_queue_length_; -} - -inline void -Options::high_water_mark (size_t size) -{ - this->high_water_mark_ = size; -} - -inline size_t -Options::high_water_mark (void) -{ - return this->high_water_mark_; -} - -inline void -Options::low_water_mark (size_t size) -{ - this->low_water_mark_ = size; -} - -inline size_t -Options::low_water_mark (void) -{ - return this->low_water_mark_; -} - -inline void -Options::message_size (size_t size) -{ - this->message_size_ = size; -} - -inline size_t -Options::message_size (void) -{ - return this->message_size_; -} - -inline void -Options::iterations (size_t n) -{ - this->iterations_ = n; -} - -inline size_t -Options::iterations (void) -{ - return this->iterations_; -} - -inline void -Options::t_flags (long flag) -{ - this->t_flags_ |= flag; -} - -inline long -Options::t_flags (void) -{ - return this->t_flags_; -} - -inline int -Options::debug (void) -{ - return this->debugging_; -} - -inline int -Options::verbose (void) -{ - return this->verbosity_; -} - diff --git a/examples/ASX/UPIPE_Event_Server/Peer_Router.cpp b/examples/ASX/UPIPE_Event_Server/Peer_Router.cpp deleted file mode 100644 index a0bffc95627..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Peer_Router.cpp +++ /dev/null @@ -1,273 +0,0 @@ -#if !defined (_PEER_ROUTER_C) -// $Id$ - -#define _PEER_ROUTER_C - -#include "ace/Get_Opt.h" -#include "ace/Service_Config.h" - -#include "Peer_Router.h" -#include "Options.h" - -#if defined (ACE_HAS_THREADS) - -// Define some short-hand macros to deal with long templates -// names... - -#define PH PEER_HANDLER -#define PA PEER_ACCEPTOR -#define PAD PEER_ADDR -#define PK PEER_KEY -#define PM PEER_MAP - -template <class PH, class PK> int -Acceptor_Factory<PH, PK>::init (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "df:", 0); - ACE_UPIPE_Addr addr; - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'f': - addr.set (get_opt.optarg); - break; - case 'd': - break; - default: - break; - } - - if (this->open (addr, ACE_Service_Config::reactor ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - return 0; -} - -template <class PH, class PK> -Acceptor_Factory<PH, PK>::Acceptor_Factory (Peer_Router<PH, PK> *pr) - : pr_ (pr) -{ -} - -template <class PH, class PK> Peer_Router<PH, PK> * -Acceptor_Factory<PH, PK>::router (void) -{ - return this->pr_; -} - -template <class ROUTER, class KEY> -Peer_Handler<ROUTER, KEY>::Peer_Handler (ACE_Thread_Manager *tm) - : ACE_Svc_Handler<ACE_UPIPE_Stream, ACE_UPIPE_Addr, ACE_MT_SYNCH> (tm) -{ -} - -template <class ROUTER, class KEY> int -Peer_Handler<ROUTER, KEY>::svc (void) -{ - ACE_Thread_Control thread_control (tm); - // just a try !! - // we're just reading from our ACE_Message_Queue - ACE_Message_Block *db, *hb; - int n; - // do an endless loop - for (;;) - { - db = new ACE_Message_Block (BUFSIZ); - hb = new ACE_Message_Block (sizeof (KEY), ACE_Message_Block::MB_PROTO, db); - - if ((n = this->peer ().recv (db->rd_ptr (), db->size ())) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "recv failed"), -1); - else if (n == 0) // Client has closed down the connection. - { - - if (this->router_task_->unbind_peer (this->get_handle ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "unbind failed"), -1); - ACE_DEBUG ((LM_DEBUG, "(%t) shutting down \n")); - return -1; // We do not need to be deregistered by reactor - // as we were not registered at all - } - else // Transform incoming buffer into a Message and pass downstream. - { - db->wr_ptr (n); - *(long *) hb->rd_ptr () = this->get_handle (); // structure assignment. - hb->wr_ptr (sizeof (long)); - if (this->router_task_->reply (hb) == -1) - { - cout << "Peer_Handler.svc : router_task->reply failed" << endl ; - return -1; - } - - // return this->router_task_->reply (hb) == -1 ? -1 : 0; - } - } - return 0; -} - -template <class ROUTER, class KEY> int -Peer_Handler<ROUTER, KEY>::put (ACE_Message_Block *mb, ACE_Time_Value *) -{ - return this->peer ().send_n (mb->rd_ptr (), mb->length ()); -} - -// Create a new handler and point its ROUTER_TASK_ data member to the -// corresponding router. Note that this router is extracted out of -// the Acceptor_Factory * that is passed in via the -// ACE_Acceptor::handle_input() method. - -template <class ROUTER, class KEY> int -Peer_Handler<ROUTER, KEY>::open (void *a) -{ - char buf[BUFSIZ], *p = buf; - - if (this->router_task_->info (&p, sizeof buf) != -1) - ACE_DEBUG ((LM_DEBUG, "(%t) creating handler for %s, fd = %d, this = %d\n", - buf, this->get_handle (), a)); - else - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "info"), -1); - - if ( this->activate (options.t_flags ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "activation of thread failed"), -1); - else if (this->router_task_->bind_peer (this->get_handle (), this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "bind_peer"), -1); - return 0; -} - -// Receive a message from a supplier.. - -template <class ROUTER, class KEY> int -Peer_Handler<ROUTER, KEY>::handle_input (ACE_HANDLE h) -{ - - ACE_DEBUG ((LM_DEBUG, "(%t) input arrived on sd %d\n", h)); -// ACE_Service_Config::reactor ()->remove_handler(h, -// ACE_Event_Handler::ALL_EVENTS_MASK -// |ACE_Event_Handler::DONT_CALL); -// this method should be called only if the peer shuts down -// so we deactivate our ACE_Message_Queue to awake our svc thread - - return 0; - -#if 0 - ACE_Message_Block *db = new ACE_Message_Block (BUFSIZ); - ACE_Message_Block *hb = new ACE_Message_Block (sizeof (KEY), ACE_Message_Block::MB_PROTO, db); - int n; - - if ((n = this->peer ().recv (db->rd_ptr (), db->size ())) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "recv failed"), -1); - else if (n == 0) // Client has closed down the connection. - { - if (this->router_task_->unbind_peer (this->get_handle ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "unbind failed"), -1); - ACE_DEBUG ((LM_DEBUG, "(%t) shutting down %d\n", h)); - return -1; // Instruct the ACE_Reactor to deregister us by returning -1. - } - else // Transform incoming buffer into a Message and pass downstream. - { - db->wr_ptr (n); - *(long *) hb->rd_ptr () = this->get_handle (); // structure assignment. - hb->wr_ptr (sizeof (long)); - return this->router_task_->reply (hb) == -1 ? -1 : 0; - } -#endif -} - -template <class PH, class PK> -Peer_Router<PH, PK>::Peer_Router (ACE_Thread_Manager *tm) - : ACE_Task<ACE_MT_SYNCH> (tm) -{ -} - -template <class PH, class PK> int -Peer_Router<PH, PK>::send_peers (ACE_Message_Block *mb) -{ - ACE_Map_Iterator<PK, PH *, ACE_RW_Mutex> map_iter = this->peer_map_; - int bytes = 0; - int iterations = 0; - ACE_Message_Block *data_block = mb->cont (); - for (ACE_Map_Entry<PK, PH *> *ss = 0; - map_iter.next (ss) != 0; - map_iter.advance ()) - { - if (options.debug ()) - ACE_DEBUG ((LM_DEBUG, "(%t) sending to peer via sd %d\n", ss->ext_id_)); - - iterations++; - bytes += ss->int_id_->put (data_block); - } - - mb->release (); - return bytes == 0 ? 0 : bytes / iterations; -} - -template <class PH, class PK> -Peer_Router<PH, PK>::~Peer_Router (void) -{ -} - -template <class PH, class PK> int -Peer_Router<PH, PK>::fini (void) -{ - delete this->acceptor_; - return 0; -} - -template <class PH, class PK> int -Peer_Router<PH, PK>::control (ACE_Message_Block *mb) -{ - ACE_IO_Cntl_Msg *ioc = (ACE_IO_Cntl_Msg *) mb->rd_ptr (); - ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds command; - - switch (command = ioc->cmd ()) - { - case ACE_IO_Cntl_Msg::SET_LWM: - case ACE_IO_Cntl_Msg::SET_HWM: - this->water_marks (command, *(size_t *) mb->cont ()->rd_ptr ()); - break; - default: - return -1; - } - return 0; -} - -template <class PH, class PK> int -Peer_Router<PH, PK>::unbind_peer (PK key) -{ - return this->peer_map_.unbind (key); -} - -template <class PH, class PK> int -Peer_Router<PH, PK>::bind_peer (PK key, Peer_Handler<Peer_Router<PH, PK>, PK> *ph) -{ - PH *peer_handler = (PH *) ph; - return this->peer_map_.bind (key, peer_handler); -} - -template <class PH, class PK> int -Peer_Router<PH, PK>::init (int argc, char *argv[]) -{ - this->acceptor_ = new Acceptor_Factory <PH, PK> (this); - - if (this->acceptor_->init (argc, argv) == -1 - || this->peer_map_.open () == -1) - return -1; - else - { - ACE_UPIPE_Addr addr; - ACE_UPIPE_Acceptor &pa = this->acceptor_->acceptor (); - - if (pa.get_local_addr (addr) != -1) - ACE_DEBUG ((LM_DEBUG, "(%t) initializing %s, file = %s, fd = %d, this = %u\n", - this->name (), addr.get_path_name (), pa.get_handle (), this)); - else - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "get_local_addr"), -1); - } - return 0; -} - -#undef PH -#undef PA -#undef PAD -#undef PK -#undef PM -#endif /* ACE_HAS_THREADS */ -#endif /* _PEER_ROUTER_C */ diff --git a/examples/ASX/UPIPE_Event_Server/Peer_Router.h b/examples/ASX/UPIPE_Event_Server/Peer_Router.h deleted file mode 100644 index f017e850b23..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Peer_Router.h +++ /dev/null @@ -1,116 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// The interface between one or more peers and a stream. A peer -// typically runs remotely on another machine. - -#if !defined (_PEER_ROUTER_H) -#define _PEER_ROUTER_H - -#include "ace/Acceptor.h" -#include "ace/Svc_Handler.h" -#include "ace/UPIPE_Acceptor.h" -#include "ace/UPIPE_Addr.h" -#include "ace/Thread_Manager.h" -#include "ace/Map_Manager.h" - -#if defined (ACE_HAS_THREADS) - -// Forward declaration. -template <class PEER_HANDLER, class KEY> -class Peer_Router; - -template <class PEER_HANDLER, class KEY> -class Acceptor_Factory : public ACE_Acceptor<PEER_HANDLER, ACE_UPIPE_ACCEPTOR> -{ -public: - Acceptor_Factory (Peer_Router<PEER_HANDLER, KEY> *pr); - Peer_Router<PEER_HANDLER, KEY> *router (void); - - int init (int argc, char *argv[]); - // Initialize the acceptor when it's linked dynamically. - -private: - Peer_Router<PEER_HANDLER, KEY> *pr_; -}; - -// Receive input from a Peer.. -template <class ROUTER, class KEY> -class Peer_Handler : public ACE_Svc_Handler<ACE_UPIPE_STREAM, ACE_MT_SYNCH> -{ -public: - Peer_Handler (ACE_Thread_Manager * = 0); - - virtual int open (void * = 0); - // Called by the ACE_Acceptor::handle_input() to activate this object. - - virtual int handle_input (ACE_HANDLE); - // Receive input from the peer.. - - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); - // Send output to a peer. - -protected: - ROUTER *router_task_; - // Pointer to write task.. - -private: - // Don't need this method here... - virtual int svc (void); -}; - -// This abstract base class provides mechanisms for routing messages -// to/from a ACE_Stream from/to one or more peers (which are typically -// running on remote hosts). A subclass of Peer_Router overrides the -// open(), close(), and put() methods in order to specialize the -// behavior of the router to meet application-specific requirements. - -template <class PEER_HANDLER, class PEER_KEY> -class Peer_Router : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Peer_Router (ACE_Thread_Manager * = 0); - ~Peer_Router (void); - - typedef Peer_Handler<Peer_Router<PEER_HANDLER, PEER_KEY>, PEER_KEY> HANDLER; - - // Remove a PEER_HANDLER from the PEER_MAP. - virtual int unbind_peer (PEER_KEY); - - // Add a PEER_HANDLER to the PEER_MAP. - virtual int bind_peer (PEER_KEY, HANDLER *); - - // Send the message block to the peer(s).. - int send_peers (ACE_Message_Block *mb); - -protected: -// Handle control messages arriving from adjacent Modules. - virtual int control (ACE_Message_Block *); - - // Map used to keep track of active peers. - ACE_Map_Manager <PEER_KEY, PEER_HANDLER *, ACE_RW_Mutex> peer_map_; - - // Dynamic linking initialization hooks inherited from ACE_Task. - virtual int init (int argc, char *argv[]); - virtual int fini (void); - - // Factory for accepting new PEER_HANDLERs. - Acceptor_Factory<PEER_HANDLER, PEER_KEY> *acceptor_; - -private: -// Prevent copies and pass-by-value. - Peer_Router (const Peer_Router<PEER_HANDLER, PEER_KEY> &); - void operator= (const Peer_Router<PEER_HANDLER, PEER_KEY> &); -}; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Peer_Router.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ -#endif /* ACE_HAS_THREADS */ -#endif /* _PEER_ROUTER_H */ diff --git a/examples/ASX/UPIPE_Event_Server/Supplier_Router.cpp b/examples/ASX/UPIPE_Event_Server/Supplier_Router.cpp deleted file mode 100644 index 7f02db5db67..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Supplier_Router.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#include "Supplier_Router.h" -// $Id$ - -#include "Options.h" - -#if defined (ACE_HAS_THREADS) - -typedef Acceptor_Factory<Supplier_Handler, SUPPLIER_KEY> SUPPLIER_FACTORY; - -int -Supplier_Handler::open (void *a) -{ - SUPPLIER_FACTORY *af = (SUPPLIER_FACTORY *) a; - this->router_task_ = af->router (); - return this->Peer_Handler<SUPPLIER_ROUTER, SUPPLIER_KEY>::open (a); -} - -Supplier_Handler::Supplier_Handler (ACE_Thread_Manager *tm) - : Peer_Handler<SUPPLIER_ROUTER, SUPPLIER_KEY> (tm) -{ -} - -// Create a new router and associate it with the REACTOR parameter.. - -Supplier_Router::Supplier_Router (ACE_Thread_Manager *tm) - : SUPPLIER_ROUTER (tm) -{ -} - -// Handle incoming messages in a separate thread.. - -int -Supplier_Router::svc (void) -{ - ACE_ASSERT (this->is_writer ()); - - ACE_Thread_Control tc (this->thr_mgr ()); - ACE_Message_Block *message_block = 0; - - if (options.debug ()) - ACE_DEBUG ((LM_DEBUG, "(%t) starting svc in %s\n", this->name ())); - - while (this->getq (message_block) > 0) - { - if (this->put_next (message_block) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%t) put_next failed in %s\n", this->name ()), -1); - } - - return 0; - // Note the implicit ACE_OS::thr_exit() via ACE_Thread_Control's destructor. -} - -// Initialize the Router.. - -int -Supplier_Router::open (void *) -{ - ACE_ASSERT (this->is_writer ()); - char *argv[3]; - - argv[0] = (char *) this->name (); - argv[1] = options.supplier_file (); - argv[2] = 0; - - if (this->init (1, &argv[1]) == -1) - return -1; - - // Make this an active object. - // return this->activate (options.t_flags ()); - - // Until that's done, return 1 to indicate that the object wasn't activated. - return 1; -} - -// Close down the router.. - -int -Supplier_Router::close (u_long) -{ - ACE_ASSERT (this->is_writer ()); - this->peer_map_.close (); - this->msg_queue ()->deactivate(); - return 0; -} - -// Send a MESSAGE_BLOCK to the supplier(s).. - -int -Supplier_Router::put (ACE_Message_Block *mb, ACE_Time_Value *) -{ - ACE_ASSERT (this->is_writer ()); - - if (mb->msg_type () == ACE_Message_Block::MB_IOCTL) - { - this->control (mb); - return this->put_next (mb); - } - else - { -//printf("supplier-Router is routing: send_peers\n"); - return this->send_peers (mb); - } -} - -// Return information about the Supplier_Router ACE_Module.. - -int -Supplier_Router::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_UPIPE_Addr addr; - const char *mod_name = this->name (); - ACE_UPIPE_Acceptor &sa = (ACE_UPIPE_Acceptor &) *this->acceptor_; - - if (sa.get_local_addr (addr) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s\t %s/ %s", - mod_name, "upipe", - "# supplier router\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (mod_name)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, mod_name, length); - return ACE_OS::strlen (mod_name); -} - -#endif /* ACE_HAS_THREADS */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class Acceptor_Factory<Supplier_Handler, SUPPLIER_KEY>; -template class ACE_Acceptor<Supplier_Handler, ACE_UPIPE_ACCEPTOR>; -template class ACE_Guard<ACE_RW_Mutex>; -template class ACE_Map_Iterator<SUPPLIER_KEY, Supplier_Handler *, ACE_RW_Mutex>; -template class ACE_Map_Manager<SUPPLIER_KEY, Supplier_Handler *, ACE_RW_Mutex>; -template class ACE_Read_Guard<ACE_RW_Mutex>; -template class ACE_Write_Guard<ACE_RW_Mutex>; -template class ACE_Svc_Handler<ACE_UPIPE_STREAM, ACE_MT_SYNCH>; -template class ACE_TSS<ACE_Dynamic>; -template class Peer_Handler<SUPPLIER_ROUTER, SUPPLIER_KEY>; -template class Peer_Router<Supplier_Handler, SUPPLIER_KEY>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/ASX/UPIPE_Event_Server/Supplier_Router.h b/examples/ASX/UPIPE_Event_Server/Supplier_Router.h deleted file mode 100644 index 93448936aa3..00000000000 --- a/examples/ASX/UPIPE_Event_Server/Supplier_Router.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// The interface between a supplier and an Event Service ACE_Stream. - -#if !defined (_SUPPLIER_ROUTER_H) -#define _SUPPLIER_ROUTER_H - -#include "ace/UPIPE_Addr.h" -#include "ace/UPIPE_Acceptor.h" -#include "ace/Map_Manager.h" -#include "ace/Svc_Handler.h" -#include "Peer_Router.h" - -#if defined (ACE_HAS_THREADS) - -// Forward declaration. -class Supplier_Handler; - -// Type of search key for SUPPLIER_MAP. -typedef long SUPPLIER_KEY; - -// Instantiated type for routing messages to suppliers. - -typedef Peer_Router<Supplier_Handler, SUPPLIER_KEY> SUPPLIER_ROUTER; - -class Supplier_Handler - : public Peer_Handler<SUPPLIER_ROUTER, SUPPLIER_KEY> -{ -public: - Supplier_Handler (ACE_Thread_Manager *tm = 0); - virtual int open (void *); -}; - -class Supplier_Router : public SUPPLIER_ROUTER -{ -public: - Supplier_Router (ACE_Thread_Manager *); - -protected: - // ACE_Task hooks.. - virtual int open (void *a = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0); - virtual int svc (void); - - // Dynamic linking hooks inherited from Peer_Router. - virtual int info (char **info_string, size_t length) const; -}; - -#endif /* ACE_HAS_THREADS */ -#endif /* _SUPPLIER_ROUTER_H */ diff --git a/examples/ASX/UPIPE_Event_Server/event_server.cpp b/examples/ASX/UPIPE_Event_Server/event_server.cpp deleted file mode 100644 index c537b591030..00000000000 --- a/examples/ASX/UPIPE_Event_Server/event_server.cpp +++ /dev/null @@ -1,250 +0,0 @@ -// Test the event server. -// $Id$ - - -#include "ace/Stream.h" -#include "ace/Service_Config.h" -#include "Options.h" -#include "Consumer_Router.h" -#include "Event_Analyzer.h" -#include "Supplier_Router.h" -#include "ace/UPIPE_Acceptor.h" -#include "ace/UPIPE_Connector.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Stream<ACE_MT_SYNCH> MT_Stream; -typedef ACE_Module<ACE_MT_SYNCH> MT_Module; - -// Handle SIGINT and terminate the entire application. - -class Quit_Handler : public ACE_Sig_Adapter -{ -public: - Quit_Handler (void); - virtual int handle_input (ACE_HANDLE fd); -}; - -Quit_Handler::Quit_Handler (void) - : ACE_Sig_Adapter (ACE_Sig_Handler_Ex (ACE_Service_Config::end_reactor_event_loop)) -{ - // Register to trap input from the user. - if (ACE::register_stdin_handler (this, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); - // Register to trap the SIGINT signal. - else if (ACE_Service_Config::reactor ()->register_handler - (SIGINT, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_handler")); -} - -int -Quit_Handler::handle_input (ACE_HANDLE) -{ - options.stop_timer (); - ACE_DEBUG ((LM_INFO, " (%t) closing down the test\n")); - options.print_results (); - - ACE_Service_Config::end_reactor_event_loop (); - return 0; -} - -static void * -consumer (void *) -{ - ACE_UPIPE_Stream c_stream; - ACE_UPIPE_Addr c_addr ("/tmp/conupipe"); - - int verb = options.verbose (); - int msiz = options.message_size (); - int secs, par1, par2; - time_t currsec; - - if (verb) - cout << "consumer starting connect" << endl; - - ACE_UPIPE_Connector con; - - if (con.connect (c_stream, c_addr) == -1) - ACE_DEBUG ((LM_INFO, " (%t) connect failed\n")); - else - cout << "consumer :we're connected" << endl; - - int n; - ACE_Message_Block *mb_p; - - int done = 0; - int cnt = 0; - ACE_OS::time (&currsec); - - par1= (time_t) currsec; - - while (done == 0 - && ((n = c_stream.recv (mb_p)) != -1)) - if (mb_p->length () > 1) - { - cnt++; - if (verb) - cout << " consumer received message !!!!!! " - << mb_p->rd_ptr () << endl; - } - else - { - if (verb) - cout << "consumer got last mb" - << (char) * (mb_p->rd_ptr ()) << endl; - c_stream.close (); - done = 1; - } - - ACE_OS::time (&currsec); - par2 = (time_t) currsec; - - secs = par2 - par1; - - if (secs <= 0) - secs=1; - - cout << "consumer got " << cnt << " messages of size " << msiz - << "within " << secs << " seconds" << endl; - - ACE_OS::sleep (2); - cout << "consumer terminating " << endl; - return 0; -} - -static void * -supplier (void *dummy) -{ - ACE_UPIPE_Stream s_stream; - ACE_UPIPE_Addr serv_addr ("/tmp/supupipe"); - ACE_UPIPE_Connector con; - - int iter = options.iterations (); - int verb = options.verbose (); - int msiz = options.message_size (); - cout << "supplier starting connect" << endl; - - if (con.connect (s_stream, serv_addr) == -1) - ACE_DEBUG ((LM_INFO, " (%t) connect failed\n")); - - cout << "supplier : we're connected" << endl; - int n; - n = 0; - ACE_Message_Block * mb_p; - - while (n < iter) - { - mb_p = new ACE_Message_Block (msiz); - strcpy (mb_p->rd_ptr (), (char *) dummy); - mb_p->length (msiz); - if (verb) - cout << "supplier sending 1 message_block" << endl; - if (s_stream.send (mb_p) == -1) - { - cout << "supplier send failed" << endl; - return (void *) -1; - } - n++; - } - - mb_p = new ACE_Message_Block (10); - mb_p->length (1); - *mb_p->rd_ptr () = 'g'; - - cout << "supplier sending last message_block" << endl; - - if (s_stream.send (mb_p) == -1) - { - cout << "supplier send last mb failed" << endl; - return (void *) -1; - } - mb_p = new ACE_Message_Block (10); - mb_p->length (0); - - if (verb) - cout << "supplier sending very last message_block" << endl; - - if (s_stream.send (mb_p) == -1) - { - cout << "supplier send very last mb failed" << endl; - return (void *) -1; - } - - ACE_OS::sleep (2); - cout << "supplier terminating" << endl; - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - options.parse_args (argc, argv); - options.start_timer (); - - // Primary ACE_Stream for EVENT_SERVER application. - MT_Stream event_server; - - // Enable graceful shutdowns.... - Quit_Handler quit_handler; - - // Create the modules.. - - MT_Module *sr = new MT_Module ("Supplier_Router", - new Supplier_Router (ACE_Service_Config::thr_mgr ())); - MT_Module *ea = new MT_Module ("Event_Analyzer", - new Event_Analyzer, - new Event_Analyzer); - MT_Module *cr = new MT_Module ("Consumer_Router", - 0, // 0 triggers the creation of a ACE_Thru_Task... - new Consumer_Router (ACE_Service_Config::thr_mgr ())); - - // Push the modules onto the event_server stream. - - if (event_server.push (sr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "push (Supplier_Router)"), -1); - - if (event_server.push (ea) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "push (Event_Analyzer)"), -1); - - if (event_server.push (cr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "push (Consumer_Router)"), -1); - - // Set the high and low water marks appropriately. - - int wm = options.low_water_mark (); - - if (event_server.control (ACE_IO_Cntl_Msg::SET_LWM, &wm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "push (setting low watermark)"), -1); - - wm = options.high_water_mark (); - if (event_server.control (ACE_IO_Cntl_Msg::SET_HWM, &wm) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "push (setting high watermark)"), -1); - - // spawn the two threads. - - if (ACE_Service_Config::thr_mgr ()->spawn (ACE_THR_FUNC (consumer), (void *) 0, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); - - else if (ACE_Service_Config::thr_mgr ()->spawn (ACE_THR_FUNC (supplier), (void *) "hello", - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); - - // Perform the main event loop waiting for the user to type ^C or to - // enter a line on the ACE_STDIN. - - daemon.run_reactor_event_loop (); - - ACE_DEBUG ((LM_DEBUG, "main exiting\n")); -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "test not defined for this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/CORBA/Makefile b/examples/CORBA/Makefile deleted file mode 100644 index 5ca20af9257..00000000000 --- a/examples/CORBA/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the ACE_MT_CORBA_Handler tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -SRC = Test_i.cpp client.cpp server.cpp - -SVR_OBJS = TestS.o Test_i.o server.o -CLT_OBJS = TestC.o client.o - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Orbix related macros and target settings. -#---------------------------------------------------------------------------- - -ORBIX_BINDIR = $(ORBIX_ROOT)/bin -ORBIX_LIBDIR = $(ORBIX_ROOT)/lib -ORBIX_INCDIR = $(ORBIX_ROOT)/include - -CPPFLAGS += -DEXCEPTIONS -I$(ORBIX_INCDIR) -DWANT_ORBIX_FDS -LDFLAGS += -L$(ORBIX_LIBDIR) -R $(ORBIX_LIBDIR) - -IDLFLAGS = -s S.cpp -c C.cpp -B - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -all: client server - -client: $(addprefix $(VDIR),$(CLT_OBJS)) - $(LINK.cc) -o client $(addprefix $(VDIR),$(CLT_OBJS)) $(LDFLAGS) -lITsrvmt $(VLDLIBS) - -server: $(addprefix $(VDIR),$(SVR_OBJS)) - $(LINK.cc) -o server $(addprefix $(VDIR),$(SVR_OBJS)) $(LDFLAGS) -lITsrvmt $(VLDLIBS) - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/CORBA/Test.idl b/examples/CORBA/Test.idl deleted file mode 100644 index 33e8adce847..00000000000 --- a/examples/CORBA/Test.idl +++ /dev/null @@ -1,6 +0,0 @@ -interface Test -// @(#)Test.idl 1.1 10/18/96 - -{ - void method (in long input1); -}; diff --git a/examples/CORBA/Test_i.cpp b/examples/CORBA/Test_i.cpp deleted file mode 100644 index e665287d142..00000000000 --- a/examples/CORBA/Test_i.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "Test_i.h" -// $Id$ - - -void -Test_i::method (long input, - ACE_CORBA_1 (Environment) &) -{ - ACE_DEBUG ((LM_DEBUG, "received a number %d\n", input)); -} diff --git a/examples/CORBA/Test_i.h b/examples/CORBA/Test_i.h deleted file mode 100644 index dd1e617d1f6..00000000000 --- a/examples/CORBA/Test_i.h +++ /dev/null @@ -1,14 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/Log_Msg.h" -#include "Test.hh" - -class Test_i -{ -public: - virtual void method (long input, - ACE_CORBA_1 (Environment) &IT_env = ACE_CORBA_1 (default_environment)); -}; - -DEF_TIE_Test (Test_i) diff --git a/examples/CORBA/client.cpp b/examples/CORBA/client.cpp deleted file mode 100644 index 06052eeaa2a..00000000000 --- a/examples/CORBA/client.cpp +++ /dev/null @@ -1,26 +0,0 @@ - -// $Id$ - -#include "Test.hh" - -int -main (int argc, char *argv[]) -{ - char *host = argc == 2 ? argv[1] : ACE_DEFAULT_SERVER_HOST; - - Test_var my_test; - - TRY { - my_test = Test::_bind ("", host, IT_X); - my_test->method (5); - } CATCHANY { - cerr << IT_X << endl; - return -1; - } ENDTRY; - - ACE_DEBUG ((LM_DEBUG, "everything works!\n")); - - // Memory for my_test is automatically released by destructor of - // smart pointer. - return 0; -} diff --git a/examples/CORBA/server.cpp b/examples/CORBA/server.cpp deleted file mode 100644 index ff07fe26849..00000000000 --- a/examples/CORBA/server.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "ace/Service_Config.h" -// $Id$ - -#include "ace/CORBA_Handler.h" -#include "Test_i.h" - -#if defined (ACE_HAS_ORBIX) - -#if defined (ACE_HAS_MT_ORBIX) -typedef ACE_MT_CORBA_Handler CORBA_HANDLER; -#else -typedef ACE_ST_CORBA_Handler CORBA_HANDLER; -#endif /* ACE_HAS_MT_ORBIX */ - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - char pwd[BUFSIZ]; - char app[BUFSIZ]; - - ACE_OS::getcwd (pwd, sizeof pwd); - ACE_OS::sprintf (app, "%s/%s", pwd, argv[0]); - - if (CORBA_HANDLER::instance ()->activate_service (Test_IMPL, 0, app) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Could not activate services for supplier\n"), -1); - - TIE_Test (Test_i) test (new Test_i); - - for (;;) - if (CORBA_HANDLER::instance ()->reactor ()->handle_events () == -1) - break; - - return 0; -} -#endif /* ACE_HAS_ORBIX */ diff --git a/examples/Connection/Makefile b/examples/Connection/Makefile deleted file mode 100644 index 96c53892d51..00000000000 --- a/examples/Connection/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Connection tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = README - -DIRS = blocking \ - misc \ - non_blocking - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/examples/Connection/blocking/Makefile b/examples/Connection/blocking/Makefile deleted file mode 100644 index f2a5a9ad1ec..00000000000 --- a/examples/Connection/blocking/Makefile +++ /dev/null @@ -1,328 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Connection pattern tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -LIB = libSPIPE.a -SHLIB = libSPIPE.so - -BIN = test_spipe_connector \ - test_spipe_acceptor - -SRC = $(addsuffix .cpp,$(BIN)) -OBJ = $(SRC:%.cpp=$(VDIR)%.o) - -LSRC = SPIPE-connector.cpp \ - SPIPE-acceptor.cpp - -LDLIBS = -lSPIPE -LIBS = -lACE - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VLIB) $(VSHLIB) $(SHLIBA) $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -LDFLAGS += -L./ - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/SPIPE-connector.o .shobj/SPIPE-connector.so: SPIPE-connector.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - SPIPE-connector.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Connector.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Connector.i -.obj/SPIPE-acceptor.o .shobj/SPIPE-acceptor.so: SPIPE-acceptor.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - SPIPE-acceptor.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i -.obj/test_spipe_connector.o .shobj/test_spipe_connector.so: test_spipe_connector.cpp SPIPE-connector.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/Connector.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Connector.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.i -.obj/test_spipe_acceptor.o .shobj/test_spipe_acceptor.so: test_spipe_acceptor.cpp SPIPE-acceptor.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Connection/blocking/README b/examples/Connection/blocking/README deleted file mode 100644 index c7763e3ed04..00000000000 --- a/examples/Connection/blocking/README +++ /dev/null @@ -1,36 +0,0 @@ -Presently, this directory contains only one example application for -SPIPEs. The test source code is contained in SPIPE-acceptor.h and -SPIPE-connector.h. - -The SPIPE-acceptor example illustrates how named pipes are used on NT. -Once the server establishes a connection to a single client, it spawns -a thread pool to handle incoming requests via the proactor event loop. -That is, a separate thread from the pool is used to process each -message sent by a client. The size of the thread pool can be -specified by command-line arguments. This example leverages the -queueing performed by the NT kernel to trivially implement a thread -pool architecture. - -test_spipe_acceptor has the following command-line arguments: - -test_spipe_acceptor -t <threads> - -<threads> specifies the size of the thread-pool running in the -proactor event loop. - -Here's how to run the tests: - -% test_spipe_acceptor -t 1000000 -starting up daemon test_sock_acceptor -Opening acepipe -hello - -% test_spipe_connector -starting up daemon test_sock_connector -Opening acepipe -activating 5 - -please enter input..: hello - -There are a number of other options that you can provide. Please see -the source code for details. diff --git a/examples/Connection/blocking/SPIPE-acceptor.cpp b/examples/Connection/blocking/SPIPE-acceptor.cpp deleted file mode 100644 index f8ee2e1dc22..00000000000 --- a/examples/Connection/blocking/SPIPE-acceptor.cpp +++ /dev/null @@ -1,183 +0,0 @@ -// $Id$ - -#if !defined (SPIPE_ACCEPTOR_C) -#define SPIPE_ACCEPTOR_C - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Acceptor.h" -#include "ace/Get_Opt.h" -#include "SPIPE-acceptor.h" - -Svc_Handler::Svc_Handler (void) -{ -} - -Svc_Handler::~Svc_Handler (void) -{ -} - -int -Svc_Handler::open (void *) -{ - ACE_DEBUG ((LM_DEBUG, "client connected on handle %d\n", - this->peer ().get_handle ())); - return ACE_Service_Config::proactor ()->initiate - (this, ACE_Event_Handler::READ_MASK); -} - -ACE_Message_Block * -Svc_Handler::get_message (void) -{ - // An extra byte for null termination. - ACE_Message_Block *message = - new ACE_Message_Block (BUFSIZ + 1); - message->size (BUFSIZ); - return message; -} - -int -Svc_Handler::handle_input_complete (ACE_Message_Block *msg, - long bytes_transfered) -{ - if (bytes_transfered > 0) - { - msg->base ()[msg->length ()] = '\0'; - // Print out the message received from the server. - ACE_DEBUG ((LM_DEBUG, "(%t) message size %d.\n", msg->length ())); - ACE_DEBUG ((LM_DEBUG, "%s", msg->rd_ptr ())); - - return 1; // Reinvoke a recv() operation. - } - else - return -1; // Close down. -} - -IPC_Server::IPC_Server (void) - : n_threads_ (1), - rendezvous_ ("acepipe"), - done_handler_ (ACE_Sig_Handler_Ex (ACE_Service_Config::end_proactor_event_loop)) -{ -} - -IPC_Server::~IPC_Server (void) -{ -} - -int -IPC_Server::init (int argc, char *argv[]) -{ - if (this->parse_args (argc, argv) == -1) - return -1; - - ACE_DEBUG ((LM_DEBUG, "Opening %s\n", rendezvous_)); - - // Initialize named pipe listener. - if (this->open (ACE_SPIPE_Addr (rendezvous_)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1); - - // Register to receive shutdowns. - else if (ACE_Service_Config::reactor ()->register_handler - (SIGINT, &this->done_handler_) == -1) - return -1; - else - return 0; -} - -int -IPC_Server::fini (void) -{ - return 0; -} - -int -IPC_Server::parse_args (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - - ACE_Get_Opt get_opt (argc, argv, "ut:r:"); - - for (int c; (c = get_opt ()) != -1; ) - { - switch (c) - { - case 'r': - rendezvous_ = get_opt.optarg; - break; - case 't': - n_threads_ = ACE_OS::atoi (get_opt.optarg); - ACE_DEBUG ((LM_DEBUG, "%s == %d.\n", - get_opt.optarg, - n_threads_)); - ACE_Service_Config::proactor (2*n_threads_); - // This is a lame way to tell the proactor how many threads - // we'll be using. - break; - case 'u': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %n -t <threads>\n" - "-r <rendezvous>\n"), -1); - break; - } - } - - return 0; -} - -static void * -run_reactor_event_loop (void *) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - ACE_DEBUG ((LM_DEBUG, "(%t) worker thread starting\n")); - - ACE_Service_Config::run_proactor_event_loop (); - return 0; -} - -int -IPC_Server::svc (void) -{ - // Performs the iterative server activities. - while (ACE_Service_Config::reactor_event_loop_done () == 0) - { - Svc_Handler sh; - - // Create a new SH endpoint, which performs all processing in - // its open() method (note no automatic restart if errno == - // EINTR). - if (this->accept (&sh, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "accept"), 1); - // SH's destructor closes the stream implicitly but the - // listening endpoint stays open. - else - { - // Run single-threaded. - if (n_threads_ <= 1) - run_reactor_event_loop (0); - else - { - // Run thread pool. - if (ACE_Service_Config::thr_mgr ()->spawn_n (n_threads_, - run_reactor_event_loop, - 0, THR_NEW_LWP) - == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - - ACE_Service_Config::thr_mgr ()->wait (); - } - - ACE_DEBUG ((LM_DEBUG, "(%t) main thread exiting.\n")); - } - } - - /* NOTREACHED */ - return 0; -} - -#endif /* SPIPE_ACCEPTOR_C */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Concurrency_Strategy<Svc_Handler>; -template class ACE_Oneshot_Acceptor<Svc_Handler, ACE_SPIPE_ACCEPTOR>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Connection/blocking/SPIPE-acceptor.h b/examples/Connection/blocking/SPIPE-acceptor.h deleted file mode 100644 index aee2d645ca5..00000000000 --- a/examples/Connection/blocking/SPIPE-acceptor.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (SP_ACCEPTOR_H) -#define SP_ACCEPTOR_H - -#include "ace/Svc_Handler.h" -#include "ace/Acceptor.h" -#include "ace/SPIPE_Stream.h" -#include "ace/SPIPE_Acceptor.h" - -// This is the class that does the work once the ACE_Oneshot_Acceptor -// has accepted a connection. - -class Svc_Handler : public ACE_Svc_Handler <ACE_SPIPE_STREAM, ACE_NULL_SYNCH> -{ -public: - Svc_Handler (void); - ~Svc_Handler (void); - - virtual int open (void *); - - virtual ACE_Message_Block *get_message (void); - - virtual int handle_input_complete (ACE_Message_Block *msg, - long bytes_transfered); - // Handle data from the client. - -private: -}; - -class IPC_Server : public ACE_Oneshot_Acceptor<Svc_Handler, ACE_SPIPE_ACCEPTOR> -{ -public: - IPC_Server (void); - ~IPC_Server (void); - - // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); - // Initialize the network server. - - virtual int fini (void); - // Close down the server. - - virtual int svc (void); - // Run the interative service. - -private: - int parse_args (int argc, char *argv[]); - // Parse command-line arguments. - - int n_threads_; - // Size of thread pool to use. - - const char *rendezvous_; - // Meeting place for pipe. - - ACE_Sig_Adapter done_handler_; - // Keeps track of when we shut down due to receipt of the SIGINT - // signal. -}; - -#endif /* SP_ACCEPTOR_H */ diff --git a/examples/Connection/blocking/SPIPE-connector.cpp b/examples/Connection/blocking/SPIPE-connector.cpp deleted file mode 100644 index 6520f1136bf..00000000000 --- a/examples/Connection/blocking/SPIPE-connector.cpp +++ /dev/null @@ -1,202 +0,0 @@ -#if !defined (SPIPE_CONNECTOR_C) -// $Id$ - -#define SPIPE_CONNECTOR_C - - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Connector.h" -#include "ace/Get_Opt.h" -#include "SPIPE-connector.h" - -Peer_Handler::Peer_Handler (int iterations) - : iterations_ (iterations) -{ -} - -Peer_Handler::~Peer_Handler () -{ -} - -int -Peer_Handler::open (void *) -{ - ACE_DEBUG ((LM_DEBUG, "activating %d\n", this->get_handle ())); - - // If iterations_ has not been set, read from stdin. - if (iterations_ == 0) - { - this->display_menu (); - if (ACE::register_stdin_handler (this, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_stdin_handler"), -1); - } - else // If iterations_ has been set, send iterations_ buffers. - { - char *buffer = - "Oh give me a home\n" - "Where the buffalo roam,\n" - "And the deer and the antelope play.\n" - "Where seldom is heard\n" - "A discouraging word,\n" - "And the skies are not cloudy all day.\n"; - int length = ACE_OS::strlen (buffer); - - while (iterations_-- > 0 - && this->peer ().send_n (buffer, length) == length) - continue; - } - return this->peer ().close (); -} - -int -Peer_Handler::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - - ssize_t n = ACE_OS::read (ACE_STDIN, buf, sizeof buf); - - if (n > 0) - if (this->peer ().send (buf, n) != n) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "write failed"), -1); - else if (n == 0) /* Explicitly close the connection. */ - { - if (this->peer ().close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - return -1; - } - else - this->display_menu (); - return 0; -} - -int -Peer_Handler::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "Shutting down\n")); - return 0; -} - -ACE_HANDLE -Peer_Handler::get_handle (void) const -{ - return this->peer ().get_handle (); -} - -void -Peer_Handler::display_menu (void) -{ - ACE_DEBUG ((LM_DEBUG, "\nplease enter input..: ")); -} - -IPC_Client::IPC_Client (void) - : iterations_ (0), - rendezvous_ ("acepipe"), - done_handler_ (ACE_Sig_Handler_Ex (ACE_Service_Config::end_proactor_event_loop)) -{ -} - -IPC_Client::~IPC_Client (void) -{ -} - -// Dynamic linking hooks. - -int -IPC_Client::init (int argc, char *argv[]) -{ - if (this->parse_args (argc, argv) == -1) - return -1; - // Handle signals through the ACE_Reactor. - else if (ACE_Service_Config::reactor ()->register_handler - (SIGINT, &this->done_handler_) == -1) - return -1; - - ACE_DEBUG ((LM_DEBUG, "Opening %s\n", rendezvous_)); - - Peer_Handler *ph; - - ACE_NEW_RETURN (ph, Peer_Handler (iterations_), -1); - - // Connect to the peer, reusing the local addr if necessary. - if (this->connect (ph, - ACE_SPIPE_Addr (rendezvous_), - ACE_Synch_Options::defaults, - *((ACE_SPIPE_Addr *) &ACE_Addr::sap_any), - 0, - O_RDWR | FILE_FLAG_OVERLAPPED, - 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), -1); - - return 0; -} - -int -IPC_Client::fini (void) -{ - return 0; -} - -int -IPC_Client::svc (void) -{ - ACE_Service_Config::run_reactor_event_loop (); - return 0; -} - -int -IPC_Client::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - return 0; -} - -int -IPC_Client::parse_args (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - - ACE_Get_Opt get_opt (argc, argv, "ui:r:"); - - for (int c; (c = get_opt ()) != -1; ) - { - switch (c) - { - case 'r': - rendezvous_ = get_opt.optarg; - break; - case 'i': - iterations_ = ACE_OS::atoi (get_opt.optarg); - break; - case 'u': - default: - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %n -i <iterations>\n" - "-r <rendezvous>\n"), -1); - break; - } - } - - return 0; -} - - -#endif /* SPIPE_CONNECTOR */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Connector<Peer_Handler, ACE_SPIPE_CONNECTOR>; -template class ACE_Guard<ACE_RW_Mutex>; -template class ACE_Map_Iterator<int, ACE_Svc_Tuple<Peer_Handler> *, ACE_RW_Mutex>; -template class ACE_Map_Manager<int, ACE_Svc_Tuple<Peer_Handler> *, ACE_RW_Mutex>; -template class ACE_Message_Queue<ACE_NULL_SYNCH>; -template class ACE_Module<ACE_NULL_SYNCH>; -template class ACE_Read_Guard<ACE_RW_Mutex>; -template class ACE_Svc_Handler<ACE_SPIPE_STREAM, ACE_NULL_SYNCH>; -template class ACE_Svc_Tuple<Peer_Handler>; -template class ACE_TSS<ACE_Dynamic>; -template class ACE_Task<ACE_NULL_SYNCH>; -template class ACE_Thru_Task<ACE_NULL_SYNCH>; -template class ACE_Write_Guard<ACE_RW_Mutex>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Connection/blocking/SPIPE-connector.h b/examples/Connection/blocking/SPIPE-connector.h deleted file mode 100644 index 4776fc6bde2..00000000000 --- a/examples/Connection/blocking/SPIPE-connector.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (SP_CONNECTOR_H) -#define SP_CONNECTOR_H - -#include "ace/Svc_Handler.h" -#include "ace/SPIPE_Stream.h" -#include "ace/Connector.h" -#include "ace/SPIPE_Connector.h" - -class Peer_Handler : public ACE_Svc_Handler<ACE_SPIPE_STREAM, ACE_NULL_SYNCH> -{ -public: - // = Initialization - - Peer_Handler (int iterations = 0); - // <iterations> is the number of buffers to send. If <iterations> - // == 0, then read from stdin. - - ~Peer_Handler (void); - - virtual int open (void * = 0); - // Activate the handler when connection is established. - - // = Demultiplexing hooks. - virtual int handle_input (ACE_HANDLE); - virtual int handle_close (ACE_HANDLE handle = ACE_INVALID_HANDLE, - ACE_Reactor_Mask mask = ACE_Event_Handler::ALL_EVENTS_MASK); - - virtual ACE_HANDLE get_handle (void) const; - -private: - void display_menu (void); - - int iterations_; - // No. of buffers to send. -}; - -class IPC_Client : public ACE_Connector<Peer_Handler, ACE_SPIPE_CONNECTOR> -{ -public: - // Initialization - IPC_Client (void); - ~IPC_Client (void); - - // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); - // Initialize the IPC client. - - virtual int fini (void); - // Destroy the IPC client. - - virtual int svc (void); - // Run the svc. - - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - // Report connection errors. - -private: - int parse_args (int argc, char *argv[]); - // Parse command-line arguments. - - int iterations_; - // Number of times to send a buffer. - - const char *rendezvous_; - // Meeting place for pipe. - - ACE_Sig_Adapter done_handler_; - // Keeps track of when we shut down due to receipt of the SIGINT - // signal. -}; - -#endif /* SP_CONNECTOR_H */ diff --git a/examples/Connection/blocking/test_spipe_acceptor.cpp b/examples/Connection/blocking/test_spipe_acceptor.cpp deleted file mode 100644 index 3be8810c22e..00000000000 --- a/examples/Connection/blocking/test_spipe_acceptor.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// $Id$ - -// ACE_SPIPE Server. - -#include "SPIPE-acceptor.h" - -int -main (int argc, char *argv[]) -{ - // Perform Service_Config initializations - ACE_Service_Config daemon (argv[0]); - - IPC_Server peer_acceptor; - - if (peer_acceptor.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - return peer_acceptor.svc (); -} - diff --git a/examples/Connection/blocking/test_spipe_connector.cpp b/examples/Connection/blocking/test_spipe_connector.cpp deleted file mode 100644 index 2ebeaaecd06..00000000000 --- a/examples/Connection/blocking/test_spipe_connector.cpp +++ /dev/null @@ -1,20 +0,0 @@ -// $Id$ - -// ACE_SPIPE Client. - -#include "SPIPE-connector.h" - -int -main (int argc, char *argv[]) -{ - // Perform Service_Config initializations - ACE_Service_Config daemon (argv[0]); - - IPC_Client peer_connector; - - if (peer_connector.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - return peer_connector.svc (); -} - diff --git a/examples/Connection/misc/Connection_Handler.cpp b/examples/Connection/misc/Connection_Handler.cpp deleted file mode 100644 index c3505184fc3..00000000000 --- a/examples/Connection/misc/Connection_Handler.cpp +++ /dev/null @@ -1,238 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = FILENAME -// Connection_Handler.cpp -// -// = DESCRIPTION -// This test illustrates how to use the Acceptor pattern to -// create multiple threads, each running its own Reactor. You -// can connect to this via telnet and keep typing until you enter -// '^D'. -// -// = AUTHOR -// Doug Schmidt -// -// ============================================================================ - -#include "ace/Acceptor.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/Service_Config.h" -#include "ace/Thread.h" - -class Connection_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> -{ -public: - virtual int open (void *); - // Initialize the <Connection_Handler> and make it an Active Object. - - virtual int close (u_long); - // Terminate the <Connection_Handler>. - - virtual int svc (void); - // Run the <Connection_Handler>'s main event loop. - -protected: - virtual int handle_close (ACE_HANDLE, - ACE_Reactor_Mask); - // Signal the Active Object to stop when called. - - virtual int handle_input (ACE_HANDLE); - // Handle input from the client. - - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); - // Handle timeouts. - - virtual int handle_signal (int signum, - siginfo_t *, - ucontext_t *); - // Handle timeouts. - - sig_atomic_t finished_; - // Keeps track of whether we're done. -}; - -int -Connection_Handler::open (void *) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) in open()\n")); - - // Create an Active Object. - return this->activate (THR_NEW_LWP); -} - -int -Connection_Handler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) in close()\n")); - - // Shut ourself down. - this->destroy (); - return 0; -} - -int -Connection_Handler::svc (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) in svc()\n")); - - this->finished_ = 0; - - // Create our own personal Reactor just for this thread. Note that - // we create this on the stack of the thread since it's only used - // for the duration of this connection! - - ACE_Reactor reactor; - - // Each <ACE_Svc_Handler> has its own <ACE_Reactor *>. By default, this - // points to the <Acceptor's> Reactor. However, we can point it to our - // local Reactor, which is what we do in this case. - this->reactor (&reactor); - - // Register ourselves to handle input in this thread without - // blocking. - if (this->reactor ()->register_handler - (this, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "can' (%P|%t) t register with reactor\n"), -1); - - // Schedule a timer. - else if (this->reactor ()->schedule_timer - (this, - (const void *) this, - ACE_Time_Value (2), - ACE_Time_Value (2)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) can't register with reactor\n"), -1); - else - ACE_DEBUG ((LM_DEBUG, " (%P|%t) connected with client\n")); - - // Keep looping until we receive SIGQUIT or the client shutsdown. - - while (this->finished_ == 0) - { - ACE_DEBUG ((LM_DEBUG, " (%P|%t) handling events\n")); - this->reactor ()->handle_events (); - } - - // Cancel all pending timeouts. - ACE_Service_Config::reactor ()->cancel_timer (this); - - // Remove ourselves from the Reactor. - this->reactor ()->remove_handler - (this, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL); - - // Zero-out the Reactor field so it isn't accessed later on. - this->reactor (0); - - ACE_DEBUG ((LM_DEBUG, " (%P|%t) exiting svc\n")); - return 0; -} - -int -Connection_Handler::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, " (%P|%t) in handle_close \n")); - - // Signal the svc() event loop to shut down. - this->finished_ = 1; - return 0; -} - -int -Connection_Handler::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - - ACE_DEBUG ((LM_DEBUG, " (%P|%t) handle_input\n")); - - switch (this->peer ().recv (buf, sizeof buf)) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) %p bad read\n", "client logger"), -1); - case 0: - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) closing log daemon (fd = %d)\n", this->get_handle ()), -1); - default: - if (buf[0] == EOF) - ACE_ERROR_RETURN ((LM_ERROR, - " (%P|%t) closing log daemon (fd = %d)\n", this->get_handle ()), -1); - else - ACE_DEBUG ((LM_DEBUG, " (%P|%t) from client: %s", buf)); - } - - return 0; -} - -int -Connection_Handler::handle_signal (int signum, - siginfo_t *, - ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "received signal %S\n", signum)); - this->finished_ = 1; - return 0; -} - -int -Connection_Handler::handle_timeout (const ACE_Time_Value &tv, - const void *arg) -{ - ACE_UNUSED_ARG (tv); - - ACE_ASSERT (arg == this); - ACE_DEBUG ((LM_DEBUG, " (%P|%t) handling timeout from this = %u\n", this)); - return 0; -} - -// Define an Acceptor for the <Connection_Handler>. - -typedef ACE_Acceptor <Connection_Handler, ACE_SOCK_ACCEPTOR> - Connection_Acceptor; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - u_short port = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT; - - ACE_DEBUG ((LM_DEBUG, " (%P|%t) in main\n")); - - // Acceptor factory. - Connection_Acceptor peer_acceptor; - - // Create an adapter to end the event loop. - ACE_Sig_Adapter sa ((ACE_Sig_Handler_Ex) ACE_Service_Config::end_reactor_event_loop); - - // Register the signal handler adapter. - if (daemon.reactor ()->register_handler (SIGINT, &sa) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_handler"), -1); - - // Open the Acceptor. - else if (peer_acceptor.open (ACE_INET_Addr (port), - daemon.reactor ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - ACE_DEBUG ((LM_DEBUG, " (%P|%t) starting up connection server\n")); - - // Perform connection service until we receive SIGINT. - - while (daemon.reactor_event_loop_done () == 0) - daemon.run_reactor_event_loop (); - - ACE_DEBUG ((LM_DEBUG, " (%P|%t) shutting down connection server\n")); - - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Acceptor<Connection_Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_Message_Queue<ACE_NULL_SYNCH>; -template class ACE_Module<ACE_NULL_SYNCH>; -template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; -template class ACE_TSS<ACE_Dynamic>; -template class ACE_Task<ACE_NULL_SYNCH>; -template class ACE_Thru_Task<ACE_NULL_SYNCH>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Connection/misc/Makefile b/examples/Connection/misc/Makefile deleted file mode 100644 index 1c7a6df6c2b..00000000000 --- a/examples/Connection/misc/Makefile +++ /dev/null @@ -1,180 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for a test of the miscellaneous UPIPE examples -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_upipe \ - Connection_Handler - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/test_upipe.o .shobj/test_upipe.so: test_upipe.cpp \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/Connector.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Connector.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Connector.i -.obj/Connection_Handler.o .shobj/Connection_Handler.so: Connection_Handler.cpp \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Connection/misc/test_upipe.cpp b/examples/Connection/misc/test_upipe.cpp deleted file mode 100644 index eeaffddd864..00000000000 --- a/examples/Connection/misc/test_upipe.cpp +++ /dev/null @@ -1,205 +0,0 @@ -// This short program illustrates in implementation of the classic -// $Id$ - -// "bounded buffer" program using ACE_UPIPEs. This program also shows -// how the ACE_Connector and ACE_Acceptor patterns work when used with -// ACE_UPIPEs. - -// Enable tracing - -#include "ace/Acceptor.h" -#include "ace/Connector.h" -#include "ace/UPIPE_Acceptor.h" -#include "ace/UPIPE_Connector.h" -#include "ace/UPIPE_Addr.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Svc_Handler <ACE_UPIPE_STREAM, ACE_NULL_SYNCH> SVC_HANDLER; - -class Server_Service : public SVC_HANDLER - // = TITLE - // Defines the interface for a service that recvs data from its - // client and writes the data to its stdout. -{ -public: - Server_Service (ACE_Thread_Manager * = 0) {} - - virtual int open (void *) - { - ACE_TRACE ("Server_Service::open"); - return 0; - } - - virtual int svc (void) - { - ACE_TRACE ("Server_Service::svc"); - - char buf[BUFSIZ]; - ssize_t n; - - while ((n = this->peer ().recv (buf, sizeof buf)) > 0) - ::write (1, buf, n); - - return 0; - } -}; - -class Server : public ACE_Strategy_Acceptor <Server_Service, ACE_UPIPE_ACCEPTOR> - // = TITLE - // Defines the interface for a factory that accepts connections - // and creates/activates Server_Service objects. -{ -public: - Server (ACE_Thread_Manager *thr_mgr, - ACE_Reactor *reactor) - : reactor_ (reactor), - thr_mgr_ (thr_mgr) - { - ACE_TRACE ("Server::Server"); - } - - virtual int init (int argc, char *argv[]) - { - ACE_TRACE ("Server::init"); - const char *l_addr = argc > 1 ? argv[1] : ACE_DEFAULT_RENDEZVOUS; - - ACE_UPIPE_Addr local_addr (l_addr); - - if (this->thr_strategy_.open (this->thr_mgr_, THR_DETACHED | THR_NEW_LWP) == -1) - return -1; - else if (this->open (local_addr, this->reactor_, - 0, 0, &this->thr_strategy_) == -1) - return -1; - - // Give server a chance to register the STREAM pipe. - ACE_OS::sleep (ACE_Time_Value (4)); - return 0; - } - -private: - ACE_Reactor *reactor_; - // Our instance of the reactor. - - ACE_Thread_Manager *thr_mgr_; - // Our instance of a thread manager. - - ACE_Thread_Strategy<Server_Service> thr_strategy_; - // Our concurrency strategy. -}; - -class Client_Service : public SVC_HANDLER - // = TITLE - // Defines the interface for a service that recvs data from its - // stdin and forward the data to its server. -{ -public: - Client_Service (ACE_Thread_Manager *thr_mgr = 0) - : SVC_HANDLER (thr_mgr) - { - ACE_TRACE ("Client_Service::Client_Service"); - } - - virtual int open (void *) - { - ACE_TRACE ("Client_Service::open"); - return this->activate (THR_DETACHED | THR_NEW_LWP); - } - - virtual int svc (void) - { - ACE_TRACE ("Client_Service::svc"); - char buf[BUFSIZ]; - ssize_t n; - - while ((n = ACE_OS::read (ACE_STDIN, buf, sizeof buf)) > 0) - this->peer ().send (buf, sizeof buf); - - this->peer ().close (); - return 0; - } -}; - -class Client : public ACE_Connector <Client_Service, ACE_UPIPE_CONNECTOR> - // = TITLE - // Defines the interface for a factory that connects - // a Client_Service with a Server. -{ -public: - Client (ACE_Thread_Manager *thr_mgr) - : thr_mgr_ (thr_mgr) - { - ACE_TRACE ("Client::Client"); - } - - virtual int init (int argc, char *argv[]) - { - ACE_TRACE ("Client::init"); - - char *r_addr = argc > 1 ? argv[1] : ACE_DEFAULT_RENDEZVOUS; - - ACE_UPIPE_Addr remote_addr (r_addr); - - Client_Service *cs; - - ACE_NEW_RETURN (cs, Client_Service (this->thr_mgr_), -1); - - return this->connect (cs, remote_addr); - } - -private: - ACE_Thread_Manager *thr_mgr_; -}; - -//---------------------------------------- - -int main (int argc, char *argv[]) -{ - ACE_Service_Config svc_conf; - ACE_Thread_Manager thr_mgr; - - Client peer_connector (&thr_mgr); - Server peer_acceptor (&thr_mgr, ACE_Service_Config::reactor ()); - - // Establish the connection between Acceptor and Connector. - - if (peer_acceptor.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - else if (peer_connector.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - // Wait for threads to exit. - thr_mgr.wait (); - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform does not support threads\n"), 1); -} -#endif /* ACE_HAS_THREADS */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Accept_Strategy<Server_Service, ACE_UPIPE_ACCEPTOR>; -template class ACE_Acceptor<Server_Service, ACE_UPIPE_ACCEPTOR>; -template class ACE_Concurrency_Strategy<Server_Service>; -template class ACE_Connector<Client_Service, ACE_UPIPE_CONNECTOR>; -template class ACE_Creation_Strategy<Server_Service>; -template class ACE_Guard<ACE_RW_Mutex>; -template class ACE_Map_Iterator<int, ACE_Svc_Tuple<Client_Service> *, ACE_RW_Mutex>; -template class ACE_Map_Manager<int, ACE_Svc_Tuple<Client_Service> *, ACE_RW_Mutex>; -template class ACE_Message_Queue<ACE_NULL_SYNCH>; -template class ACE_Module<ACE_NULL_SYNCH>; -template class ACE_Read_Guard<ACE_RW_Mutex>; -template class ACE_Scheduling_Strategy<Server_Service>; -template class ACE_Strategy_Acceptor<Server_Service, ACE_UPIPE_ACCEPTOR>; -template class ACE_Svc_Handler<ACE_UPIPE_STREAM, ACE_NULL_SYNCH>; -template class ACE_Svc_Tuple<Client_Service>; -template class ACE_TSS<ACE_Dynamic>; -template class ACE_Task<ACE_NULL_SYNCH>; -template class ACE_Thread_Strategy<Server_Service>; -template class ACE_Thru_Task<ACE_NULL_SYNCH>; -template class ACE_Write_Guard<ACE_RW_Mutex>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Connection/non_blocking/CPP-acceptor.cpp b/examples/Connection/non_blocking/CPP-acceptor.cpp deleted file mode 100644 index 2ce9df111b4..00000000000 --- a/examples/Connection/non_blocking/CPP-acceptor.cpp +++ /dev/null @@ -1,173 +0,0 @@ -#if !defined (CPP_ACCEPTOR_C) -// $Id$ - -#define CPP_ACCEPTOR_C - -#include "ace/Service_Config.h" -#include "CPP-acceptor.h" - -#define PR_ST_1 ACE_PEER_STREAM_1 -#define PR_ST_2 ACE_PEER_STREAM_2 -#define PR_AC_1 ACE_PEER_ACCEPTOR_1 -#define PR_AC_2 ACE_PEER_ACCEPTOR_2 -#define PR_AD ACE_PEER_STREAM_ADDR -#define SH SVC_HANDLER - -template <PR_ST_1> -Svc_Handler<PR_ST_2>::Svc_Handler (ACE_Reactor *r) - : SVC_HANDLER (0, 0, r) -{ -} - -template <PR_ST_1> int -Svc_Handler<PR_ST_2>::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "calling Svc_Handler close\n")); - - // Free up the handle. - this->peer ().close (); - return 0; -} - -template <PR_ST_1> int -Svc_Handler<PR_ST_2>::open (void *) -{ - PR_AD client_addr; - char buf[BUFSIZ]; - - if (this->peer ().get_remote_addr (client_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "get_remote_addr"), -1); - else if (client_addr.addr_to_string (buf, sizeof buf) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "addr_to_string"), -1); - else - ACE_DEBUG ((LM_DEBUG, "client addr %s on handle %d\n", - buf, this->peer ().get_handle ())); - - // Process the connection immediately since we are an interative - // server. - return this->handle_input (); -} - -// Receive and process the data from the client. - -template <PR_ST_1> int -Svc_Handler<PR_ST_2>::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - - // Read data from client (terminate on error). - - ACE_DEBUG ((LM_DEBUG, "(%t) in handle_input\n")); - - for (ssize_t r_bytes; (r_bytes = this->peer ().recv (buf, sizeof buf)) > 0; ) - if (ACE_OS::write (ACE_STDOUT, buf, r_bytes) != r_bytes) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE::send_n"), -1); - - // Send back ack. - if (this->peer ().send_n ("", 1) != 1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send_n"), -1); - return 0; -} - -template <PR_ST_1> int -Svc_Handler<PR_ST_2>::handle_timeout (const ACE_Time_Value &, - const void *) -{ - ACE_DEBUG ((LM_DEBUG, "%p\n", "handle_timeout")); - return 0; -} - -template <class SH, PR_AC_1> int -IPC_Server<SH, PR_AC_2>::init (int argc, char *argv[]) -{ - const char *local_addr = argc > 1 ? argv[1] : ACE_DEFAULT_SERVER_PORT_STR; - ACE_Time_Value timeout (argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_TIMEOUT); - int use_reactor = argc > 3 ? ACE_Synch_Options::USE_REACTOR : 0; - - this->options_.set (ACE_Synch_Options::USE_TIMEOUT | use_reactor, timeout); - - if (this->server_addr_.set (local_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "set"), -1); - // Call down to the ACCEPTOR's open() method to do the initialization. - if (this->inherited::open (this->server_addr_, - use_reactor ? ACE_Service_Config::reactor () : 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - // Handle the SIGINT signal through the ACE_Reactor. - else if (ACE_Service_Config::reactor ()->register_handler - (SIGINT, &this->done_handler_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_handler"), -1); -#if !defined (ACE_WIN32) - // Handle the SIGPIPE signal through the ACE_Reactor. - else if (ACE_Service_Config::reactor ()->register_handler - (SIGPIPE, &this->done_handler_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_handler"), -1); -#endif /* ACE_WIN32 */ - else - return 0; -} - -template <class SH, PR_AC_1> -IPC_Server<SH, PR_AC_2>::IPC_Server (void) - : done_handler_ (ACE_Sig_Handler_Ex (ACE_Service_Config::end_reactor_event_loop)) -{ -} - -template <class SH, PR_AC_1> int -IPC_Server<SH, PR_AC_2>::fini (void) -{ - return 0; -} - -template <class SH, PR_AC_1> -IPC_Server<SH, PR_AC_2>::~IPC_Server (void) -{ -} - -// Run the interative service. - -template <class SH, PR_AC_1> int -IPC_Server<SH, PR_AC_2>::svc (void) -{ - char buf[BUFSIZ]; - - if (this->server_addr_.addr_to_string (buf, sizeof buf) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "addr_to_string"), -1); - else - ACE_DEBUG ((LM_DEBUG, "starting server addr %s on handle %d\n", - buf, this->get_handle ())); - - // Performs the iterative server activities. - - while (ACE_Service_Config::reactor_event_loop_done () == 0) - { - SH sh (this->reactor ()); - - // Create a new SH endpoint, which performs all processing in - // its open() method (note no automatic restart if errno == - // EINTR). - - if (this->accept (&sh, 0, this->options_, 0) == -1) - { - if (errno == EWOULDBLOCK && this->reactor ()) - this->reactor ()->handle_events (); - else - ACE_ERROR ((LM_ERROR, "%p on handle %d\n", - "accept", this->acceptor ().get_handle ())); - } - - // SH's destructor closes the stream implicitly but the - // listening endpoint stays open. - } - - /* NOTREACHED */ - return 0; -} - -#undef PR_ST_1 -#undef PR_ST_2 -#undef PR_AC_1 -#undef PR_AC_2 -#undef PR_AD -#undef SH -#endif /* CPP_ACCEPTOR_C */ diff --git a/examples/Connection/non_blocking/CPP-acceptor.h b/examples/Connection/non_blocking/CPP-acceptor.h deleted file mode 100644 index 216d79a70ba..00000000000 --- a/examples/Connection/non_blocking/CPP-acceptor.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (CPP_ACCEPTOR_H) -#define CPP_ACCEPTOR_H - -#include "ace/Acceptor.h" - -// This is the class that does the work once the ACE_Oneshot_Acceptor -// has accepted a connection. - -template <ACE_PEER_STREAM_1> -class Svc_Handler : public ACE_Svc_Handler <ACE_PEER_STREAM_2, ACE_NULL_SYNCH> -{ -public: - // = Initialization method. - Svc_Handler (ACE_Reactor *r); - - virtual int open (void *); - // Perform the work of the SVC_HANDLER. - - virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE); - // Handle data from the client. - - virtual int close (u_long); - // Called if ACE_Svc_Handler is closed down unexpectedly. - - virtual int handle_timeout (const ACE_Time_Value &, const void *arg); - // Handles acceptor timeouts. - -private: - typedef ACE_Svc_Handler <ACE_PEER_STREAM_2, ACE_NULL_SYNCH> SVC_HANDLER; -}; - -template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> -class IPC_Server : public ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> -{ -public: - // = Initialization and termination. - IPC_Server (void); - ~IPC_Server (void); - - // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); - // Initialize the network server. - - virtual int fini (void); - // Close down the server. - - virtual int svc (void); - // Run the interative service. - -private: - typedef ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> inherited; - - ACE_PEER_ACCEPTOR_ADDR server_addr_; - // Address of this server. - - ACE_Synch_Options options_; - // Options that this server is using. - - ACE_Sig_Adapter done_handler_; - // Keeps track of when we shut down due to receipt of the SIGINT - // signal. -}; - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "CPP-acceptor.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ -#endif /* CPP_ACCEPTOR_H */ diff --git a/examples/Connection/non_blocking/CPP-connector.cpp b/examples/Connection/non_blocking/CPP-connector.cpp deleted file mode 100644 index 5ac1a44acde..00000000000 --- a/examples/Connection/non_blocking/CPP-connector.cpp +++ /dev/null @@ -1,236 +0,0 @@ -// $Id$ - -#if !defined (CPP_CONNECTOR_C) -#define CPP_CONNECTOR_C - -#include "CPP-connector.h" - -#define PR_ST_1 ACE_PEER_STREAM_1 -#define PR_ST_2 ACE_PEER_STREAM_2 -#define PR_CO_1 ACE_PEER_CONNECTOR_1 -#define PR_CO_2 ACE_PEER_CONNECTOR_2 -#define PR_AD ACE_PEER_CONNECTOR_ADDR -#define SH SVC_HANDLER - -template <PR_ST_1> -Peer_Handler<PR_ST_2>::Peer_Handler (ACE_Reactor *r) - : action_ (&Peer_Handler<PR_ST_2>::idle) -{ - this->reactor (r); -} - -template <PR_ST_1> int -Peer_Handler<PR_ST_2>::open (void *) -{ - ACE_DEBUG ((LM_DEBUG, "activating %d\n", this->get_handle ())); - this->action_ = &Peer_Handler<PR_ST_2>::connected; - - if (this->reactor ()) - this->reactor ()->register_handler - (this, ACE_Event_Handler::WRITE_MASK); - else - { - while (this->connected () != -1) - continue; - - this->handle_close (ACE_INVALID_HANDLE, - ACE_Event_Handler::READ_MASK); - } - return 0; -} - -template <PR_ST_1> ACE_HANDLE -Peer_Handler<PR_ST_2>::get_handle (void) const -{ - return this->peer ().get_handle (); -} - -template <PR_ST_1> int -Peer_Handler<PR_ST_2>::disconnecting (void) -{ - char buf[BUFSIZ]; - ssize_t n = this->peer ().recv (buf, sizeof buf); - - if (n > 0) - ACE_OS::write (ACE_STDOUT, buf, n); - - this->action_ = &Peer_Handler<PR_ST_2>::idle; - return -1; -} - -template <PR_ST_1> int -Peer_Handler<PR_ST_2>::idle (void) -{ - ACE_DEBUG ((LM_DEBUG, "idle!\n")); - return 0; -} - -template <PR_ST_1> int -Peer_Handler<PR_ST_2>::connected (void) -{ - char buf[BUFSIZ]; - - ACE_DEBUG ((LM_DEBUG, "please enter input..: ")); - - ssize_t n = ACE_OS::read (ACE_STDIN, buf, sizeof buf); - - if (n > 0 && this->peer ().send_n (buf, n) != n) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "write failed"), -1); - else if (n == 0) /* Explicitly close the connection. */ - { - if (this->peer ().close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - this->action_ = &Peer_Handler<PR_ST_2>::disconnecting; - return -1; - } - else - return 0; -} - -template <PR_ST_1> int -Peer_Handler<PR_ST_2>::stdio (void) -{ - char buf[BUFSIZ]; - - ACE_DEBUG ((LM_DEBUG, "stdio!\nplease enter input..: ")); - - ssize_t n = ACE_OS::read (ACE_STDIN, buf, sizeof buf); - - if (n > 0) - { - ACE_OS::write (ACE_STDOUT, buf, n); - return 0; - } - else - return -1; -} - -template <PR_ST_1> int -Peer_Handler<PR_ST_2>::handle_output (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "in handle_output\n")); - - return (this->*action_) (); -} - -template <PR_ST_1> int -Peer_Handler<PR_ST_2>::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "in handle_input\n")); - - return (this->*action_) (); -} - -template <PR_ST_1> int -Peer_Handler<PR_ST_2>::handle_close (ACE_HANDLE, - ACE_Reactor_Mask mask) -{ - ACE_DEBUG ((LM_DEBUG, "closing down (%d)\n", mask)); - - // When the socket closes down, then we'll switch over to reading - // from stdin and writing to stdout. - if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::WRITE_MASK)) - { - this->action_ = &Peer_Handler<PR_ST_2>::stdio; - this->peer ().close (); - ACE_OS::rewind (stdin); - - if (this->reactor ()) - return ACE::register_stdin_handler - (this, this->reactor (), ACE_Service_Config::thr_mgr ()); - else - return 0; - } - else if (ACE_BIT_ENABLED (mask, ACE_Event_Handler::READ_MASK)) - delete this; - return 0; - -} - -template <class SH, PR_CO_1> int -IPC_Client<SH, PR_CO_2>::svc (void) -{ - if (this->reactor ()) - ACE_Service_Config::run_reactor_event_loop (); - - return 0; -} - -template <class SH, PR_CO_1> int -IPC_Client<SH, PR_CO_2>::fini (void) -{ - return 0; -} - -template <class SH, PR_CO_1> -IPC_Client<SH, PR_CO_2>::IPC_Client (void) - : done_handler_ (ACE_Sig_Handler_Ex (ACE_Service_Config::end_reactor_event_loop)) -{ -} - -template <class SH, PR_CO_1> int -IPC_Client<SH, PR_CO_2>::init (int argc, char *argv[]) -{ - // Call down to the CONNECTOR's open() method to do the initialization. - this->inherited::open (ACE_Service_Config::reactor ()); - - char *r_addr = argc > 1 ? argv[1] : - ACE_SERVER_ADDRESS (ACE_DEFAULT_SERVER_HOST, - ACE_DEFAULT_SERVER_PORT_STR); - ACE_Time_Value timeout (argc > 2 - ? ACE_OS::atoi (argv[2]) - : ACE_DEFAULT_TIMEOUT); - char *l_addr = argc > 3 ? argv[3] : ACE_DEFAULT_LOCAL_PORT_STR; - - // Handle signals through the ACE_Reactor. - if (ACE_Service_Config::reactor ()->register_handler - (SIGINT, &this->done_handler_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_handler"), -1); - - PR_AD remote_addr (r_addr); - PR_AD local_addr (l_addr); - - this->options_.set (ACE_Synch_Options::USE_REACTOR, timeout); - - SH *sh; - - ACE_NEW_RETURN (sh, SH (this->reactor ()), -1); - - // Connect to the peer, reusing the local addr if necessary. - if (this->connect (sh, remote_addr, this->options_, local_addr, 1) == -1 - && errno != EWOULDBLOCK) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), -1); - else - return 0; -} - -template <class SH, PR_CO_1> -IPC_Client<SH, PR_CO_2>::~IPC_Client (void) -{ -} - -template <class SH, PR_CO_1> int -IPC_Client<SH, PR_CO_2>::handle_close (ACE_HANDLE h, - ACE_Reactor_Mask) -{ - if (h == ACE_INVALID_HANDLE) - ACE_ERROR ((LM_ERROR, "%p on %d\n", "connection failed", h)); - else - { - // We are closing down the connector. - ACE_DEBUG ((LM_DEBUG, "closing down IPC_Client\n")); - this->inherited::handle_close (); - } - - ACE_Service_Config::end_reactor_event_loop (); - return 0; -} - -#undef PR_ST_1 -#undef PR_ST_2 -#undef PR_CO_1 -#undef PR_CO_2 -#undef PR_AD -#undef SH -#endif /* CPP_CONNECTOR_C */ diff --git a/examples/Connection/non_blocking/CPP-connector.h b/examples/Connection/non_blocking/CPP-connector.h deleted file mode 100644 index f23f777fda9..00000000000 --- a/examples/Connection/non_blocking/CPP-connector.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (CPP_CONNECTOR_H) -#define CPP_CONNECTOR_H - -#include "ace/Service_Config.h" -#include "ace/Connector.h" - -template <ACE_PEER_STREAM_1> -class Peer_Handler : public ACE_Svc_Handler<ACE_PEER_STREAM_2, ACE_SYNCH> -{ -public: - Peer_Handler (ACE_Reactor *r = 0); - - virtual int open (void * = 0); - // Activate the handler when connection is established. - - // = Demultiplexing hooks. - virtual int handle_output (ACE_HANDLE); - virtual int handle_input (ACE_HANDLE); - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask mask); - - virtual ACE_HANDLE get_handle (void) const; - -protected: - // = These methods implement the State pattern. - int idle (void); - int connected (void); - int disconnecting (void); - int stdio (void); - - int (Peer_Handler<ACE_PEER_STREAM_2>::*action_) (void); - // Keeps track of which state we are in. -}; - -template <class SVC_HANDLER, ACE_PEER_CONNECTOR_1> -class IPC_Client : public ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2> -{ -public: - // = Initialization and termination methods. - IPC_Client (void); - ~IPC_Client (void); - - // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); - // Initialize the IPC client. - - virtual int fini (void); - // Destroy the IPC client. - - virtual int svc (void); - // Run the svc. - - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - // Report connection errors. - -private: - typedef ACE_Connector<SVC_HANDLER, ACE_PEER_CONNECTOR_2> inherited; - - ACE_Synch_Options options_; - // Options for the active connection factory. - - ACE_Sig_Adapter done_handler_; - // Keeps track of when we shut down due to receipt of the SIGINT - // signal. -}; - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "CPP-connector.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ -#endif /* CPP_CONNECTOR_H */ diff --git a/examples/Connection/non_blocking/Makefile b/examples/Connection/non_blocking/Makefile deleted file mode 100644 index 84b3b7f3cac..00000000000 --- a/examples/Connection/non_blocking/Makefile +++ /dev/null @@ -1,579 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Connection pattern tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -LIB = libConn.a -SHLIB = libConn.so - -BIN = test_sock_connector \ - test_sock_acceptor \ - test_tli_connector \ - test_tli_acceptor \ - test_spipe_connector \ - test_spipe_acceptor - -SRC = $(addsuffix .cpp,$(BIN)) -OBJ = $(SRC:%.cpp=$(VDIR)%.o) - -LSRC = CPP-connector.cpp \ - CPP-acceptor.cpp - -LDLIBS = -lConn -LIBS = -lACE - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VLIB) $(VSHLIB) $(SHLIBA) $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -LDFLAGS += -L./ - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/CPP-connector.o .shobj/CPP-connector.so: CPP-connector.cpp CPP-connector.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Connector.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Connector.i -.obj/CPP-acceptor.o .shobj/CPP-acceptor.so: CPP-acceptor.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - CPP-acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i -.obj/test_sock_connector.o .shobj/test_sock_connector.so: test_sock_connector.cpp \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i \ - CPP-connector.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Connector.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Connector.i -.obj/test_sock_acceptor.o .shobj/test_sock_acceptor.so: test_sock_acceptor.cpp \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - CPP-acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i -.obj/test_tli_connector.o .shobj/test_tli_connector.so: test_tli_connector.cpp \ - $(WRAPPER_ROOT)/ace/TLI_Connector.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Connector.i \ - CPP-connector.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Connector.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Connector.i -.obj/test_tli_acceptor.o .shobj/test_tli_acceptor.so: test_tli_acceptor.cpp \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.i \ - CPP-acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i -.obj/test_spipe_connector.o .shobj/test_spipe_connector.so: test_spipe_connector.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.i \ - CPP-connector.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Connector.h \ - $(WRAPPER_ROOT)/ace/Map_Manager.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Connector.i -.obj/test_spipe_acceptor.o .shobj/test_spipe_acceptor.so: test_spipe_acceptor.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - CPP-acceptor.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Connection/non_blocking/README b/examples/Connection/non_blocking/README deleted file mode 100644 index 78fb023b99e..00000000000 --- a/examples/Connection/non_blocking/README +++ /dev/null @@ -1,24 +0,0 @@ -This code illustrates how to write a single set of source code (for a -client and server) and then parameterize in the desired IPC mechanism. -In this case, the IPC mechanisms include sockets, TLI, and STREAM -pipes. The single set of source code is located in CPP-acceptor.cpp -(which is the server) and CPP-connector.cpp (which is the non-blocking -client). - -Here's how I typically run these tests: - -% test_sock_acceptor localhost:10005 & -starting up daemon ./test_sock_acceptor -starting server addr 127.0.0.1:10007 on handle 5 -client addr 127.0.0.1:10003 on handle 6 -hello - -% test_sock_connector localhost:10005 -starting up daemon ./test_sock_connector -activating 5 -in handle_output -please enter input..: hello -in handle_output - -There are a number of other options that you can provide. Please see -the source code for details. diff --git a/examples/Connection/non_blocking/non_blocking.mak b/examples/Connection/non_blocking/non_blocking.mak deleted file mode 100644 index ec8e8267e8c..00000000000 --- a/examples/Connection/non_blocking/non_blocking.mak +++ /dev/null @@ -1,700 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=server - Win32 Debug -!MESSAGE No configuration specified. Defaulting to server - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "client - Win32 Debug" && "$(CFG)" != "server - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "non_blocking.mak" CFG="server - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "client - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE "server - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -RSC=rc.exe -CPP=cl.exe - -!IF "$(CFG)" == "client - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "client\Debug" -# PROP BASE Intermediate_Dir "client\Debug" -# PROP BASE Target_Dir "client" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "." -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "client" -OUTDIR=.\. -INTDIR=.\Debug - -ALL : "$(OUTDIR)\client.exe" - -CLEAN : - -@erase "$(INTDIR)\CPP-connector.obj" - -@erase "$(INTDIR)\test_sock_connector.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\client.exe" - -@erase "$(OUTDIR)\client.ilk" - -@erase "$(OUTDIR)\client.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/client.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/client.pdb" /debug /machine:I386 /out:"$(OUTDIR)/client.exe" -LINK32_OBJS= \ - "$(INTDIR)\CPP-connector.obj" \ - "$(INTDIR)\test_sock_connector.obj" - -"$(OUTDIR)\client.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "server - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "server\Debug" -# PROP BASE Intermediate_Dir "server\Debug" -# PROP BASE Target_Dir "server" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "." -# PROP Intermediate_Dir "Debug" -# PROP Target_Dir "server" -OUTDIR=.\. -INTDIR=.\Debug - -ALL : "$(OUTDIR)\server.exe" - -CLEAN : - -@erase "$(INTDIR)\CPP-acceptor.obj" - -@erase "$(INTDIR)\test_sock_acceptor.obj" - -@erase "$(INTDIR)\vc40.idb" - -@erase "$(INTDIR)\vc40.pdb" - -@erase "$(OUTDIR)\server.exe" - -@erase "$(OUTDIR)\server.ilk" - -@erase "$(OUTDIR)\server.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -"$(INTDIR)" : - if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/server.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/server.pdb" /debug /machine:I386 /out:"$(OUTDIR)/server.exe" -LINK32_OBJS= \ - "$(INTDIR)\CPP-acceptor.obj" \ - "$(INTDIR)\test_sock_acceptor.obj" - -"$(OUTDIR)\server.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /Fp"$(INTDIR)/client.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c -CPP_OBJS=.\Debug/ -CPP_SBRS=.\. - -.c{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_OBJS)}.obj: - $(CPP) $(CPP_PROJ) $< - -.c{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx{$(CPP_SBRS)}.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "client - Win32 Debug" -################################################################################ -# Begin Source File - -SOURCE=.\test_sock_connector.cpp -DEP_CPP_TEST_=\ - ".\CPP-connector.cpp"\ - ".\CPP-connector.h"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\ACE.i"\ - {$(INCLUDE)}"\ace\Addr.h"\ - {$(INCLUDE)}"\ace\Addr.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Connector.cpp"\ - {$(INCLUDE)}"\ace\Connector.h"\ - {$(INCLUDE)}"\ace\Connector.i"\ - {$(INCLUDE)}"\ace\Dynamic.h"\ - {$(INCLUDE)}"\ace\Dynamic.i"\ - {$(INCLUDE)}"\ace\Event_Handler.h"\ - {$(INCLUDE)}"\ace\Event_Handler.i"\ - {$(INCLUDE)}"\ace\Handle_Set.h"\ - {$(INCLUDE)}"\ace\Handle_Set.i"\ - {$(INCLUDE)}"\ace\INET_Addr.h"\ - {$(INCLUDE)}"\ace\INET_Addr.i"\ - {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\ - {$(INCLUDE)}"\ace\IPC_SAP.h"\ - {$(INCLUDE)}"\ace\IPC_SAP.i"\ - {$(INCLUDE)}"\ace\Local_Tokens.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.i"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\Malloc.h"\ - {$(INCLUDE)}"\ace\Malloc.i"\ - {$(INCLUDE)}"\ace\Malloc_T.cpp"\ - {$(INCLUDE)}"\ace\Malloc_T.h"\ - {$(INCLUDE)}"\ace\Malloc_T.i"\ - {$(INCLUDE)}"\ace\Map_Manager.cpp"\ - {$(INCLUDE)}"\ace\Map_Manager.h"\ - {$(INCLUDE)}"\ace\Map_Manager.i"\ - {$(INCLUDE)}"\ace\Mem_Map.h"\ - {$(INCLUDE)}"\ace\Mem_Map.i"\ - {$(INCLUDE)}"\ace\Memory_Pool.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.i"\ - {$(INCLUDE)}"\ace\Message_Block.h"\ - {$(INCLUDE)}"\ace\Message_Block.i"\ - {$(INCLUDE)}"\ace\Message_Queue.cpp"\ - {$(INCLUDE)}"\ace\Message_Queue.h"\ - {$(INCLUDE)}"\ace\Message_Queue.i"\ - {$(INCLUDE)}"\ace\Module.cpp"\ - {$(INCLUDE)}"\ace\Module.h"\ - {$(INCLUDE)}"\ace\Module.i"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\Pipe.h"\ - {$(INCLUDE)}"\ace\Pipe.i"\ - {$(INCLUDE)}"\ace\Proactor.h"\ - {$(INCLUDE)}"\ace\Proactor.i"\ - {$(INCLUDE)}"\ace\Reactor.h"\ - {$(INCLUDE)}"\ace\Reactor.i"\ - {$(INCLUDE)}"\ace\ReactorEx.h"\ - {$(INCLUDE)}"\ace\ReactorEx.i"\ - {$(INCLUDE)}"\ace\Service_Config.h"\ - {$(INCLUDE)}"\ace\Service_Config.i"\ - {$(INCLUDE)}"\ace\Service_Object.h"\ - {$(INCLUDE)}"\ace\Service_Object.i"\ - {$(INCLUDE)}"\ace\Set.cpp"\ - {$(INCLUDE)}"\ace\Set.h"\ - {$(INCLUDE)}"\ace\Set.i"\ - {$(INCLUDE)}"\ace\Shared_Object.h"\ - {$(INCLUDE)}"\ace\Shared_Object.i"\ - {$(INCLUDE)}"\ace\Signal.h"\ - {$(INCLUDE)}"\ace\Signal.i"\ - {$(INCLUDE)}"\ace\SOCK.h"\ - {$(INCLUDE)}"\ace\SOCK.i"\ - {$(INCLUDE)}"\ace\SOCK_Connector.h"\ - {$(INCLUDE)}"\ace\SOCK_Connector.i"\ - {$(INCLUDE)}"\ace\SOCK_IO.h"\ - {$(INCLUDE)}"\ace\SOCK_IO.i"\ - {$(INCLUDE)}"\ace\SOCK_Stream.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.i"\ - {$(INCLUDE)}"\ace\SString.h"\ - {$(INCLUDE)}"\ace\SString.i"\ - {$(INCLUDE)}"\ace\Stack.cpp"\ - {$(INCLUDE)}"\ace\Stack.h"\ - {$(INCLUDE)}"\ace\Stack.i"\ - {$(INCLUDE)}"\ace\stdcpp.h"\ - {$(INCLUDE)}"\ace\Strategies.h"\ - {$(INCLUDE)}"\ace\Strategies_T.cpp"\ - {$(INCLUDE)}"\ace\Strategies_T.h"\ - {$(INCLUDE)}"\ace\Stream_Modules.cpp"\ - {$(INCLUDE)}"\ace\Stream_Modules.h"\ - {$(INCLUDE)}"\ace\Stream_Modules.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\ - {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\ - {$(INCLUDE)}"\ace\Svc_Handler.cpp"\ - {$(INCLUDE)}"\ace\Svc_Handler.h"\ - {$(INCLUDE)}"\ace\Svc_Handler.i"\ - {$(INCLUDE)}"\ace\Synch.h"\ - {$(INCLUDE)}"\ace\Synch.i"\ - {$(INCLUDE)}"\ace\Synch_Options.h"\ - {$(INCLUDE)}"\ace\Synch_T.cpp"\ - {$(INCLUDE)}"\ace\Synch_T.h"\ - {$(INCLUDE)}"\ace\Synch_T.i"\ - {$(INCLUDE)}"\ace\Task.h"\ - {$(INCLUDE)}"\ace\Task.i"\ - {$(INCLUDE)}"\ace\Task_T.cpp"\ - {$(INCLUDE)}"\ace\Task_T.h"\ - {$(INCLUDE)}"\ace\Task_T.i"\ - {$(INCLUDE)}"\ace\Thread.h"\ - {$(INCLUDE)}"\ace\Thread.i"\ - {$(INCLUDE)}"\ace\Thread_Manager.h"\ - {$(INCLUDE)}"\ace\Thread_Manager.i"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.i"\ - {$(INCLUDE)}"\ace\Token.h"\ - {$(INCLUDE)}"\ace\Token.i"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\ws2tcpip.h"\ - - -"$(INTDIR)\test_sock_connector.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)"\ - ".\CPP-connector.cpp" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=".\CPP-connector.cpp" -DEP_CPP_CPP_C=\ - ".\CPP-connector.h"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\ACE.i"\ - {$(INCLUDE)}"\ace\Addr.h"\ - {$(INCLUDE)}"\ace\Addr.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Connector.cpp"\ - {$(INCLUDE)}"\ace\Connector.h"\ - {$(INCLUDE)}"\ace\Connector.i"\ - {$(INCLUDE)}"\ace\Dynamic.h"\ - {$(INCLUDE)}"\ace\Dynamic.i"\ - {$(INCLUDE)}"\ace\Event_Handler.h"\ - {$(INCLUDE)}"\ace\Event_Handler.i"\ - {$(INCLUDE)}"\ace\Handle_Set.h"\ - {$(INCLUDE)}"\ace\Handle_Set.i"\ - {$(INCLUDE)}"\ace\INET_Addr.h"\ - {$(INCLUDE)}"\ace\INET_Addr.i"\ - {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\ - {$(INCLUDE)}"\ace\IPC_SAP.h"\ - {$(INCLUDE)}"\ace\IPC_SAP.i"\ - {$(INCLUDE)}"\ace\Local_Tokens.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.i"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\Malloc.h"\ - {$(INCLUDE)}"\ace\Malloc.i"\ - {$(INCLUDE)}"\ace\Malloc_T.cpp"\ - {$(INCLUDE)}"\ace\Malloc_T.h"\ - {$(INCLUDE)}"\ace\Malloc_T.i"\ - {$(INCLUDE)}"\ace\Map_Manager.cpp"\ - {$(INCLUDE)}"\ace\Map_Manager.h"\ - {$(INCLUDE)}"\ace\Map_Manager.i"\ - {$(INCLUDE)}"\ace\Mem_Map.h"\ - {$(INCLUDE)}"\ace\Mem_Map.i"\ - {$(INCLUDE)}"\ace\Memory_Pool.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.i"\ - {$(INCLUDE)}"\ace\Message_Block.h"\ - {$(INCLUDE)}"\ace\Message_Block.i"\ - {$(INCLUDE)}"\ace\Message_Queue.cpp"\ - {$(INCLUDE)}"\ace\Message_Queue.h"\ - {$(INCLUDE)}"\ace\Message_Queue.i"\ - {$(INCLUDE)}"\ace\Module.cpp"\ - {$(INCLUDE)}"\ace\Module.h"\ - {$(INCLUDE)}"\ace\Module.i"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\Pipe.h"\ - {$(INCLUDE)}"\ace\Pipe.i"\ - {$(INCLUDE)}"\ace\Proactor.h"\ - {$(INCLUDE)}"\ace\Proactor.i"\ - {$(INCLUDE)}"\ace\Reactor.h"\ - {$(INCLUDE)}"\ace\Reactor.i"\ - {$(INCLUDE)}"\ace\ReactorEx.h"\ - {$(INCLUDE)}"\ace\ReactorEx.i"\ - {$(INCLUDE)}"\ace\Service_Config.h"\ - {$(INCLUDE)}"\ace\Service_Config.i"\ - {$(INCLUDE)}"\ace\Service_Object.h"\ - {$(INCLUDE)}"\ace\Service_Object.i"\ - {$(INCLUDE)}"\ace\Set.cpp"\ - {$(INCLUDE)}"\ace\Set.h"\ - {$(INCLUDE)}"\ace\Set.i"\ - {$(INCLUDE)}"\ace\Shared_Object.h"\ - {$(INCLUDE)}"\ace\Shared_Object.i"\ - {$(INCLUDE)}"\ace\Signal.h"\ - {$(INCLUDE)}"\ace\Signal.i"\ - {$(INCLUDE)}"\ace\SOCK.h"\ - {$(INCLUDE)}"\ace\SOCK.i"\ - {$(INCLUDE)}"\ace\SOCK_IO.h"\ - {$(INCLUDE)}"\ace\SOCK_IO.i"\ - {$(INCLUDE)}"\ace\SOCK_Stream.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.i"\ - {$(INCLUDE)}"\ace\SString.h"\ - {$(INCLUDE)}"\ace\SString.i"\ - {$(INCLUDE)}"\ace\Stack.cpp"\ - {$(INCLUDE)}"\ace\Stack.h"\ - {$(INCLUDE)}"\ace\Stack.i"\ - {$(INCLUDE)}"\ace\stdcpp.h"\ - {$(INCLUDE)}"\ace\Strategies.h"\ - {$(INCLUDE)}"\ace\Strategies_T.cpp"\ - {$(INCLUDE)}"\ace\Strategies_T.h"\ - {$(INCLUDE)}"\ace\Stream_Modules.cpp"\ - {$(INCLUDE)}"\ace\Stream_Modules.h"\ - {$(INCLUDE)}"\ace\Stream_Modules.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\ - {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\ - {$(INCLUDE)}"\ace\Svc_Handler.cpp"\ - {$(INCLUDE)}"\ace\Svc_Handler.h"\ - {$(INCLUDE)}"\ace\Svc_Handler.i"\ - {$(INCLUDE)}"\ace\Synch.h"\ - {$(INCLUDE)}"\ace\Synch.i"\ - {$(INCLUDE)}"\ace\Synch_Options.h"\ - {$(INCLUDE)}"\ace\Synch_T.cpp"\ - {$(INCLUDE)}"\ace\Synch_T.h"\ - {$(INCLUDE)}"\ace\Synch_T.i"\ - {$(INCLUDE)}"\ace\Task.h"\ - {$(INCLUDE)}"\ace\Task.i"\ - {$(INCLUDE)}"\ace\Task_T.cpp"\ - {$(INCLUDE)}"\ace\Task_T.h"\ - {$(INCLUDE)}"\ace\Task_T.i"\ - {$(INCLUDE)}"\ace\Thread.h"\ - {$(INCLUDE)}"\ace\Thread.i"\ - {$(INCLUDE)}"\ace\Thread_Manager.h"\ - {$(INCLUDE)}"\ace\Thread_Manager.i"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.i"\ - {$(INCLUDE)}"\ace\Token.h"\ - {$(INCLUDE)}"\ace\Token.i"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\ws2tcpip.h"\ - - -"$(INTDIR)\CPP-connector.obj" : $(SOURCE) $(DEP_CPP_CPP_C) "$(INTDIR)" - - -# End Source File -# End Target -################################################################################ -# Begin Target - -# Name "server - Win32 Debug" -################################################################################ -# Begin Source File - -SOURCE=.\test_sock_acceptor.cpp -DEP_CPP_TEST_S=\ - ".\CPP-acceptor.cpp"\ - ".\CPP-acceptor.h"\ - {$(INCLUDE)}"\ace\Acceptor.cpp"\ - {$(INCLUDE)}"\ace\Acceptor.h"\ - {$(INCLUDE)}"\ace\Acceptor.i"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\ACE.i"\ - {$(INCLUDE)}"\ace\Addr.h"\ - {$(INCLUDE)}"\ace\Addr.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Dynamic.h"\ - {$(INCLUDE)}"\ace\Dynamic.i"\ - {$(INCLUDE)}"\ace\Event_Handler.h"\ - {$(INCLUDE)}"\ace\Event_Handler.i"\ - {$(INCLUDE)}"\ace\Handle_Set.h"\ - {$(INCLUDE)}"\ace\Handle_Set.i"\ - {$(INCLUDE)}"\ace\INET_Addr.h"\ - {$(INCLUDE)}"\ace\INET_Addr.i"\ - {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\ - {$(INCLUDE)}"\ace\IPC_SAP.h"\ - {$(INCLUDE)}"\ace\IPC_SAP.i"\ - {$(INCLUDE)}"\ace\Local_Tokens.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.i"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\Malloc.h"\ - {$(INCLUDE)}"\ace\Malloc.i"\ - {$(INCLUDE)}"\ace\Malloc_T.cpp"\ - {$(INCLUDE)}"\ace\Malloc_T.h"\ - {$(INCLUDE)}"\ace\Malloc_T.i"\ - {$(INCLUDE)}"\ace\Map_Manager.cpp"\ - {$(INCLUDE)}"\ace\Map_Manager.h"\ - {$(INCLUDE)}"\ace\Map_Manager.i"\ - {$(INCLUDE)}"\ace\Mem_Map.h"\ - {$(INCLUDE)}"\ace\Mem_Map.i"\ - {$(INCLUDE)}"\ace\Memory_Pool.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.i"\ - {$(INCLUDE)}"\ace\Message_Block.h"\ - {$(INCLUDE)}"\ace\Message_Block.i"\ - {$(INCLUDE)}"\ace\Message_Queue.cpp"\ - {$(INCLUDE)}"\ace\Message_Queue.h"\ - {$(INCLUDE)}"\ace\Message_Queue.i"\ - {$(INCLUDE)}"\ace\Module.cpp"\ - {$(INCLUDE)}"\ace\Module.h"\ - {$(INCLUDE)}"\ace\Module.i"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\Pipe.h"\ - {$(INCLUDE)}"\ace\Pipe.i"\ - {$(INCLUDE)}"\ace\Proactor.h"\ - {$(INCLUDE)}"\ace\Proactor.i"\ - {$(INCLUDE)}"\ace\Reactor.h"\ - {$(INCLUDE)}"\ace\Reactor.i"\ - {$(INCLUDE)}"\ace\ReactorEx.h"\ - {$(INCLUDE)}"\ace\ReactorEx.i"\ - {$(INCLUDE)}"\ace\Service_Config.h"\ - {$(INCLUDE)}"\ace\Service_Config.i"\ - {$(INCLUDE)}"\ace\Service_Object.h"\ - {$(INCLUDE)}"\ace\Service_Object.i"\ - {$(INCLUDE)}"\ace\Set.cpp"\ - {$(INCLUDE)}"\ace\Set.h"\ - {$(INCLUDE)}"\ace\Set.i"\ - {$(INCLUDE)}"\ace\Shared_Object.h"\ - {$(INCLUDE)}"\ace\Shared_Object.i"\ - {$(INCLUDE)}"\ace\Signal.h"\ - {$(INCLUDE)}"\ace\Signal.i"\ - {$(INCLUDE)}"\ace\SOCK.h"\ - {$(INCLUDE)}"\ace\SOCK.i"\ - {$(INCLUDE)}"\ace\SOCK_Acceptor.h"\ - {$(INCLUDE)}"\ace\SOCK_Acceptor.i"\ - {$(INCLUDE)}"\ace\SOCK_IO.h"\ - {$(INCLUDE)}"\ace\SOCK_IO.i"\ - {$(INCLUDE)}"\ace\SOCK_Stream.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.i"\ - {$(INCLUDE)}"\ace\SString.h"\ - {$(INCLUDE)}"\ace\SString.i"\ - {$(INCLUDE)}"\ace\Stack.cpp"\ - {$(INCLUDE)}"\ace\Stack.h"\ - {$(INCLUDE)}"\ace\Stack.i"\ - {$(INCLUDE)}"\ace\stdcpp.h"\ - {$(INCLUDE)}"\ace\Strategies.h"\ - {$(INCLUDE)}"\ace\Strategies_T.cpp"\ - {$(INCLUDE)}"\ace\Strategies_T.h"\ - {$(INCLUDE)}"\ace\Stream_Modules.cpp"\ - {$(INCLUDE)}"\ace\Stream_Modules.h"\ - {$(INCLUDE)}"\ace\Stream_Modules.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\ - {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\ - {$(INCLUDE)}"\ace\Svc_Handler.cpp"\ - {$(INCLUDE)}"\ace\Svc_Handler.h"\ - {$(INCLUDE)}"\ace\Svc_Handler.i"\ - {$(INCLUDE)}"\ace\Synch.h"\ - {$(INCLUDE)}"\ace\Synch.i"\ - {$(INCLUDE)}"\ace\Synch_Options.h"\ - {$(INCLUDE)}"\ace\Synch_T.cpp"\ - {$(INCLUDE)}"\ace\Synch_T.h"\ - {$(INCLUDE)}"\ace\Synch_T.i"\ - {$(INCLUDE)}"\ace\Task.h"\ - {$(INCLUDE)}"\ace\Task.i"\ - {$(INCLUDE)}"\ace\Task_T.cpp"\ - {$(INCLUDE)}"\ace\Task_T.h"\ - {$(INCLUDE)}"\ace\Task_T.i"\ - {$(INCLUDE)}"\ace\Thread.h"\ - {$(INCLUDE)}"\ace\Thread.i"\ - {$(INCLUDE)}"\ace\Thread_Manager.h"\ - {$(INCLUDE)}"\ace\Thread_Manager.i"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.i"\ - {$(INCLUDE)}"\ace\Token.h"\ - {$(INCLUDE)}"\ace\Token.i"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\ws2tcpip.h"\ - - -"$(INTDIR)\test_sock_acceptor.obj" : $(SOURCE) $(DEP_CPP_TEST_S) "$(INTDIR)"\ - ".\CPP-acceptor.cpp" - - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=".\CPP-acceptor.cpp" -DEP_CPP_CPP_A=\ - ".\CPP-acceptor.h"\ - {$(INCLUDE)}"\ace\Acceptor.cpp"\ - {$(INCLUDE)}"\ace\Acceptor.h"\ - {$(INCLUDE)}"\ace\Acceptor.i"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\ACE.i"\ - {$(INCLUDE)}"\ace\Addr.h"\ - {$(INCLUDE)}"\ace\Addr.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Dynamic.h"\ - {$(INCLUDE)}"\ace\Dynamic.i"\ - {$(INCLUDE)}"\ace\Event_Handler.h"\ - {$(INCLUDE)}"\ace\Event_Handler.i"\ - {$(INCLUDE)}"\ace\Handle_Set.h"\ - {$(INCLUDE)}"\ace\Handle_Set.i"\ - {$(INCLUDE)}"\ace\INET_Addr.h"\ - {$(INCLUDE)}"\ace\INET_Addr.i"\ - {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\ - {$(INCLUDE)}"\ace\IPC_SAP.h"\ - {$(INCLUDE)}"\ace\IPC_SAP.i"\ - {$(INCLUDE)}"\ace\Local_Tokens.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.i"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\Malloc.h"\ - {$(INCLUDE)}"\ace\Malloc.i"\ - {$(INCLUDE)}"\ace\Malloc_T.cpp"\ - {$(INCLUDE)}"\ace\Malloc_T.h"\ - {$(INCLUDE)}"\ace\Malloc_T.i"\ - {$(INCLUDE)}"\ace\Map_Manager.cpp"\ - {$(INCLUDE)}"\ace\Map_Manager.h"\ - {$(INCLUDE)}"\ace\Map_Manager.i"\ - {$(INCLUDE)}"\ace\Mem_Map.h"\ - {$(INCLUDE)}"\ace\Mem_Map.i"\ - {$(INCLUDE)}"\ace\Memory_Pool.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.i"\ - {$(INCLUDE)}"\ace\Message_Block.h"\ - {$(INCLUDE)}"\ace\Message_Block.i"\ - {$(INCLUDE)}"\ace\Message_Queue.cpp"\ - {$(INCLUDE)}"\ace\Message_Queue.h"\ - {$(INCLUDE)}"\ace\Message_Queue.i"\ - {$(INCLUDE)}"\ace\Module.cpp"\ - {$(INCLUDE)}"\ace\Module.h"\ - {$(INCLUDE)}"\ace\Module.i"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\Pipe.h"\ - {$(INCLUDE)}"\ace\Pipe.i"\ - {$(INCLUDE)}"\ace\Proactor.h"\ - {$(INCLUDE)}"\ace\Proactor.i"\ - {$(INCLUDE)}"\ace\Reactor.h"\ - {$(INCLUDE)}"\ace\Reactor.i"\ - {$(INCLUDE)}"\ace\ReactorEx.h"\ - {$(INCLUDE)}"\ace\ReactorEx.i"\ - {$(INCLUDE)}"\ace\Service_Config.h"\ - {$(INCLUDE)}"\ace\Service_Config.i"\ - {$(INCLUDE)}"\ace\Service_Object.h"\ - {$(INCLUDE)}"\ace\Service_Object.i"\ - {$(INCLUDE)}"\ace\Set.cpp"\ - {$(INCLUDE)}"\ace\Set.h"\ - {$(INCLUDE)}"\ace\Set.i"\ - {$(INCLUDE)}"\ace\Shared_Object.h"\ - {$(INCLUDE)}"\ace\Shared_Object.i"\ - {$(INCLUDE)}"\ace\Signal.h"\ - {$(INCLUDE)}"\ace\Signal.i"\ - {$(INCLUDE)}"\ace\SOCK.h"\ - {$(INCLUDE)}"\ace\SOCK.i"\ - {$(INCLUDE)}"\ace\SOCK_IO.h"\ - {$(INCLUDE)}"\ace\SOCK_IO.i"\ - {$(INCLUDE)}"\ace\SOCK_Stream.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.i"\ - {$(INCLUDE)}"\ace\SString.h"\ - {$(INCLUDE)}"\ace\SString.i"\ - {$(INCLUDE)}"\ace\Stack.cpp"\ - {$(INCLUDE)}"\ace\Stack.h"\ - {$(INCLUDE)}"\ace\Stack.i"\ - {$(INCLUDE)}"\ace\stdcpp.h"\ - {$(INCLUDE)}"\ace\Strategies.h"\ - {$(INCLUDE)}"\ace\Strategies_T.cpp"\ - {$(INCLUDE)}"\ace\Strategies_T.h"\ - {$(INCLUDE)}"\ace\Stream_Modules.cpp"\ - {$(INCLUDE)}"\ace\Stream_Modules.h"\ - {$(INCLUDE)}"\ace\Stream_Modules.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\ - {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\ - {$(INCLUDE)}"\ace\Svc_Handler.cpp"\ - {$(INCLUDE)}"\ace\Svc_Handler.h"\ - {$(INCLUDE)}"\ace\Svc_Handler.i"\ - {$(INCLUDE)}"\ace\Synch.h"\ - {$(INCLUDE)}"\ace\Synch.i"\ - {$(INCLUDE)}"\ace\Synch_Options.h"\ - {$(INCLUDE)}"\ace\Synch_T.cpp"\ - {$(INCLUDE)}"\ace\Synch_T.h"\ - {$(INCLUDE)}"\ace\Synch_T.i"\ - {$(INCLUDE)}"\ace\Task.h"\ - {$(INCLUDE)}"\ace\Task.i"\ - {$(INCLUDE)}"\ace\Task_T.cpp"\ - {$(INCLUDE)}"\ace\Task_T.h"\ - {$(INCLUDE)}"\ace\Task_T.i"\ - {$(INCLUDE)}"\ace\Thread.h"\ - {$(INCLUDE)}"\ace\Thread.i"\ - {$(INCLUDE)}"\ace\Thread_Manager.h"\ - {$(INCLUDE)}"\ace\Thread_Manager.i"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.i"\ - {$(INCLUDE)}"\ace\Token.h"\ - {$(INCLUDE)}"\ace\Token.i"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\ws2tcpip.h"\ - - -"$(INTDIR)\CPP-acceptor.obj" : $(SOURCE) $(DEP_CPP_CPP_A) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/examples/Connection/non_blocking/non_blocking.mdp b/examples/Connection/non_blocking/non_blocking.mdp Binary files differdeleted file mode 100644 index ee61b8cf6ea..00000000000 --- a/examples/Connection/non_blocking/non_blocking.mdp +++ /dev/null diff --git a/examples/Connection/non_blocking/test_sock_acceptor.cpp b/examples/Connection/non_blocking/test_sock_acceptor.cpp deleted file mode 100644 index 6bc67888972..00000000000 --- a/examples/Connection/non_blocking/test_sock_acceptor.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// ACE_SOCK Server. -// $Id$ - - -#include "ace/SOCK_Acceptor.h" -#include "ace/INET_Addr.h" -#include "CPP-acceptor.h" - -typedef Svc_Handler<ACE_SOCK_STREAM> SVC_HANDLER; -typedef IPC_Server<SVC_HANDLER, ACE_SOCK_ACCEPTOR> IPC_SERVER; - -int -main (int argc, char *argv[]) -{ - // Perform Service_Config initializations - ACE_Service_Config daemon (argv[0]); - - IPC_SERVER peer_acceptor; - - if (peer_acceptor.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - return peer_acceptor.svc (); -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Concurrency_Strategy<SVC_HANDLER>; -template class ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_SOCK_ACCEPTOR>; -template class ACE_Message_Queue<ACE_NULL_SYNCH>; -template class ACE_Module<ACE_NULL_SYNCH>; -template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; -template class ACE_TSS<ACE_Dynamic>; -template class ACE_Task<ACE_NULL_SYNCH>; -template class ACE_Thru_Task<ACE_NULL_SYNCH>; -template class IPC_Server<SVC_HANDLER, ACE_SOCK_ACCEPTOR>; -template class Svc_Handler<ACE_SOCK_STREAM>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Connection/non_blocking/test_sock_connector.cpp b/examples/Connection/non_blocking/test_sock_connector.cpp deleted file mode 100644 index 1417715f94e..00000000000 --- a/examples/Connection/non_blocking/test_sock_connector.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// ACE_SOCK Client. -// $Id$ - - -#include "ace/SOCK_Connector.h" -#include "ace/INET_Addr.h" -#include "CPP-connector.h" - -typedef Peer_Handler<ACE_SOCK_STREAM> PEER_HANDLER; -typedef IPC_Client<PEER_HANDLER, ACE_SOCK_CONNECTOR> IPC_CLIENT; - -int -main (int argc, char *argv[]) -{ - // Perform Service_Config initializations - ACE_Service_Config daemon (argv[0]); - - IPC_CLIENT peer_connector; - - if (peer_connector.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - return peer_connector.svc (); -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Connector<PEER_HANDLER, ACE_SOCK_CONNECTOR>; -template class ACE_Guard<ACE_RW_Mutex>; -template class ACE_Map_Iterator<int, ACE_Svc_Tuple<PEER_HANDLER> *, ACE_RW_Mutex>; -template class ACE_Map_Manager<int, ACE_Svc_Tuple<PEER_HANDLER> *, ACE_RW_Mutex>; -template class ACE_Read_Guard<ACE_RW_Mutex>; -template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_SYNCH>; -template class ACE_Svc_Tuple<PEER_HANDLER>; -template class ACE_Write_Guard<ACE_RW_Mutex>; -template class ACE_TSS<ACE_Dynamic>; -template class IPC_Client<PEER_HANDLER, ACE_SOCK_CONNECTOR>; -template class Peer_Handler<ACE_SOCK_STREAM>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Connection/non_blocking/test_spipe_acceptor.cpp b/examples/Connection/non_blocking/test_spipe_acceptor.cpp deleted file mode 100644 index fa4d4a4481d..00000000000 --- a/examples/Connection/non_blocking/test_spipe_acceptor.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// ACE_SPIPE Server. -// $Id$ - -#include "ace/SPIPE_Acceptor.h" -#include "ace/SPIPE_Addr.h" -#include "CPP-acceptor.h" - -#if !defined (ACE_WIN32) -typedef Svc_Handler<ACE_SPIPE_STREAM> SVC_HANDLER; -typedef IPC_Server<SVC_HANDLER, ACE_SPIPE_ACCEPTOR> IPC_SERVER; - -int -main (int argc, char *argv[]) -{ - // Perform Service_Config initializations - ACE_Service_Config daemon (argv[0]); - - IPC_SERVER peer_acceptor; - - if (peer_acceptor.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - return peer_acceptor.svc (); -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Concurrency_Strategy<SVC_HANDLER>; -template class ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_SPIPE_ACCEPTOR>; -template class ACE_Message_Queue<ACE_NULL_SYNCH>; -template class ACE_Module<ACE_NULL_SYNCH>; -template class ACE_Svc_Handler<ACE_SPIPE_STREAM, ACE_NULL_SYNCH>; -template class ACE_TSS<ACE_Dynamic>; -template class ACE_Task<ACE_NULL_SYNCH>; -template class ACE_Thru_Task<ACE_NULL_SYNCH>; -template class IPC_Server<SVC_HANDLER, ACE_SPIPE_ACCEPTOR>; -template class Svc_Handler<ACE_SPIPE_STREAM>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "This test is not ported to Win32 (yet)\n"), -1); -} -#endif /* !ACE_WIN32 */ - diff --git a/examples/Connection/non_blocking/test_spipe_connector.cpp b/examples/Connection/non_blocking/test_spipe_connector.cpp deleted file mode 100644 index d47fd847575..00000000000 --- a/examples/Connection/non_blocking/test_spipe_connector.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// ACE_SPIPE Client. -// $Id$ - -#include "ace/SPIPE_Connector.h" -#include "ace/SPIPE_Addr.h" -#include "CPP-connector.h" - -#if !defined (ACE_WIN32) -typedef Peer_Handler<ACE_SPIPE_STREAM> PEER_HANDLER; -typedef IPC_Client<PEER_HANDLER, ACE_SPIPE_CONNECTOR> IPC_CLIENT; - -int -main (int argc, char *argv[]) -{ - // Perform Service_Config initializations - ACE_Service_Config daemon (argv[0]); - - IPC_CLIENT peer_connector; - - if (peer_connector.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - return peer_connector.svc (); -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Connector<PEER_HANDLER, ACE_SPIPE_CONNECTOR>; -template class ACE_Guard<ACE_RW_Mutex>; -template class ACE_Map_Iterator<int, ACE_Svc_Tuple<PEER_HANDLER> *, ACE_RW_Mutex>; -template class ACE_Map_Manager<int, ACE_Svc_Tuple<PEER_HANDLER> *, ACE_RW_Mutex>; -template class ACE_Read_Guard<ACE_RW_Mutex>; -template class ACE_Svc_Handler<ACE_SPIPE_STREAM, ACE_SYNCH>; -template class ACE_Svc_Tuple<PEER_HANDLER>; -template class ACE_Write_Guard<ACE_RW_Mutex>; -template class ACE_TSS<ACE_Dynamic>; -template class IPC_Client<PEER_HANDLER, ACE_SPIPE_CONNECTOR>; -template class Peer_Handler<ACE_SPIPE_STREAM>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "This test is not ported to Win32 (yet)\n"), -1); -} -#endif /* !ACE_WIN32 */ diff --git a/examples/Connection/non_blocking/test_tli_acceptor.cpp b/examples/Connection/non_blocking/test_tli_acceptor.cpp deleted file mode 100644 index 6e08159781a..00000000000 --- a/examples/Connection/non_blocking/test_tli_acceptor.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// ACE_TLI Server. -// $Id$ - - -#include "ace/TLI_Acceptor.h" -#include "ace/INET_Addr.h" -#include "CPP-acceptor.h" - -#if defined (ACE_HAS_TLI) -typedef Svc_Handler<ACE_TLI_STREAM> SVC_HANDLER; -typedef IPC_Server<SVC_HANDLER, ACE_TLI_ACCEPTOR> IPC_SERVER; - -int -main (int argc, char *argv[]) -{ - // Perform Service_Config initializations - ACE_Service_Config daemon (argv[0]); - - IPC_SERVER peer_acceptor; - - if (peer_acceptor.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - return peer_acceptor.svc (); -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Concurrency_Strategy<SVC_HANDLER>; -template class ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_TLI_ACCEPTOR>; -template class ACE_Message_Queue<ACE_NULL_SYNCH>; -template class ACE_Module<ACE_NULL_SYNCH>; -template class ACE_Svc_Handler<ACE_TLI_STREAM, ACE_NULL_SYNCH>; -template class ACE_TSS<ACE_Dynamic>; -template class ACE_Task<ACE_NULL_SYNCH>; -template class ACE_Thru_Task<ACE_NULL_SYNCH>; -template class IPC_Server<SVC_HANDLER, ACE_TLI_ACCEPTOR>; -template class Svc_Handler<ACE_TLI_STREAM>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform does not support TLI\n"), 1); -} -#endif /* ACE_HAS_TLI */ diff --git a/examples/Connection/non_blocking/test_tli_connector.cpp b/examples/Connection/non_blocking/test_tli_connector.cpp deleted file mode 100644 index 243da828cfc..00000000000 --- a/examples/Connection/non_blocking/test_tli_connector.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// ACE_TLI Client. -// $Id$ - - -#include "ace/TLI_Connector.h" -#include "ace/INET_Addr.h" -#include "CPP-connector.h" - -#if defined (ACE_HAS_TLI) - -typedef Peer_Handler<ACE_TLI_STREAM> PEER_HANDLER; -typedef IPC_Client<PEER_HANDLER, ACE_TLI_CONNECTOR> IPC_CLIENT; - -int -main (int argc, char *argv[]) -{ - // Perform Service_Config initializations - ACE_Service_Config daemon (argv[0]); - - IPC_CLIENT peer_connector; - - if (peer_connector.init (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "init"), -1); - - return peer_connector.svc (); -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Connector<PEER_HANDLER, ACE_TLI_CONNECTOR>; -template class ACE_Guard<ACE_RW_Mutex>; -template class ACE_Map_Iterator<int, ACE_Svc_Tuple<PEER_HANDLER> *, ACE_RW_Mutex>; -template class ACE_Map_Manager<int, ACE_Svc_Tuple<PEER_HANDLER> *, ACE_RW_Mutex>; -template class ACE_Read_Guard<ACE_RW_Mutex>; -template class ACE_Svc_Handler<ACE_TLI_STREAM, ACE_SYNCH>; -template class ACE_Svc_Tuple<PEER_HANDLER>; -template class ACE_Write_Guard<ACE_RW_Mutex>; -template class ACE_TSS<ACE_Dynamic>; -template class IPC_Client<PEER_HANDLER, ACE_TLI_CONNECTOR>; -template class Peer_Handler<ACE_TLI_STREAM>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform does not support TLI\n"), 1); -} -#endif /* ACE_HAS_TLI */ diff --git a/examples/IOStream/Makefile b/examples/IOStream/Makefile deleted file mode 100644 index 699113be687..00000000000 --- a/examples/IOStream/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the ACE IOStream examples -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = README - -DIRS = client \ - server - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/examples/IOStream/client/Makefile b/examples/IOStream/client/Makefile deleted file mode 100644 index fe48a7d2a30..00000000000 --- a/examples/IOStream/client/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for IOStream test client -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = iostream_client - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/iostream_client.o .shobj/iostream_client.so: iostream_client.cpp \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/IOStream.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IOStream/client/iostream_client.cpp b/examples/IOStream/client/iostream_client.cpp deleted file mode 100644 index 1d909d17853..00000000000 --- a/examples/IOStream/client/iostream_client.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include "ace/SOCK_Connector.h" -#include "ace/IOStream.h" - -int main (int argc, char *argv[]) -{ - char *server_host = argc > 1 ? argv[1] : ACE_DEFAULT_SERVER_HOST; - u_short server_port = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_SERVER_PORT; - - ACE_IOStream<ACE_SOCK_Stream> server; - ACE_SOCK_Connector connector; - ACE_INET_Addr addr (server_port, server_host); - - if (connector.connect (server, addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - server << "1 2.3 testing" << endl; // Buffer up some things to send to the server. - - int i; - float f; - -#if defined (__GNUC__) - String s1; - String s2; - server >> s1 >> i >> f >> s2; - - cerr << "Server said:\n\t"; - cerr << s1 << " "; - cerr << i << " "; - cerr << f << " "; - cerr << s2 << endl; -#else - server >> i >> f; - - cerr << "Server said:\n\t"; - cerr << i << " "; - cerr << f << endl; -#endif /* __GNUC__ */ - - if (server.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_IOStream <ACE_SOCK_Stream>; -template class ACE_Streambuf <ACE_SOCK_Stream>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/IOStream/server/Makefile b/examples/IOStream/server/Makefile deleted file mode 100644 index 339997d2371..00000000000 --- a/examples/IOStream/server/Makefile +++ /dev/null @@ -1,104 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for IOStream test server -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = iostream_server - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/iostream_server.o .shobj/iostream_server.so: iostream_server.cpp \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/IOStream.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IOStream/server/iostream_server.cpp b/examples/IOStream/server/iostream_server.cpp deleted file mode 100644 index 21958e66449..00000000000 --- a/examples/IOStream/server/iostream_server.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// This is a simple example of using the ACE_IOStream and -// ACE_streambuf templates to create an object based on ACE_*_Stream -// classes which mimic a C++ iostream. - -#include "ace/Acceptor.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/Service_Config.h" -#include "ace/IOStream.h" - -// Declare a new type which will case an ACE_SOCK_Stream to behave -// like an iostream. The new type (ACE_SOCK_IOStream) can be used -// anywhere an ACE_SOCK_Stream is used. - -typedef ACE_IOStream<ACE_SOCK_Stream> ACE_SOCK_IOStream ; - -// Create a service handler object based on our new -// iostream/SOCK_Stream hybrid. - -typedef ACE_Svc_Handler<ACE_SOCK_IOStream, ACE_INET_Addr, ACE_NULL_SYNCH> - Service_Handler; - -class Handler : public Service_Handler - // = TITLE - // Extend the <Service_Handler> object to do our bidding. All of - // this is fairly standard until we get to the <handle_input> - // where we begin using the iostream characteristics of the - // peer. -{ -public: - Handler (void) {} - - virtual int open (void *) - { - if (this->reactor () ->register_handler - (this, ACE_Event_Handler::READ_MASK) == - 1) - ACE_ERROR_RETURN ((LM_ERROR, - "registering connection handler with ACE_Reactor\n"), - - 1); - - return 0; - } - - virtual void destroy (void) - { - this->peer ().close (); - delete this ; - } - - virtual int close (u_long) - { - this->destroy (); - return 0 ; - } - - virtual int handle_input (ACE_HANDLE) - { - int i; - float f; - -#if defined (__GNUC__) - String s; - - if (!(this -> peer () >> i >> f >> s)) - { - cerr << "Error getting data" << endl ; - return - 1 ; - } - - cerr << "Received (" << i << ") (" << f << ") (" << s << ")" << endl ; - - if (!(this -> peer () << "Received: " << i << " " << f << " " << s << endl)) - { - cerr << __LINE__ << "Error sending data" << endl ; - return - 1 ; - } -#else - if (!(this -> peer () >> i >> f)) - { - cerr << "Error getting data" << endl ; - return - 1 ; - } - - cerr << "Received (" << i << ") (" << f << ")" << endl; - - if (!(this -> peer () << i << " " << f << endl)) - { - cerr << __LINE__ << "Error sending data" << endl ; - return - 1 ; - } -#endif /* __GNUC__ */ - // In order to flush the output to the peer, we have to use the - // sync () function. Some iostreams implementations let us use a - // 'flush' function much like the 'endl' function. - - // this->peer ().sync (); - return 0; - } -}; - -// Create an object which will accept new connection requests and -// create handler objects for us. - -typedef ACE_Acceptor<Handler, ACE_SOCK_ACCEPTOR> Logging_Acceptor; - -int -main (int argc, char *argv []) -{ - ACE_Service_Config daemon; - - // Create an adapter to end the event loop. - ACE_Sig_Adapter sa ((ACE_Sig_Handler_Ex) ACE_Service_Config::end_reactor_event_loop); - - ACE_Sig_Set sig_set; - sig_set.sig_add (SIGINT); - sig_set.sig_add (SIGQUIT); - - // Register ourselves to receive SIGINT and SIGQUIT so we can shut - // down gracefully via signals. - if (ACE_Service_Config::reactor ()->register_handler (sig_set, &sa) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n"), -1); - - Logging_Acceptor peer_acceptor ; - - if (peer_acceptor.open (ACE_INET_Addr (argc > 1 ? atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT)) == - 1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), - 1); - - else if (ACE_Service_Config::reactor ()->register_handler - (&peer_acceptor, ACE_Event_Handler::READ_MASK) == - 1) - ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), - 1); - - ACE_DEBUG ((LM_DEBUG, " (%P|%t) starting up daemon\n")); - - daemon.run_reactor_event_loop (); - - ACE_DEBUG ((LM_DEBUG, " (%P|%t) shutting down server daemon\n")); - - return 0; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Acceptor <Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_IOStream <ACE_SOCK_Stream>; -template class ACE_Message_Queue <ACE_NULL_SYNCH>; -template class ACE_Module <ACE_NULL_SYNCH>; -template class ACE_Streambuf <ACE_SOCK_Stream>; -template class ACE_Svc_Handler <ACE_SOCK_IOStream, ACE_INET_Addr, ACE_NULL_SYNCH>; -template class ACE_TSS <ACE_Dynamic>; -template class ACE_Task <ACE_NULL_SYNCH>; -template class ACE_Thru_Task <ACE_NULL_SYNCH>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/IPC_SAP/DEV_SAP/Makefile b/examples/IPC_SAP/DEV_SAP/Makefile deleted file mode 100644 index d596bd3d53c..00000000000 --- a/examples/IPC_SAP/DEV_SAP/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the DEV_SAP test directory -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = reader \ - writer - -#---------------------------------------------------------------------------- -# macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/examples/IPC_SAP/DEV_SAP/README b/examples/IPC_SAP/DEV_SAP/README deleted file mode 100644 index 8e47d8c5cec..00000000000 --- a/examples/IPC_SAP/DEV_SAP/README +++ /dev/null @@ -1,23 +0,0 @@ -This directory contains a test example for the DEV_SAP -class category. It implements a class TTY_IO that is -derived from ACE_DEV_IO and adds a control method -with specific features for a serial line connection -(e.g. /dev/ttya and /dev/ttyb on UNIX systems). - -The reader/reader executable initializes its -device-special file (given as command-line parameter), -reads characters from it (until it recognizes character 'q') -ands sends the characters read to stdout. - -The writer/writer executable also initializes its -device-special file (given as command-line parameter), -reads characters from stdin (until'q') and sends them -to the device. - -To run the tests I connect /dev/ttya and /dev/ttyb (with a -zero modem cable) and start the reader with "reader /dev/ttya" -and the writer (in a different window) with "writer /dev/ttyb". - -Characters typed in the writer window should now appear as output -in the reader window. Note that characters are buffered till EOL. - diff --git a/examples/IPC_SAP/DEV_SAP/reader/Makefile b/examples/IPC_SAP/DEV_SAP/reader/Makefile deleted file mode 100644 index e1cdc9c3d0b..00000000000 --- a/examples/IPC_SAP/DEV_SAP/reader/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the simple DEV reader test file -# for serial devices -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = reader - -SRC = $(addsuffix .cpp,$(BIN)) -OBJ = $(SRC:%.cpp=$(VDIR)%.o) - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LIBS = -lACE - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/reader.o .shobj/reader.so: reader.cpp \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/DEV_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/DEV_Connector.h \ - $(WRAPPER_ROOT)/ace/DEV_IO.h \ - $(WRAPPER_ROOT)/ace/DEV.h \ - $(WRAPPER_ROOT)/ace/IO_SAP.h \ - $(WRAPPER_ROOT)/ace/IO_SAP.i \ - $(WRAPPER_ROOT)/ace/DEV.i \ - $(WRAPPER_ROOT)/ace/DEV_IO.i \ - $(WRAPPER_ROOT)/ace/DEV_Connector.i \ - $(WRAPPER_ROOT)/ace/TTY_IO.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/DEV_SAP/reader/reader.cpp b/examples/IPC_SAP/DEV_SAP/reader/reader.cpp deleted file mode 100644 index 1741c209c13..00000000000 --- a/examples/IPC_SAP/DEV_SAP/reader/reader.cpp +++ /dev/null @@ -1,49 +0,0 @@ - -// $Id$ - -#include "ace/OS.h" -#include "ace/DEV_Addr.h" -#include "ace/DEV_Connector.h" -#include "ace/DEV_IO.h" -#include "ace/TTY_IO.h" - -int -main (int argc, char *argv[]) -{ - if (argc < 2) - ACE_ERROR_RETURN ((LM_ERROR, "usage: %s device-filename\n", argv[0]), 1); - - ACE_TTY_IO read_dev; - ACE_DEV_Connector con; - - if (con.connect (read_dev, ACE_DEV_Addr (argv[1])) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", argv[1]), 1); - - ACE_TTY_IO::Serial_Params myparams; - myparams.baudrate = 9600; - myparams.parityenb = 1; - myparams.paritymode = "EVEN"; - myparams.databits = 8; - myparams.stopbits = 1; - myparams.readtimeoutmsec = 10000; - myparams.ctsenb = 0; - myparams.rcvenb = 1; - - int ret = read_dev.control (ACE_TTY_IO::SETPARAMS, &myparams); - - if (ret == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p control\n", argv[1]), 1); - - // Read till character 'q'. - for (char readback = 'x'; readback != 'q'; ) - { - ssize_t bytes_read = read_dev.recv_n ((void *) &readback, 1); - - if (bytes_read == 1) - ACE_DEBUG ((LM_DEBUG, "read: %c\n", readback)); - else if (bytes_read == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p recv\n", argv[1]), 1); - } - - return 0; -} diff --git a/examples/IPC_SAP/DEV_SAP/writer/Makefile b/examples/IPC_SAP/DEV_SAP/writer/Makefile deleted file mode 100644 index 0695a20c0a7..00000000000 --- a/examples/IPC_SAP/DEV_SAP/writer/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the simple DEV writer test file -# for serial devices -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = writer - -SRC = $(addsuffix .cpp,$(BIN)) -OBJ = $(SRC:%.cpp=$(VDIR)%.o) - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LIBS = -lACE - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/writer.o .shobj/writer.so: writer.cpp \ - $(WRAPPER_ROOT)/ace/DEV_Connector.h \ - $(WRAPPER_ROOT)/ace/DEV_IO.h \ - $(WRAPPER_ROOT)/ace/DEV.h \ - $(WRAPPER_ROOT)/ace/IO_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IO_SAP.i \ - $(WRAPPER_ROOT)/ace/DEV_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/DEV.i \ - $(WRAPPER_ROOT)/ace/DEV_IO.i \ - $(WRAPPER_ROOT)/ace/DEV_Connector.i \ - $(WRAPPER_ROOT)/ace/TTY_IO.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/DEV_SAP/writer/writer.cpp b/examples/IPC_SAP/DEV_SAP/writer/writer.cpp deleted file mode 100644 index 2f0216c2c25..00000000000 --- a/examples/IPC_SAP/DEV_SAP/writer/writer.cpp +++ /dev/null @@ -1,54 +0,0 @@ - -// $Id$ - -#include "ace/DEV_Connector.h" -#include "ace/TTY_IO.h" - -int -main (int argc, char *argv[]) -{ - if (argc < 2) - ACE_ERROR_RETURN ((LM_ERROR, "usage: %s device-filename\n", argv[0]), 1); - - ACE_TTY_IO write_dev; - - ACE_DEV_Connector con; - - if (con.connect (write_dev, ACE_DEV_Addr (argv[1])) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", argv[1]), 1); - - ACE_TTY_IO::Serial_Params myparams; - myparams.baudrate = 9600; - myparams.parityenb = 1; - myparams.paritymode = "EVEN"; - myparams.databits = 8; - myparams.stopbits = 1; - myparams.readtimeoutmsec = 200; - myparams.ctsenb = 0; - myparams.rcvenb = 1; - - int ret = write_dev.control (ACE_TTY_IO::SETPARAMS, &myparams); - - if (ret == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "control"), 1); - - ACE_DEBUG ((LM_DEBUG, "enter character to send, q terminates :\n")); - - for (char writeto = 'x'; - ACE_OS::read (ACE_STDIN, &writeto, 1) != -1; - ) - { - ssize_t bytes_written = write_dev.send_n ((void *)&writeto, 1); - - if (bytes_written != 1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 1); - - if (writeto == 'q') - break; - } - - if (write_dev.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - return 0; -} diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-client.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-client.cpp deleted file mode 100644 index 09891379c86..00000000000 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-client.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "ace/FIFO_Send_Msg.h" -// $Id$ - - -#if defined (ACE_HAS_STREAM_PIPES) - -int -main (int, char *[]) -{ - ACE_FIFO_Send_Msg client (ACE_DEFAULT_RENDEZVOUS); - - char buf[BUFSIZ]; - ACE_Str_Buf msg (buf); - - ACE_OS::srand (unsigned (ACE_OS::time (0))); - - while (ACE_OS::fgets (buf, sizeof buf, stdin) != 0) - { - msg.len = strlen (buf) + 1; - if (client.send (ACE_OS::rand () % 11, &msg) == -1) - ::perror ("send"); - } - - if (client.close () == -1) - ACE_OS::perror ("close"), ACE_OS::exit (1); - - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-server.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-server.cpp deleted file mode 100644 index 6ad9575cdee..00000000000 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-Msg-server.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include "ace/FIFO_Recv_Msg.h" -// $Id$ - - -#if defined (ACE_HAS_STREAM_PIPES) - -int -main (int, char *[]) -{ - ACE_OS::unlink (ACE_DEFAULT_RENDEZVOUS); - ACE_FIFO_Recv_Msg server (ACE_DEFAULT_RENDEZVOUS); - char buf[BUFSIZ]; - ACE_Str_Buf msg (buf, 0, sizeof buf); - int flags = MSG_ANY; - int band = 0; - int n; - - while ((n = server.recv (&band, &msg, (ACE_Str_Buf *) 0, &flags)) >= 0) - { - if (msg.len == 0) - break; - else - ACE_DEBUG ((LM_DEBUG, "%4d (%4d): %*s", - msg.len, band, msg.len, msg.buf)); - flags = MSG_ANY; - band = 0; - } - - if (n == -1) - ACE_OS::perror ("recv"), ACE_OS::exit (1); - - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-client.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-client.cpp deleted file mode 100644 index 1cb80dbb527..00000000000 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-client.cpp +++ /dev/null @@ -1,24 +0,0 @@ - -// $Id$ - -#include "ace/FIFO_Send.h" - -int -main (int, char *[]) -{ - ACE_FIFO_Send client (ACE_DEFAULT_RENDEZVOUS); - char buf[BUFSIZ]; - - while (ACE_OS::fgets (buf, sizeof buf, stdin) != 0) - { - ssize_t n = ACE_OS::strlen (buf); - - if (client.send (buf, n) != n) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 1); - } - - if (client.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - return 0; -} diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-server.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-server.cpp deleted file mode 100644 index 205ff83501d..00000000000 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-server.cpp +++ /dev/null @@ -1,25 +0,0 @@ - -// $Id$ - -#include "ace/FIFO_Recv.h" - -int -main (int, char *[]) -{ - ACE_OS::unlink (ACE_DEFAULT_RENDEZVOUS); - ACE_FIFO_Recv server (ACE_DEFAULT_RENDEZVOUS); - char buf[BUFSIZ]; - int n; - - while ((n = server.recv (buf, sizeof buf)) > 0) - { - ACE_OS::printf ("%4d: ", n); - ACE_OS::fflush (stdout); - ACE_OS::write (ACE_STDOUT, buf, n); - } - - if (n == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "recv"), 1); - - return 0; -} diff --git a/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp b/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp deleted file mode 100644 index 0e7004584ee..00000000000 --- a/examples/IPC_SAP/FIFO_SAP/FIFO-test.cpp +++ /dev/null @@ -1,95 +0,0 @@ -// $Id$ - -// Purpose: This program uses ACE_FIFO wrappers to perform -// interprocess communication between a parent process and a child -// process. The parents reads from an input file and writes it into -// the fifo. The child reads from the ACE_FIFO and executes the more -// command. - - -#include "ace/FIFO_Recv.h" -#include "ace/FIFO_Send.h" - -#define PERMS 0666 -#define EXEC_NAME "more" -#define EXEC_COMMAND_ARG "more" - -const char *FIFO_NAME = "/tmp/fifo"; - -int -do_child (ACE_FIFO_Recv &fifo_reader) -{ - // Set child's stdin to read from the fifo. - if (ACE_OS::close (0) == -1 || ACE_OS::dup (fifo_reader.get_handle ()) == -1) - return -1; - - char *argv[2]; - argv[0] = EXEC_COMMAND_ARG; - argv[1] = 0; - - if (ACE_OS::execvp (EXEC_NAME, argv) == -1) - return -1; - return 0; -} - -int -do_parent (const char fifo_name[], char input_filename[]) -{ - int inputfd; - ACE_FIFO_Send fifo_sender (fifo_name, O_WRONLY | O_CREAT); - int len; - char buf[BUFSIZ]; - - if (fifo_sender.get_handle () == ACE_INVALID_HANDLE) - return -1; - - if ((inputfd = ACE_OS::open (input_filename, O_RDONLY)) == -1) - return -1; - - // Read from input file and write into input end of the fifo. - - while ((len = ACE_OS::read (inputfd, buf, sizeof buf)) > 0) - if (fifo_sender.send (buf, len) != len) - return -1; - - if (len == -1) - return -1; - - if (fifo_sender.remove () == -1) - return -1; - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - - if (argc != 2) - ACE_ERROR ((LM_ERROR, "usage: %n input-file\n%a", 1)); - - ACE_FIFO_Recv fifo_reader (FIFO_NAME, O_RDONLY | O_CREAT, PERMS, 0); - - if (fifo_reader.get_handle () == ACE_INVALID_HANDLE) - return -1; - - pid_t child_pid; - - switch (child_pid = ACE_OS::fork ()) - { - case -1: - ACE_ERROR ((LM_ERROR, "%n: %p\n%a", "fork", 1)); - case 0: - if (do_child (fifo_reader) == -1) - ACE_ERROR ((LM_ERROR, "%n: %p\n%a", "do_child", 1)); - default: - if (do_parent (FIFO_NAME, argv[1]) == -1) - ACE_ERROR ((LM_ERROR, "%n: %p\n%a", "do_parent", 1)); - - // wait for child to ACE_OS::exit. - if (ACE_OS::waitpid (child_pid, (int *) 0, 0) == -1) - ACE_ERROR ((LM_ERROR, "%n: %p\n%a", "waitpid", 1)); - } - - return 0; -} diff --git a/examples/IPC_SAP/FIFO_SAP/Makefile b/examples/IPC_SAP/FIFO_SAP/Makefile deleted file mode 100644 index bcb70e201fd..00000000000 --- a/examples/IPC_SAP/FIFO_SAP/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for simple FIFO test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = FIFO-Msg-client \ - FIFO-Msg-server \ - FIFO-client \ - FIFO-server \ - FIFO-test - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/FIFO-Msg-client.o .shobj/FIFO-Msg-client.so: FIFO-Msg-client.cpp \ - $(WRAPPER_ROOT)/ace/FIFO_Send_Msg.h \ - $(WRAPPER_ROOT)/ace/FIFO_Send.h \ - $(WRAPPER_ROOT)/ace/FIFO.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/FIFO_Send.i \ - $(WRAPPER_ROOT)/ace/FIFO_Send_Msg.i -.obj/FIFO-Msg-server.o .shobj/FIFO-Msg-server.so: FIFO-Msg-server.cpp \ - $(WRAPPER_ROOT)/ace/FIFO_Recv_Msg.h \ - $(WRAPPER_ROOT)/ace/FIFO_Recv.h \ - $(WRAPPER_ROOT)/ace/FIFO.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/FIFO_Recv.i \ - $(WRAPPER_ROOT)/ace/FIFO_Recv_Msg.i -.obj/FIFO-client.o .shobj/FIFO-client.so: FIFO-client.cpp \ - $(WRAPPER_ROOT)/ace/FIFO_Send.h \ - $(WRAPPER_ROOT)/ace/FIFO.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/FIFO_Send.i -.obj/FIFO-server.o .shobj/FIFO-server.so: FIFO-server.cpp \ - $(WRAPPER_ROOT)/ace/FIFO_Recv.h \ - $(WRAPPER_ROOT)/ace/FIFO.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/FIFO_Recv.i -.obj/FIFO-test.o .shobj/FIFO-test.so: FIFO-test.cpp \ - $(WRAPPER_ROOT)/ace/FIFO_Recv.h \ - $(WRAPPER_ROOT)/ace/FIFO.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/FIFO_Recv.i \ - $(WRAPPER_ROOT)/ace/FIFO_Send.h \ - $(WRAPPER_ROOT)/ace/FIFO_Send.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/FILE_SAP/Makefile b/examples/IPC_SAP/FILE_SAP/Makefile deleted file mode 100644 index 5ce2232030b..00000000000 --- a/examples/IPC_SAP/FILE_SAP/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the simple file test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = client - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/client.o .shobj/client.so: client.cpp \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/FILE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/FILE_Connector.h \ - $(WRAPPER_ROOT)/ace/FILE_IO.h \ - $(WRAPPER_ROOT)/ace/FILE.h \ - $(WRAPPER_ROOT)/ace/IO_SAP.h \ - $(WRAPPER_ROOT)/ace/IO_SAP.i \ - $(WRAPPER_ROOT)/ace/FILE.i \ - $(WRAPPER_ROOT)/ace/FILE_IO.i \ - $(WRAPPER_ROOT)/ace/FILE_Connector.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/FILE_SAP/client.cpp b/examples/IPC_SAP/FILE_SAP/client.cpp deleted file mode 100644 index 4de41a3225e..00000000000 --- a/examples/IPC_SAP/FILE_SAP/client.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "ace/OS.h" -// $Id$ - - -#include "ace/FILE_Addr.h" -#include "ace/FILE_Connector.h" -#include "ace/FILE_IO.h" - -int -main (int argc, char *argv[]) -{ - if (argc < 2) - ACE_ERROR_RETURN ((LM_ERROR, "usage: %s filename string\n", argv[0]), 1); - - char *readback = new char[::strlen (argv[1]) + 1]; - - ACE_FILE_Info fileinfo; - ACE_FILE_IO cli_file; - ACE_FILE_Connector con; - - if (con.connect (cli_file, ACE_FILE_Addr (argv[1]), - 0, ACE_Addr::sap_any, 0, - O_RDWR|O_APPEND|O_CREAT, 0666) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n to %s", "connect", argv[1]), -1); - - ssize_t len = ACE_OS::strlen (argv[2]) + 1; - - if (cli_file.send (argv[2], len) != len) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 1); - - if (cli_file.get_info (&fileinfo) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "get_info"), 1); - else - cout << "fileinfo : mode = " << (fileinfo.mode_ & 777) - << "\nno of links = " << fileinfo.nlink_ - << "\nsize = " << fileinfo.size_ << endl; - - off_t fpos = cli_file.position (); - - if (fpos == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "position"), 1); - else - cout << "current filepointer is at " << fpos << endl; - - if (cli_file.position (0, SEEK_SET) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "position"), 1); - - if (cli_file.recv (readback, len) != len) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "recv"), 1); - - cout << "read back :" << readback << endl; - - if (cli_file.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - return 0; -} diff --git a/examples/IPC_SAP/FILE_SAP/testfile b/examples/IPC_SAP/FILE_SAP/testfile deleted file mode 100644 index e7cbb71a0d5..00000000000 --- a/examples/IPC_SAP/FILE_SAP/testfile +++ /dev/null @@ -1 +0,0 @@ -testfile
\ No newline at end of file diff --git a/examples/IPC_SAP/Makefile b/examples/IPC_SAP/Makefile deleted file mode 100644 index 8414b8c6201..00000000000 --- a/examples/IPC_SAP/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the IPC_SAP test directory -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = DEV_SAP \ - FIFO_SAP \ - FILE_SAP \ - SOCK_SAP \ - SPIPE_SAP \ - TLI_SAP \ - UPIPE_SAP - -#---------------------------------------------------------------------------- -# macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp deleted file mode 100644 index 049bd51d1e6..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/C-inclient.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "ace/OS.h" -// $Id$ - - -/* BSD socket client */ - -int -main (int argc, char *argv[]) -{ - // Initialize WinSock DLL on Win32... - ACE_OS::socket_init (ACE_WSOCK_VERSION); - - struct sockaddr_in saddr; - struct hostent *hp; - char *host = argc > 1 ? argv[1] : ACE_DEFAULT_SERVER_HOST; - u_short port_num = - htons (argc > 2 ? atoi (argv[2]) : ACE_DEFAULT_SERVER_PORT); - char buf[BUFSIZ]; - ACE_HANDLE s_handle; - int w_bytes; - int r_bytes; - int n; - - // Create a local endpoint of communication. - if ((s_handle = ACE_OS::socket (PF_INET, SOCK_STREAM, 0)) == ACE_INVALID_HANDLE) - ACE_OS::perror ("socket"), ACE_OS::exit (1); - - // Determine IP address of the server. - if ((hp = ACE_OS::gethostbyname (host)) == 0) - ACE_OS::perror ("gethostbyname"), ACE_OS::exit (1); - - // Set up the address information to contact the server. - ACE_OS::memset ((void *) &saddr, 0, sizeof saddr); - saddr.sin_family = AF_INET; - saddr.sin_port = port_num; - ACE_OS::memcpy (&saddr.sin_addr, hp->h_addr, hp->h_length); - - // Establish connection with remote server. - if (ACE_OS::connect (s_handle, (struct sockaddr *) &saddr, - sizeof saddr) == -1) - ACE_OS::perror ("connect"), ACE_OS::exit (1); - - // Send data to server (correctly handles "incomplete writes" due to - // flow control). - - while ((r_bytes = ACE_OS::read (ACE_STDIN, buf, sizeof buf)) > 0) - for (w_bytes = 0; w_bytes < r_bytes; w_bytes += n) - if ((n = ACE_OS::send (s_handle, buf + w_bytes, - r_bytes - w_bytes)) < 0) - ACE_OS::perror ("write"), ACE_OS::exit (1); - - if (ACE_OS::recv (s_handle, buf, 1) == 1) - ACE_OS::write (ACE_STDOUT, buf, 1); - - // Explicitly close the connection. - if (ACE_OS::closesocket (s_handle) == -1) - ACE_OS::perror ("close"), ACE_OS::exit (1); - - return 0; -} diff --git a/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp deleted file mode 100644 index e2a0c0cca94..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/C-inserver.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include "ace/OS.h" -// $Id$ - - -/* BSD socket server. */ - -int main (int argc, char *argv[]) -{ - // Initialize WinSock DLL on Win32... - ACE_OS::socket_init (ACE_WSOCK_VERSION); - - u_short port_num = - htons (argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT); - struct sockaddr_in saddr; - ACE_HANDLE s_handle, n_handle; - - /* Create a local endpoint of communication */ - if ((s_handle = ACE_OS::socket (PF_INET, SOCK_STREAM, 0)) == ACE_INVALID_HANDLE) - ACE_OS::perror ("socket"), ACE_OS::exit (1); - - /* Set up the address information to become a server */ - ACE_OS::memset ((void *) &saddr, 0, sizeof saddr); - saddr.sin_family = AF_INET; - saddr.sin_port = port_num; - saddr.sin_addr.s_addr = INADDR_ANY; - - /* Associate address with endpoint */ - if (ACE_OS::bind (s_handle, (struct sockaddr *) &saddr, - sizeof saddr) == -1) - ACE_OS::perror ("bind"), ACE_OS::exit (1); - - /* Make endpoint listen for service requests */ - if (ACE_OS::listen (s_handle, 5) == -1) - ACE_OS::perror ("listen"), ACE_OS::exit (1); - - /* Performs the iterative server activities */ - - for (;;) - { - char buf[BUFSIZ]; - int r_bytes; - struct sockaddr_in cli_addr; - int cli_addr_len = sizeof cli_addr; - struct hostent *hp; - - /* Create a new endpoint of communication */ - do - n_handle = ACE_OS::accept (s_handle, (struct sockaddr *) - &cli_addr, &cli_addr_len); - while (n_handle == ACE_INVALID_HANDLE && errno == EINTR); - - if (n_handle == ACE_INVALID_HANDLE) - { - ACE_OS::perror ("accept"); - continue; - } - - int addr_len = sizeof cli_addr.sin_addr.s_addr; - hp = ACE_OS::gethostbyaddr ((char *) &cli_addr.sin_addr, - addr_len, AF_INET); - - if (hp != 0) - ACE_OS::printf ("client %s\n", hp->h_name), ACE_OS::fflush (stdout); - else - ACE_OS::perror ("gethostbyaddr"); - - /* Read data from client (terminate on error) */ - - while ((r_bytes = ACE_OS::recv (n_handle, buf, sizeof buf)) > 0) - if (ACE_OS::write (ACE_STDOUT, buf, r_bytes) != r_bytes) - ACE_OS::perror ("write"), ACE_OS::exit (1); - - if (ACE_OS::send (n_handle, "", 1) != 1) - ::perror ("write"), ACE_OS::exit (1); - - /* Close the new endpoint - (listening endpoint remains open) */ - if (ACE_OS::closesocket (n_handle) == -1) - ACE_OS::perror ("close"), ACE_OS::exit (1); - ACE_OS::exit (0); - } - /* NOTREACHED */ - return 0; -} diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp deleted file mode 100644 index de2d0b1f6cb..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp +++ /dev/null @@ -1,86 +0,0 @@ -// $Id$ - -// This tests the non-blocking features of the ACE_SOCK_Connector -// class. - -#include "ace/SOCK_Connector.h" -#include "ace/INET_Addr.h" - -// ACE SOCK_SAP client. - -int main (int argc, char *argv[]) -{ - char *host = argc > 1 ? argv[1] : ACE_DEFAULT_SERVER_HOST; - u_short r_port = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_SERVER_PORT; - ACE_Time_Value timeout (argc > 3 ? ACE_OS::atoi (argv[3]) : ACE_DEFAULT_TIMEOUT); - char buf[BUFSIZ]; - - ACE_SOCK_Stream cli_stream; - ACE_INET_Addr remote_addr (r_port, host); - - ACE_SOCK_Connector con; - - // Attempt a non-blocking connect to the server, reusing the local - // addr if necessary. -#if defined (VXWORKS) - // Initiate blocking connection with server. - ACE_DEBUG ((LM_DEBUG, "starting connect\n")); - - if (con.connect (cli_stream, remote_addr) == -1) -#else - // Initiate timed, non-blocking connection with server. - ACE_DEBUG ((LM_DEBUG, "starting non-blocking connect\n")); - - if (con.connect (cli_stream, remote_addr, (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) -#endif /* VXWORKS */ - { - if (errno != EWOULDBLOCK) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connection failed"), 1); - - ACE_DEBUG ((LM_DEBUG, "starting timed connect\n")); - -#if !defined (VXWORKS) - // Check if non-blocking connection is in progress, - // and wait up to timeout seconds for it to complete. - - if (con.complete (cli_stream, &remote_addr, &timeout) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "complete failed"), 1); - else - ACE_DEBUG ((LM_DEBUG, "connected to %s\n", remote_addr.get_host_name ())); -#endif /* !VXWORKS */ - } - -#if !defined (VXWORKS) - if (cli_stream.disable (ACE_NONBLOCK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "disable"), 1); -#endif /* !VXWORKS */ - - // Send data to server (correctly handles "incomplete writes"). - - for (ssize_t r_bytes; - (r_bytes = ACE_OS::read (ACE_STDIN, buf, sizeof buf)) > 0; ) - if (ACE_OS::strcmp (buf, "quit\n") == 0) - break; - else if (cli_stream.send (buf, r_bytes, 0, &timeout) == -1) - { - if (errno == ETIME) - ACE_DEBUG ((LM_DEBUG, "%p\n", "send_n")); - else - // Breakout if we didn't fail due to a timeout. - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send_n"), -1); - } - - // Explicitly close the writer-side of the connection. - if (cli_stream.close_writer () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close_writer"), 1); - - // Wait for handshake with server. - if (cli_stream.recv_n (buf, 1) != 1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "recv_n"), 1); - - // Close the connection completely. - if (cli_stream.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - return 0; -} diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-poll.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver-poll.cpp deleted file mode 100644 index 9ba1fa02ad4..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver-poll.cpp +++ /dev/null @@ -1,101 +0,0 @@ -// IPC_SAP/poll server, which illustrates how to integrate the ACE -// $Id$ - -// socket wrappers with the SVR4 poll() system call to create a -// single-threaded concurrent server. - -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/INET_Addr.h" - -#if defined (ACE_HAS_SVR4_POLL) - -// Maximum per-process open I/O descriptors. -const int MAX_FDS = 200; - -int -main (void) -{ - // Create a server end-point. - ACE_INET_Addr addr (ACE_DEFAULT_SERVER_PORT); - ACE_SOCK_Acceptor peer_acceptor (addr); - ACE_SOCK_Stream new_stream; - ACE_HANDLE s_handle = peer_acceptor.get_handle (); - struct pollfd poll_array[MAX_FDS]; - - for (int i = 0; i < MAX_FDS; i++) - { - poll_array[i].fd = ACE::INVALID_HANDLE; - poll_array[i].events = POLLIN; - } - - poll_array[0].fd = s_handle; - - for (int n_handles = 1;;) - { - // Wait for client I/O events (handle interrupts). - while (ACE_OS::poll (poll_array, n_handles) == -1 - && errno == EINTR) - continue; - - // Handle pending logging messages first (s_handle + 1 is - // guaranteed to be lowest client descriptor). - - for (i = 1; i < n_handles; i++) - { - if (poll_array[i].revents & POLLIN) - { - char buf[BUFSIZ]; - int n; - // recv will not block in this case! - if ((n = ACE_OS::recv (poll_array[i].fd, buf, sizeof buf, 0)) == -1) - ACE_OS::perror ("read failed"); - else if (n == 0) - { - // Handle client connection shutdown. - if (ACE_OS::close (poll_array[i].fd) == -1) - ACE_OS::perror ("close"); - poll_array[i].fd = poll_array[--n_handles].fd; - - // Send handshake back to client to unblock it. - if (ACE_OS::send (poll_array[i].fd, "", 1) != 1) - ACE_ERROR ((LM_ERROR, "%p\n", "send_n")); - } - else - ACE_OS::printf ("%*s", n, buf), fflush (stdout); - } - ACE_OS::fflush (stdout); - } - if (poll_array[0].revents & POLLIN) - { - ACE_INET_Addr client; - ACE_Time_Value nonblock (0, 0); - - // Handle all pending connection requests (note use of - // "polling" feature that doesn't block). - - while (ACE_OS::poll (poll_array, 1, nonblock) > 0) - if (peer_acceptor.accept (new_stream, &client) == -1) - ACE_OS::perror ("accept"); - else - { - const char *s = client.get_host_name (); - - ACE_ASSERT (s != 0); - ACE_OS::printf ("client %s\n", s); - ACE_OS::fflush (stdout); - poll_array[n_handles++].fd = new_stream.get_handle (); - } - } - } - /* NOTREACHED */ - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_SVR4_POLL */ diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp deleted file mode 100644 index 1814c409497..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inserver.cpp +++ /dev/null @@ -1,150 +0,0 @@ -// This example tests the non-blocking features of the -// ACE_SOCK_Acceptor and ACE_SOCK_Stream classes. -// $Id$ - - -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/INET_Addr.h" -#include "ace/Handle_Set.h" - -// ACE SOCK_SAP server. - -int -main (int argc, char *argv[]) -{ - u_short port = argc > 1 - ? ACE_OS::atoi (argv[1]) - : ACE_DEFAULT_SERVER_PORT; - ACE_Time_Value timeout (argc > 2 - ? ACE_OS::atoi (argv[2]) - : ACE_DEFAULT_TIMEOUT); - int sleep_time = argc > 3 ? ACE_OS::atoi (argv[3]) : 0; - - ACE_SOCK_Acceptor peer_acceptor; - - // Create a server address. - ACE_INET_Addr server_addr (port); - - // Create a server, reuse the address. - if (peer_acceptor.open (server_addr, 1) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1); -#if !defined(VXWORKS) - // Set the peer acceptor into non-blocking mode. - else if (peer_acceptor.enable (ACE_NONBLOCK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "enable"), 1); -#endif /* !VXWORKS */ - else if (peer_acceptor.get_local_addr (server_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "get_local_addr"), 1); - - ACE_DEBUG ((LM_DEBUG, "starting server at port %d\n", - server_addr.get_port_number ())); - - // Keep these objects out here to prevent excessive constructor - // calls within the loop. - ACE_SOCK_Stream new_stream; - ACE_INET_Addr cli_addr; - ACE_Handle_Set handle_set; - - // Performs the iterative server activities. - - for (;;) - { - char buf[BUFSIZ]; - - handle_set.reset (); - handle_set.set_bit (peer_acceptor.get_handle ()); - - int result = ACE_OS::select (int (peer_acceptor.get_handle ()) + 1, - handle_set, - 0, 0, &timeout); - if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "select"), -1); - else if (result == 0) - ACE_DEBUG ((LM_DEBUG, "select timed out\n")); - else - { - // Create a new ACE_SOCK_Stream endpoint (note automatic restart - // if errno == EINTR). - - while ((result = peer_acceptor.accept (new_stream, &cli_addr)) != -1) - { - ACE_DEBUG ((LM_DEBUG, "client %s connected from %d\n", - cli_addr.get_host_name (), cli_addr.get_port_number ())); - -#if !defined(VXWORKS) - // Enable non-blocking I/O. - if (new_stream.enable (ACE_NONBLOCK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "enable"), -1); -#endif /* !VXWORKS */ - - handle_set.reset (); - handle_set.set_bit (new_stream.get_handle ()); - - // Read data from client (terminate on error). - - for (ssize_t r_bytes;;) - { - // Wait to read until there's something from the client. - if (ACE_OS::select (int (new_stream.get_handle ()) + 1, - handle_set, - 0, 0, timeout) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "select"), -1); - - // Keep reading until the client shuts down. - for (;;) - { - // Sleep for some amount of time in order to - // test client flow control. - ACE_OS::sleep (sleep_time); - - r_bytes = new_stream.recv (buf, sizeof buf, 0, &timeout); - - if (r_bytes <= 0) - { - if (errno == ETIME) - ACE_ERROR ((LM_ERROR, "%p\n", "ACE::recv")); - break; - } - else if (ACE::write_n (ACE_STDOUT, buf, r_bytes) != r_bytes) - ACE_ERROR ((LM_ERROR, "%p\n", "ACE::send_n")); - } - - if (r_bytes == 0) - { - ACE_DEBUG ((LM_DEBUG, - "reached end of input, connection closed by client\n")); - - // Send handshake back to client to unblock it. - if (new_stream.send_n ("", 1) != 1) - ACE_ERROR ((LM_ERROR, "%p\n", "send_n")); - break; - } - else if (r_bytes == -1) - { - if (errno == EWOULDBLOCK || errno == ETIME) - ACE_DEBUG ((LM_DEBUG, - "no input available, going back to reading\n")); - else - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "recv"), -1); - } - } - - // Close new endpoint (listening endpoint stays open). - if (new_stream.close () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "close")); - } - - if (result == -1) - { - if (errno == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, - "no connections available, going back to accepting\n")); - else - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE::write"), -1); - } - } - } - /* NOTREACHED */ - return 0; -} diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-unclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-unclient.cpp deleted file mode 100644 index 41a1c5db682..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/CPP-unclient.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* ACE_LSOCK Client */ -// $Id$ - - - -#include "ace/LSOCK_Connector.h" -#include "ace/UNIX_Addr.h" - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -int -main (int argc, char *argv[]) -{ - char *rendezvous = argc > 1 ? argv[1] : ACE_DEFAULT_RENDEZVOUS; - char buf[BUFSIZ]; - - ACE_LSOCK_Stream cli_stream; - ACE_LSOCK_Connector con; - - /* Establish the connection with server */ - if (con.connect (cli_stream, ACE_UNIX_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), 1); - - /* Send data to server (correctly handles "incomplete writes") */ - - for (int r_bytes; (r_bytes = ACE_OS::read (ACE_STDIN, buf, sizeof buf)) > 0; ) - if (cli_stream.send_n (buf, r_bytes) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send_n"), 1); - - /* Explicitly close the writer-side of the connection. */ - if (cli_stream.close_writer () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close_writer"), 1); - - /* Wait for handshake with server. */ - if (cli_stream.recv_n (buf, 1) != 1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "recv_n"), 1); - - /* Close the connection completely. */ - if (cli_stream.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "this platform does not support UNIX-domain sockets\n"), -1); -} -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp deleted file mode 100644 index 6c877955b17..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/CPP-unserver.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// ACE_LSOCK Server. -// $Id$ - -#include "ace/LSOCK_Acceptor.h" -#include "ace/LSOCK_Stream.h" -#include "ace/UNIX_Addr.h" - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -int -main (int argc, char *argv[]) -{ - char *rendezvous = argc > 1 ? argv[1] : ACE_DEFAULT_RENDEZVOUS; - - // Create a server address. - ACE_UNIX_Addr server_addr (rendezvous); - - ACE_LSOCK_Acceptor peer_acceptor; - - ACE_OS::unlink (rendezvous); - - // Create a server. - - if (peer_acceptor.open (server_addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1); - - // Keep these guys out here to prevent excessive constructor - // calls... - ACE_LSOCK_Stream new_stream; - ACE_UNIX_Addr cli_addr; - - ACE_DEBUG ((LM_DEBUG, "starting server %s\n", - server_addr.get_path_name ())); - - // Performs the iterative server activities. - - for (;;) - { - char buf[BUFSIZ]; - ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT); - - // Create a new ACE_SOCK_Stream endpoint (note automatic restart - // if errno == EINTR). - - if (peer_acceptor.accept (new_stream, &cli_addr, &timeout) == -1) - { - ACE_ERROR ((LM_ERROR, "%p\n", "accept")); - continue; - } - - ACE_DEBUG ((LM_DEBUG, "client %s\n", - cli_addr.get_path_name ())); - - // Read data from client (terminate on error). - - for (int r_bytes; - (r_bytes = new_stream.recv (buf, sizeof buf)) > 0; ) - if (ACE_OS::write (ACE_STDOUT, buf, r_bytes) != r_bytes) - ACE_ERROR ((LM_ERROR, "%p\n", "ACE::send_n")); - - if (new_stream.send_n ("", 1) != 1) - ACE_ERROR ((LM_ERROR, "%p\n", "send_n")); - - // Close new endpoint (listening endpoint stays open). - if (new_stream.close () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "close")); - } - - /* NOTREACHED */ - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "this platform does not support UNIX-domain sockets\n"), -1); -} -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp b/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp deleted file mode 100644 index 11f6c3bc3c7..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// $Id$ - -#include "ace/LSOCK_Connector.h" -#include "ace/UNIX_Addr.h" - -#if defined (ACE_HAS_MSG) && !defined (ACE_HAS_UNIX_DOMAIN_SOCKETS) -// ACE_LSOCK Client. - -int -main (int argc, char *argv[]) -{ - const char *file_name = argc > 1 ? argv[1] : "./local_data"; - const char *rendezvous = argc > 2 ? argv[2] : ACE_DEFAULT_RENDEZVOUS; - - ACE_LSOCK_Stream cli_stream; - ACE_UNIX_Addr addr (rendezvous); - - // Establish the connection with server. - ACE_LSOCK_Connector connector; - - if (connector.connect (cli_stream, addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "connect"), -1); - - ACE_HANDLE handle = ACE_OS::open (file_name, O_RDONLY); - - if (handle == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "open"), -1); - - // Send handle to server (correctly handles incomplete writes). - if (cli_stream.send_handle (handle) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "send"), -1); - - char buf[BUFSIZ]; - ssize_t n = cli_stream.recv (buf, sizeof buf); - - if (n == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "recv"), -1); - else if (n == 0) - ACE_DEBUG ((LM_DEBUG, "server shutdown (bug in kernel?)\n")); - else - ACE_DEBUG ((LM_DEBUG, "server %*s shutdown\n", n, buf)); - - // Explicitly close the connection. - if (cli_stream.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "close"), -1); - - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), -1); -} -#endif /* ACE_HAS_MSG */ diff --git a/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp b/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp deleted file mode 100644 index ee265f2af3e..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/FD-unserver.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// $Id$ - -#include "ace/LSOCK_Acceptor.h" -#include "ace/LSOCK_Stream.h" -#include "ace/UNIX_Addr.h" - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -// ACE_LSOCK Server - -void -handle_client (ACE_LSOCK_Stream &stream) -{ - char buf[BUFSIZ]; - ACE_HANDLE handle; - - // Retrieve the socket descriptor passed from the client. - - if (stream.recv_handle (handle) == -1) - ACE_ERROR ((LM_ERROR, "%p", "recv_handle")); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) ----------------------------------------\n")); - - // Read data from client (correctly handles incomplete reads due to - // flow control). - - for (ssize_t n; - (n = ACE_OS::read (handle, buf, sizeof buf)) > 0; - ) - ACE_DEBUG ((LM_DEBUG, "%*s", n, buf)); - - ::sprintf (buf, "%ld", ACE_OS::getpid ()); - - ACE_DEBUG ((LM_DEBUG, "(%s, %d) ----------------------------------------\n", buf, ACE_OS::strlen (buf))); - - // Tell the client to shut down. - if (stream.send_n (buf, ACE_OS::strlen (buf)) == -1) - ACE_ERROR ((LM_ERROR, "%p", "send")); - - // Close new endpoint (listening endpoint stays open). - if (stream.close () == -1) - ACE_ERROR ((LM_ERROR, "%p", "close")); -} - -int -main (int argc, char *argv[]) -{ - char *rendezvous = argc > 1 ? argv[1] : ACE_DEFAULT_RENDEZVOUS; - // Create a server. - ACE_OS::unlink (rendezvous); - ACE_UNIX_Addr addr (rendezvous); - ACE_LSOCK_Acceptor peer_acceptor (addr); - ACE_LSOCK_Stream stream; - - // Performs the concurrent server activities. - - for (;;) - { - // Create a new ACE_SOCK_Stream endpoint. - if (peer_acceptor.accept (stream) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "accept"), -1); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) accepted new connection\n")); - -#if defined (VXWORKS) - handle_client (stream); -#else - switch (ACE_OS::fork (argv[0])) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "fork"), -1); - /* NOTREACHED */ - case 0: - ACE_LOG_MSG->sync (argv[0]); - handle_client (stream); - ACE_OS::exit (0); - /* NOTREACHED */ - default: - stream.close (); - } -#endif /* VXWORKS */ - } - /* NOTREACHED */ - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform doesn't not support UNIX domain sockets\n"), -1); -} -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/examples/IPC_SAP/SOCK_SAP/Makefile b/examples/IPC_SAP/SOCK_SAP/Makefile deleted file mode 100644 index 8099dd1f074..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/Makefile +++ /dev/null @@ -1,265 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for IPC_SAP test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = README - -BIN = CPP-inclient \ - CPP-unclient \ - CPP-inserver \ - CPP-inserver-poll \ - CPP-unserver \ - FD-unclient \ - FD-unserver \ - C-inclient \ - C-inserver - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/CPP-inclient.o .shobj/CPP-inclient.so: CPP-inclient.cpp \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i -.obj/CPP-unclient.o .shobj/CPP-unclient.so: CPP-unclient.cpp \ - $(WRAPPER_ROOT)/ace/LSOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Connector.i -.obj/CPP-inserver.o .shobj/CPP-inserver.so: CPP-inserver.cpp \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h -.obj/CPP-inserver-poll.o .shobj/CPP-inserver-poll.so: CPP-inserver-poll.cpp \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h -.obj/CPP-unserver.o .shobj/CPP-unserver.so: CPP-unserver.cpp \ - $(WRAPPER_ROOT)/ace/LSOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.i -.obj/FD-unclient.o .shobj/FD-unclient.so: FD-unclient.cpp \ - $(WRAPPER_ROOT)/ace/LSOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Connector.i -.obj/FD-unserver.o .shobj/FD-unserver.so: FD-unserver.cpp \ - $(WRAPPER_ROOT)/ace/LSOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.i -.obj/C-inclient.o .shobj/C-inclient.so: C-inclient.cpp \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i -.obj/C-inserver.o .shobj/C-inserver.so: C-inserver.cpp \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/SOCK_SAP/README b/examples/IPC_SAP/SOCK_SAP/README deleted file mode 100644 index ea3fd26d8a8..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/README +++ /dev/null @@ -1,38 +0,0 @@ -This directory contains groups of client and server test programs that -exercise the various C++ wrappers for sockets. In general, the test -programs do more or less the same thing -- the client establishes a -connection with the server and then transfers data to the server, -which keeps printing the data until EOF is reached (e.g., user types -^D). - -Unless noted differently, the server is implemented as an "iterative -server," i.e., it only deals with one client at a time. The following -describes each set of tests in more detail: - - . C-inclient.cpp/C-inserver.cpp -- This is basically a C code - implementation that opens a connection to the server and - sends all the data from the stdin using Internet domain - sockets (i.e., TCP). - - . CPP-inclient.cpp/CPP-server.cpp -- This test is basically - a C++ wrapper version of the preceeding "C" test using - Internet domain sockets (i.e., TCP). - - . CPP-unclient.cpp/CPP-unserver.cpp -- This test is basically - a C++ wrapper version of the preceeding "C++" test using - UNIX domain sockets. - - . FD-unclient.cpp/FD-inclient.cpp -- This test illustrates - how to pass file descriptors between a client and a - concurrent server process on the same machine using the ACE - C++ wrappers for UNIX domain sockets. - - . CPP-inserver-poll.cpp -- This test illustrates how to - write single-threaded concurrent servers using UNIX SVR4 - poll(). You can run this test using the CPP-inclient.cpp - program as the client. - -For examples of the ACE SOCK_{Dgram,CODgram} and -SOCK_Dgram_{Mcast,Bcast} wrappers, please take a look in the -./examples/Reactor/{Dgram,Multicast,Ntalker} directories. - diff --git a/examples/IPC_SAP/SOCK_SAP/local_data b/examples/IPC_SAP/SOCK_SAP/local_data deleted file mode 100644 index c0119859a28..00000000000 --- a/examples/IPC_SAP/SOCK_SAP/local_data +++ /dev/null @@ -1 +0,0 @@ -I am Iron man! diff --git a/examples/IPC_SAP/SPIPE_SAP/Makefile b/examples/IPC_SAP/SPIPE_SAP/Makefile deleted file mode 100644 index c1ecc9c9ce1..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/Makefile +++ /dev/null @@ -1,218 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the simple STREAM pipe client/server test file -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = client \ - server \ - consumer_msg \ - consumer_read \ - producer_msg \ - producer_read \ - NPClient \ - NPServer - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/client.o .shobj/client.so: client.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.i \ - shared.h -.obj/server.o .shobj/server.so: server.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - shared.h -.obj/consumer_msg.o .shobj/consumer_msg.so: consumer_msg.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - shared.h -.obj/consumer_read.o .shobj/consumer_read.so: consumer_read.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - shared.h -.obj/producer_msg.o .shobj/producer_msg.so: producer_msg.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.i \ - shared.h -.obj/producer_read.o .shobj/producer_read.so: producer_read.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.i \ - shared.h -.obj/NPClient.o .shobj/NPClient.so: NPClient.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.i -.obj/NPServer.o .shobj/NPServer.so: NPServer.cpp \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp b/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp deleted file mode 100644 index a4594064882..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp +++ /dev/null @@ -1,46 +0,0 @@ - -// $Id$ - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Connector.h" - -#if defined (ACE_WIN32) -#define MAKE_PIPE_NAME(X) \\\\.\\pipe\\#X -#else -#define MAKE_PIPE_NAME(X) X -#endif - -const int DEFAULT_SIZE = 8; -const int DEFAULT_COUNT = 10000; - -int -main (int argc, char *argv[]) -{ - int size = argc > 1 ? atoi (argv[1]) : DEFAULT_SIZE; - int iterations = argc > 2 ? atoi (argv[2]) : DEFAULT_COUNT; - char *buf = new char[size]; - - //char *pipe_name = ACE_DEFAULT_RENDEZVOUS; - char *pipe_name = "acepipe"; - char *rendezvous; - rendezvous = MAKE_PIPE_NAME (pipe_name); - - ACE_SPIPE_Stream cli_stream; - ACE_SPIPE_Connector con; - int i; - - if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", rendezvous), -1); - - ACE_OS::strcpy (buf, "hello"); - size = ACE_OS::strlen (buf) + 1; - - for (i = 0; i < iterations; i++) - if (cli_stream.send (buf, size) != size) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "putmsg"), -1); - - if (cli_stream.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} diff --git a/examples/IPC_SAP/SPIPE_SAP/NPServer.cpp b/examples/IPC_SAP/SPIPE_SAP/NPServer.cpp deleted file mode 100644 index 633e0b8afab..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/NPServer.cpp +++ /dev/null @@ -1,52 +0,0 @@ -// $Id$ - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Acceptor.h" - -#if defined (ACE_WIN32) -#define MAKE_PIPE_NAME(X) \\\\.\\pipe\\#X -#else -#define MAKE_PIPE_NAME(X) X -#endif - -int -main (int /* argc */, char * /* argv */ []) -{ - ACE_SPIPE_Acceptor acceptor; - ACE_SPIPE_Stream new_stream; - char buf[BUFSIZ]; - int n; - // char *pipe_name = ACE_DEFAULT_RENDEZVOUS; - char *pipe_name = "acepipe"; - - char *rendezvous; - rendezvous = MAKE_PIPE_NAME (pipe_name); - - /* Initialize named pipe listener */ - - if (acceptor.open (ACE_SPIPE_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1); - - for (;;) - { - ACE_DEBUG ((LM_DEBUG, "waiting for connection\n")); - - /* Accept a client connection */ - if (acceptor.accept (new_stream, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "accept"), 1); - - ACE_DEBUG ((LM_DEBUG, "Accepted connection\n")); - - while ((n = new_stream.recv (buf, sizeof buf)) > 0) - { - cerr << buf << endl; - ACE_OS::write (ACE_STDOUT, buf, n); - } - if (n == -1) - { - ACE_DEBUG ((LM_DEBUG, "End of connection. Closing handle\n")); - new_stream.close (); - } - } - return 0; -} diff --git a/examples/IPC_SAP/SPIPE_SAP/client.cpp b/examples/IPC_SAP/SPIPE_SAP/client.cpp deleted file mode 100644 index 80c5476fbba..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/client.cpp +++ /dev/null @@ -1,42 +0,0 @@ - -// $Id$ - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Connector.h" -#include "shared.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -int -main (int argc, char *argv[]) -{ - if (argc < 2) - ACE_ERROR_RETURN ((LM_ERROR, "usage: %s string [rendezvous]\n", argv[0]), 1); - - if (argc > 2) - rendezvous = argv[2]; - - ACE_SPIPE_Stream cli_stream; - ACE_SPIPE_Connector con; - - if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", rendezvous), 1); - - ssize_t len = ACE_OS::strlen (argv[1]) + 1; - - if (cli_stream.send (argv[1], len) != len) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 1); - - if (cli_stream.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp b/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp deleted file mode 100644 index eadf5746350..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// $Id$ - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Acceptor.h" -#include "shared.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -int -main (int argc, char *argv[]) -{ - ACE_SPIPE_Acceptor peer_acceptor; - ACE_SPIPE_Stream new_stream; - char buf[BUFSIZ]; - ACE_Str_Buf buffer (buf, 0, sizeof buf); - int flags = 0; - - if (argc > 1) - rendezvous = argv[1]; - - ACE_OS::unlink (rendezvous); - ACE_OS::fdetach (rendezvous); - - ACE_SPIPE_Addr addr (rendezvous); - ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT); - - if (peer_acceptor.open (addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1); - - ACE_DEBUG ((LM_DEBUG, "waiting for connection\n")); - - if (peer_acceptor.accept (new_stream, 0, &timeout) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "accept"), 1); - - ACE_DEBUG ((LM_DEBUG, "accepted\n")); - - while (new_stream.recv ((ACE_Str_Buf *) 0, &buffer, &flags) >= 0) - if (buffer.len == 0) - break; - else - ACE_OS::write (ACE_STDOUT, buffer.buf, buffer.len); - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp b/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp deleted file mode 100644 index 5cf5427e4b6..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp +++ /dev/null @@ -1,48 +0,0 @@ -// $Id$ - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Acceptor.h" -#include "shared.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -int -main (int argc, char *argv[]) -{ - ACE_SPIPE_Acceptor peer_acceptor; - ACE_SPIPE_Stream new_stream; - char buf[BUFSIZ]; - int n; - - // Wait up to ACE_DEFAULT_TIMEOUT seconds to accept connection. - ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT); - - if (argc > 1) - rendezvous = argv[1]; - - ACE_OS::unlink (rendezvous); - ACE_OS::fdetach (rendezvous); - - if (peer_acceptor.open (ACE_SPIPE_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1); - - ACE_DEBUG ((LM_DEBUG, "waiting for connection\n")); - - if (peer_acceptor.accept (new_stream, 0, &timeout) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "accept"), 1); - - ACE_DEBUG ((LM_DEBUG, "accepted\n")); - - while ((n = new_stream.recv (buf, sizeof buf)) > 0) - ACE_OS::write (ACE_STDOUT, buf, n); - - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp b/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp deleted file mode 100644 index e2f2940e75f..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp +++ /dev/null @@ -1,52 +0,0 @@ - -// $Id$ - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Connector.h" -#include "shared.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -const int DEFAULT_SIZE = 4 * 1024; -const int DEFAULT_COUNT = 100; - -int -main (int argc, char *argv[]) -{ - int size = argc > 1 ? atoi (argv[1]) : DEFAULT_SIZE; - int iterations = argc > 2 ? atoi (argv[2]) : DEFAULT_COUNT; - char *buf = new char[size]; - - if (argc > 3) - rendezvous = argv[3]; - - ACE_SPIPE_Stream cli_stream; - ACE_SPIPE_Connector con; - int i; - - if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", rendezvous), 1); - - for (i = 0; i < size; i++) - buf[i] = 'a'; - - ACE_Str_Buf buffer (buf, size); - - for (i = 0; i < iterations; i++) - if (cli_stream.send ((ACE_Str_Buf *) 0, &buffer) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 1); - - if (cli_stream.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1); - - delete buf; - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp b/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp deleted file mode 100644 index 033dacb04ab..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp +++ /dev/null @@ -1,49 +0,0 @@ - -// $Id$ - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Connector.h" -#include "shared.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -const int DEFAULT_SIZE = 8 * 1024; -const int DEFAULT_COUNT = 100; - -int -main (int argc, char *argv[]) -{ - int size = argc > 1 ? atoi (argv[1]) : DEFAULT_SIZE; - int iterations = argc > 2 ? atoi (argv[2]) : DEFAULT_COUNT; - char *buf = new char[size]; - - if (argc > 3) - rendezvous = argv[3]; - - ACE_SPIPE_Stream cli_stream; - ACE_SPIPE_Connector con; - int i; - - if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", rendezvous), -1); - - for (i = 0; i < size; i++) - buf[i] = 'a'; - - for (i = 0; i < iterations; i++) - if (cli_stream.send (buf, size) != size) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "putmsg"), -1); - - if (cli_stream.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "this feature is not supported"), -1); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/IPC_SAP/SPIPE_SAP/server.cpp b/examples/IPC_SAP/SPIPE_SAP/server.cpp deleted file mode 100644 index d1d86f5ca74..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/server.cpp +++ /dev/null @@ -1,118 +0,0 @@ -#include "ace/SPIPE_Addr.h" -// $Id$ - -#include "ace/SPIPE_Acceptor.h" -#include "shared.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -// Maximum per-process open I/O descriptors. -const int MAX_HANDLES = 200; -const int PERMS = 0666; - -int -main (int argc, char *argv[]) -{ - ACE_SPIPE_Acceptor peer_acceptor; - ACE_SPIPE_Stream new_stream; - struct pollfd poll_array[MAX_HANDLES]; - - for (handle = 0; handle < MAX_HANDLES; handle++) - { - poll_array[handle].fd = -1; - poll_array[handle].events = POLLIN; - } - - if (argc > 1) - rendezvous = argv[1]; - - ACE_OS::fdetach (rendezvous); - ACE_SPIPE_Addr addr (rendezvous); - - ACE_HANDLE s_handle = peer_acceptor.open (addr); - - if (s_handle == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "peer_acceptor.open"), -1); - - ACE_HANDLE handle; - - poll_array[0].fd = s_handle; - - for (int width = 1;;) - { - // Block waiting for client I/O events (handle interrupts). - while (ACE_OS::poll (poll_array, width) == -1 && errno == EINTR) - continue; - - // Handle pending logging messages first (s_handle + 1 is - // guaranteed to be lowest client descriptor). - - for (handle = s_handle + 1; handle < width; handle++) - if (ACE_BIT_ENABLED (poll_array[handle].revents, POLLIN) - || ACE_BIT_ENABLED (poll_array[handle].revents, POLLHUP)) - { - char buf[BUFSIZ]; - ssize_t n = ACE_OS::read (handle, buf, sizeof buf); - - // recv will not block in this case! - if (n == -1) - ACE_DEBUG ((LM_DEBUG, "%p\n", "read failed")); - else if (n == 0) - { - // Handle client connection shutdown. - if (ACE_OS::close (poll_array[handle].fd) == -1) - ACE_DEBUG ((LM_DEBUG, "%p\n", "close")); - poll_array[handle].fd = -1; - - if (handle + 1 == width) - { - while (poll_array[handle].fd == -1) - handle--; - width = handle + 1; - } - } - else - ACE_DEBUG ((LM_DEBUG, "%*s\n", n, buf)); - } - - if (ACE_BIT_ENABLED (poll_array[0].revents, POLLIN)) - { - if (peer_acceptor.accept (new_stream) == -1) - ACE_DEBUG ((LM_DEBUG, "%p\n", "accept failed")); - - ACE_SPIPE_Addr client; - ACE_HANDLE n_handle = new_stream.get_handle (); - - if (new_stream.get_remote_addr (client) == -1) - ACE_DEBUG ((LM_DEBUG, "%p\n", - "get_remote_addr failed")); - - ACE_DEBUG ((LM_DEBUG, - "n_handle = %d, uid = %d, gid = %d\n", - n_handle, - client.user_id (), - client.group_id ())); - - int arg = RMSGN | RPROTDAT; - - if (ACE_OS::ioctl (n_handle, - I_SRDOPT, (void *) arg) == -1) - ACE_DEBUG ((LM_DEBUG, "%p\n", "ioctl failed")); - - poll_array[n_handle].fd = n_handle; - - if (n_handle >= width) - width = n_handle + 1; - } - } - - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/IPC_SAP/SPIPE_SAP/shared.h b/examples/IPC_SAP/SPIPE_SAP/shared.h deleted file mode 100644 index 3f7d7647023..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/shared.h +++ /dev/null @@ -1,6 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/OS.h" - -static const char *rendezvous = ACE_DEFAULT_RENDEZVOUS; diff --git a/examples/IPC_SAP/TLI_SAP/CPP-client.cpp b/examples/IPC_SAP/TLI_SAP/CPP-client.cpp deleted file mode 100644 index 14e3a63d4ba..00000000000 --- a/examples/IPC_SAP/TLI_SAP/CPP-client.cpp +++ /dev/null @@ -1,66 +0,0 @@ -// $Id$ - -#include "ace/TLI_Connector.h" -#include "ace/INET_Addr.h" - -#if defined (ACE_HAS_TLI) - -/* ACE_TLI Client */ - -int main (int argc, char *argv[]) -{ - char *host = argc > 1 ? argv[1] : ACE_DEFAULT_SERVER_HOST; - u_short r_port = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_SERVER_PORT; - int timeout = argc > 3 ? ACE_OS::atoi (argv[3]) : ACE_DEFAULT_TIMEOUT; - u_short l_port = argc > 4 ? ACE_OS::atoi (argv[4]) : ACE_DEFAULT_LOCAL_PORT; - char buf[BUFSIZ]; - - ACE_TLI_Stream cli_stream; - ACE_INET_Addr remote_addr (r_port, host); - ACE_INET_Addr local_addr (l_port); - - ACE_DEBUG ((LM_DEBUG, "starting non-blocking connect\n")); - - // Initiate timed, non-blocking connection with server. - ACE_TLI_Connector con; - - if (con.connect (cli_stream, remote_addr, - (ACE_Time_Value *) &ACE_Time_Value::zero, - local_addr, 1) == -1) - { - if (errno != EWOULDBLOCK) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connection failed"), 1); - - ACE_DEBUG ((LM_DEBUG, "starting timed connect\n")); - - // Check if non-blocking connection is in progress, - // and wait up to timeout seconds for it to complete. - ACE_Time_Value tv (timeout); - - if (con.complete (cli_stream, &remote_addr, &tv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connection failed"), 1); - else - ACE_DEBUG ((LM_DEBUG, "connected to %s\n", - remote_addr.get_host_name ())); - } - - // Send data to server (correctly handles "incomplete writes"). - - for (int r_bytes; - (r_bytes = ACE_OS::read (ACE_STDIN, buf, sizeof buf)) > 0; ) - if (cli_stream.send_n (buf, r_bytes) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send_n"), 1); - - /* Explicitly close the connection */ - if (cli_stream.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "your platform must support ACE_TLI\n"), 1); -} -#endif /* ACE_HAS_TLI */ diff --git a/examples/IPC_SAP/TLI_SAP/CPP-server.cpp b/examples/IPC_SAP/TLI_SAP/CPP-server.cpp deleted file mode 100644 index a47023b3609..00000000000 --- a/examples/IPC_SAP/TLI_SAP/CPP-server.cpp +++ /dev/null @@ -1,68 +0,0 @@ - -// $Id$ - -#include "ace/TLI_Acceptor.h" -#include "ace/INET_Addr.h" - -#if defined (ACE_HAS_TLI) -/* ACE_TLI Server */ - -int -main (int argc, char *argv[]) -{ - u_short port = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT; - ACE_Time_Value timeout (argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_TIMEOUT); - - /* Create a server address. */ - ACE_INET_Addr addr (port); - - /* Create a server, reuse the addr. */ - ACE_TLI_Acceptor peer_acceptor; - - if (peer_acceptor.open (addr, 1) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - ACE_TLI_Stream new_stream; - - ACE_DEBUG ((LM_DEBUG, "starting server at port %d\n", - addr.get_port_number ())); - - /* Performs the iterative server activities */ - - for (;;) - { - char buf[BUFSIZ]; - - /* Create a new ACE_TLI_Stream endpoint (note automatic restart - if errno == EINTR) */ - if (peer_acceptor.accept (new_stream, - &addr, &timeout) == -1) - { - ACE_ERROR ((LM_ERROR, "%p\n", "accept")); - continue; - } - - ACE_DEBUG ((LM_DEBUG, "client %s connected from %d\n", - addr.get_host_name (), addr.get_port_number ())); - - // Read data from client (terminate on error). - - for (int r_bytes; - (r_bytes = new_stream.recv (buf, sizeof buf)) > 0; ) - if (ACE_OS::write (ACE_STDOUT, buf, r_bytes) != r_bytes) - ACE_ERROR ((LM_ERROR, "%p\n", "ACE::send_n")); - - // Close new endpoint (listening endpoint stays open). - if (new_stream.close () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "close")); - - } - /* NOTREACHED */ - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform must support ACE_TLI\n"), 1); -} -#endif /* ACE_HAS_TLI */ diff --git a/examples/IPC_SAP/TLI_SAP/Makefile b/examples/IPC_SAP/TLI_SAP/Makefile deleted file mode 100644 index 7aa36d77035..00000000000 --- a/examples/IPC_SAP/TLI_SAP/Makefile +++ /dev/null @@ -1,198 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for TLI_SAP test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = ftp-client \ - ftp-server \ - db-client \ - db-server \ - CPP-client \ - CPP-server - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS= - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -INSTALL = - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/ftp-client.o .shobj/ftp-client.so: ftp-client.cpp \ - $(WRAPPER_ROOT)/ace/TLI_Connector.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Connector.i -.obj/ftp-server.o .shobj/ftp-server.so: ftp-server.cpp \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.i -.obj/db-client.o .shobj/db-client.so: db-client.cpp \ - $(WRAPPER_ROOT)/ace/TLI_Connector.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Connector.i -.obj/db-server.o .shobj/db-server.so: db-server.cpp \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.i \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h -.obj/CPP-client.o .shobj/CPP-client.so: CPP-client.cpp \ - $(WRAPPER_ROOT)/ace/TLI_Connector.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Connector.i -.obj/CPP-server.o .shobj/CPP-server.so: CPP-server.cpp \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/TLI_SAP/db-client.cpp b/examples/IPC_SAP/TLI_SAP/db-client.cpp deleted file mode 100644 index 4e37630b43d..00000000000 --- a/examples/IPC_SAP/TLI_SAP/db-client.cpp +++ /dev/null @@ -1,52 +0,0 @@ - -// $Id$ - -#include "ace/TLI_Connector.h" - -#if defined (ACE_HAS_TLI) -const int MAXLINE = 255; - -int -main (int argc, char *argv[]) -{ - if (argc < 2) - ACE_ERROR_RETURN ((LM_ERROR, "Usage: %s employee_id [server-host port-number]\n", - argv[0]), -1); - - const char *emp_num = argv[1]; - const char *host_name = argc < 3 ? ACE_DEFAULT_SERVER_HOST : argv[2]; - unsigned short port = argc < 4 ? ACE_DEFAULT_SERVER_PORT : ACE_OS::atoi (argv[3]); - int n; - char buf[MAXLINE]; - - ACE_TLI_Stream client; - ACE_TLI_Connector con; - - if (con.connect (client, ACE_INET_Addr (port, host_name)) == -1) - ACE_OS::t_error ((char *)host_name), ACE_OS::exit (1); - - ACE_OS::strcpy (buf, emp_num); - n = ACE_OS::strlen (buf); - - if (client.send_n (buf, n) != n) - ACE_OS::t_error ("client.send error"); - - if (client.recv (buf, MAXLINE) == -1 && t_errno != TLOOK && client.look () != T_DISCONNECT) - ACE_OS::t_error ("client.recv error"); - - if (ACE_OS::strcmp (buf, "ERROR") == 0) - ACE_OS::printf ("Employee ID %s not in database\n", emp_num); - else - ACE_OS::printf ("Employee name requested is: %s\n", buf); - - if (client.close () == -1) - ACE_OS::t_error ("cli_close"), ACE_OS::exit (1); - - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform must support ACE_TLI\n"), 1); -} -#endif /* ACE_HAS_TLI */ diff --git a/examples/IPC_SAP/TLI_SAP/db-server.cpp b/examples/IPC_SAP/TLI_SAP/db-server.cpp deleted file mode 100644 index 0323b686320..00000000000 --- a/examples/IPC_SAP/TLI_SAP/db-server.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* Simple multi-threaded database server example. */ -// $Id$ - - -#include "ace/TLI_Acceptor.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_TLI) - -/* Global thread manager. */ -ACE_Thread_Manager thr_mgr; - -void * -lookup_name (ACE_HANDLE handle) -{ - ACE_Thread_Control tc (&thr_mgr); - - enum - { - MAXLINE = 255, - EMPNAMELEN = 512 - }; - - static struct - { - int emp_id; - const char *emp_name; - } employee_db[] = - { - {123, "John Wayne Bobbit"}, - {124, "Cindy Crawford"}, - {125, "O. J. Simpson"}, - {126, "Bill Clinton"}, - {127, "Rush Limbaugh"}, - {128, "Michael Jackson"}, - {129, "George Burns"}, - {130, "Paula Jones"}, - {0, ""} - }; - - int n; - int flags; - int len; - int employee_id; - int index; - int found; - ACE_TLI_Stream stream; - char recvline[MAXLINE]; - char sendline[MAXLINE]; - - ACE_DEBUG ((LM_DEBUG, "stream handle = %d, thread id = %t\n", handle)); - stream.set_handle (handle); - - if ((n = stream.recv (recvline, MAXLINE, &flags)) == -1) - ACE_OS::t_error ("stream.recv error"); - - employee_id = ACE_OS::atoi (recvline); - found = 0; - - for (index = 0; found == 0 && employee_db[index].emp_id; index++) - if (employee_id == employee_db[index].emp_id) - { - found = 1; - n = ACE_OS::sprintf (sendline, "%s", employee_db[index].emp_name); - } - - if (found == 0) - n = ACE_OS::sprintf (sendline, "%s", "ERROR"); - - if ((len = stream.send (sendline, n + 1, 0)) == -1) - ACE_OS::t_error ("stream.send error"); - - if (stream.sndrel () == -1) - ACE_OS::t_error ("stream.send error"); - - if (stream.close () == -1) - ACE_OS::t_error ("stream.close error"); - - return 0; -} - -int -main (int argc, char *argv[]) -{ - u_short port = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT; - ACE_INET_Addr l_addr (port); - ACE_TLI_Acceptor server (l_addr, 1); // Create server, reuse addr if in use. - ACE_TLI_Stream new_stream; - - // Wait for a connection from a client. This is an example of a - // concurrent server. - - for (;;) - { - if (server.accept (new_stream) == -1) - ::t_error ("server.accept error"); - - if (thr_mgr.spawn (ACE_THR_FUNC (lookup_name), - (void *) new_stream.get_handle (), - THR_DETACHED) == -1) - ACE_DEBUG ((LM_ERROR, "server: can't create worker thread %d\n")); - } - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform must support ACE_TLI\n"), 1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/IPC_SAP/TLI_SAP/ftp-client.cpp b/examples/IPC_SAP/TLI_SAP/ftp-client.cpp deleted file mode 100644 index ae5bdece3f5..00000000000 --- a/examples/IPC_SAP/TLI_SAP/ftp-client.cpp +++ /dev/null @@ -1,45 +0,0 @@ - -// $Id$ - -#include "ace/TLI_Connector.h" - -#if defined (ACE_HAS_TLI) - -const int MAXLINE = 255; - -int -main (int argc, char *argv[]) -{ - if (argc < 2) - ACE_OS::fprintf (stderr, "Usage: %s filename [server-host port-number]\n", argv[0]), ACE_OS::exit (1); - - const char *filename = argv[1]; - const char *host_name = argc < 3 ? ACE_DEFAULT_SERVER_HOST : argv[2]; - unsigned short port = argc < 4 ? ACE_DEFAULT_SERVER_PORT : ACE_OS::atoi (argv[3]); - - ACE_TLI_Stream client; - ACE_TLI_Connector con; - int fd; - char buf[BUFSIZ]; - - if (con.connect (client, ACE_INET_Addr (port, host_name)) == -1) - ACE_OS::t_error ((char *) host_name), ACE_OS::exit (1); - - if ((fd = ACE_OS::open (filename, O_RDONLY)) == -1) - ACE_OS::perror (filename), ACE_OS::exit (1); - - for (int n; (n = ACE_OS::read (fd, buf, sizeof buf)) > 0; ) - if (client.send_n (buf, n) != n) - ACE_OS::t_error ("client.send error"); - - if (client.close () == -1) - ACE_OS::t_error ("cli_close"), ACE_OS::exit (1); - - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform does not support ACE_TLI\n"), 1); -} -#endif /* ACE_HAS_TLI */ diff --git a/examples/IPC_SAP/TLI_SAP/ftp-server.cpp b/examples/IPC_SAP/TLI_SAP/ftp-server.cpp deleted file mode 100644 index 046f4dc0464..00000000000 --- a/examples/IPC_SAP/TLI_SAP/ftp-server.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* Simple file transfer example */ -// $Id$ - - -#include "ace/Thread_Manager.h" -#include "ace/TLI_Acceptor.h" - -#if defined (ACE_HAS_THREADS) && defined (ACE_HAS_TLI) - -ACE_Thread_Manager thr_mgr; - -void * -read_file (void *fd) -{ - ACE_Thread_Control tc (&thr_mgr); - ACE_TLI_Stream stream; - char buf[BUFSIZ]; - int flags = 0; - int n; - - stream.set_handle (int (fd)); - - ACE_OS::printf ("start (tid = %d, fd = %d)\n", ACE_OS::thr_self (), stream.get_handle ()); - ACE_OS::fflush (stdout); - - while ((n = stream.recv (buf, sizeof buf, &flags)) > 0) - continue; - - ACE_OS::printf ("finish (tid = %d, fd = %d)\n", ACE_OS::thr_self (), stream.get_handle ()); - - if (stream.close () == -1) - ACE_OS::t_error ("stream.close error"); - - return 0; -} - -int -main (int argc, char *argv[]) -{ - u_short port = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_SERVER_PORT; - ACE_TLI_Acceptor server; - ACE_TLI_Stream new_stream; - - /* Allow up to 100 simultaneous threads */ - if (thr_mgr.open (100) == -1) - ACE_OS::perror ("thr_mgr.open"), ACE_OS::exit (1); - - // Open the server and reuse the address if in use... - if (server.open (ACE_INET_Addr (port), 1) == -1) - ACE_OS::t_error ("server.open"), ACE_OS::exit (1); - - /* Wait for a connection from a client. This is an example of a concurrent server */ - - for (int count = 1; ; count++) - { - ACE_OS::fprintf (stderr, "thread %d, blocking for accept #%d\n", - ACE_OS::thr_self (), count); - - if (server.accept (new_stream) == -1) - ACE_OS::t_error ("server.accept error"); - - else if (thr_mgr.spawn (ACE_THR_FUNC (read_file), - (void *) new_stream.get_handle (), - THR_DETACHED | THR_BOUND) == -1) - ACE_OS::perror ("can't create worker thread\n"); - } - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform must support ACE_TLI\n"), 1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/IPC_SAP/TLI_SAP/signal_thread.c b/examples/IPC_SAP/TLI_SAP/signal_thread.c deleted file mode 100644 index e3a3485f1a2..00000000000 --- a/examples/IPC_SAP/TLI_SAP/signal_thread.c +++ /dev/null @@ -1,53 +0,0 @@ -#define _REENTRANT -// @(#)signal_thread.c 1.1 10/18/96 - -#include <stdio.h> -#include <stdlib.h> -#include <signal.h> -#include <thread.h> -#include <synch.h> -#include <unistd.h> - -void *handle (v) - void *v; -{ - sigset_t set; - - sigemptyset (&set); - sigaddset (&set, SIGINT); - - for (;;) - if (sigwait (&set) != SIGINT) - perror ("sigwait"), exit (1); - else - fprintf (stderr, "got sigint!\n"); -} - -int -main (void) -{ - int retval; - sigset_t set; - thread_t t_id; - - sigemptyset (&set); - sigaddset (&set, SIGINT); - - if (sigprocmask (SIG_BLOCK, &set, 0) == -1) - perror ("sigprocmask"), exit (1); - - if (thr_sigsetmask (SIG_BLOCK, &set, 0) == -1) - perror ("sigprocmask"), exit (1); - - if (thr_create (0, 0, handle, 0, THR_DETACHED, &t_id) != 0) - perror ("thr_create"), exit (1); - - for (;;) - { - fprintf (stderr, "blocking for read in thread\n"); - if (read (0, &retval, sizeof retval) != sizeof retval) - perror ("read"); - } - fprintf (stderr, "I'm exiting!\n"); - return 0; -} diff --git a/examples/IPC_SAP/UPIPE_SAP/Makefile b/examples/IPC_SAP/UPIPE_SAP/Makefile deleted file mode 100644 index 8efaf07a35f..00000000000 --- a/examples/IPC_SAP/UPIPE_SAP/Makefile +++ /dev/null @@ -1,255 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the simple ACE_UPIPE client/server test file -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = ex1 \ - ex2 \ - ex3 - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/ex1.o .shobj/ex1.so: ex1.cpp \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Connector.i -.obj/ex2.o .shobj/ex2.so: ex2.cpp \ - $(WRAPPER_ROOT)/ace/UPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Connector.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.i \ - auto_builtin_ptr.h -.obj/ex3.o .shobj/ex3.so: ex3.cpp \ - $(WRAPPER_ROOT)/ace/UPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Connector.i \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/UPIPE_Acceptor.i \ - auto_builtin_ptr.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/IPC_SAP/UPIPE_SAP/auto_builtin_ptr.h b/examples/IPC_SAP/UPIPE_SAP/auto_builtin_ptr.h deleted file mode 100644 index b8d82470d58..00000000000 --- a/examples/IPC_SAP/UPIPE_SAP/auto_builtin_ptr.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -template <class X> -class auto_builtin_ptr - // = TITLE - // Implements an simple-minded auto_ptr abstraction for builtin types. -{ -public: - // = Initialization and termination methods - auto_builtin_ptr (X *p = 0): p_ (p) {} - ~auto_builtin_ptr (void) { delete [] this->p_; } - - // = Accessor methods. - operator X * (void) const { return this->p_; } - -private: - X *p_; -}; - diff --git a/examples/IPC_SAP/UPIPE_SAP/ex1.cpp b/examples/IPC_SAP/UPIPE_SAP/ex1.cpp deleted file mode 100644 index 95119696b23..00000000000 --- a/examples/IPC_SAP/UPIPE_SAP/ex1.cpp +++ /dev/null @@ -1,152 +0,0 @@ -// Example for using ACE_UPIPE_SAP and ACE_Thread for intra-process -// $Id$ - -// communication. -// -// Author : Gerhard Lenzer and Douglas C. Schmidt - - -#include "ace/Stream.h" -#include "ace/UPIPE_Acceptor.h" -#include "ace/UPIPE_Connector.h" - -#if defined (ACE_HAS_THREADS) - -// Global thread manager. -static ACE_Thread_Manager thr_mgr; - -//ACE_UPIPE_Manager ltc_mgr; - -// Global pattern -static ACE_UPIPE_Addr addr ("pattern"); - -// peer1 thread. - -static void * -peer1 (void *) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - ACE_UPIPE_Stream c_stream; - - ACE_DEBUG ((LM_DEBUG, "(%t) peer1 starting connect\n")); - ACE_UPIPE_Connector con; - - if (con.connect (c_stream, addr) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) peer1 ACE_UPIPE_Connector failed\n")); - - ACE_Message_Block *mb = new ACE_Message_Block (20); - mb->copy ("hello", 6); - - if (c_stream.send (mb) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) error peer1 send\n")); - - if (c_stream.recv (mb) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) error peer1 recv\n")); - - ACE_DEBUG ((LM_DEBUG, "(%t) peer1 ack is \"%s\"\n", mb->rd_ptr ())); - - // Free up the memory block. - mb->release (); - - // Now try the send()/recv() interface. - char mytext[] = "This string is sent by peer1 as buffer"; - - ACE_DEBUG ((LM_DEBUG, "(%t) peer1 sending text\n")); - if (c_stream.send (mytext, sizeof mytext) == -1) - ACE_DEBUG ((LM_DEBUG, - "(%t) buffer send from peer1 failed\n")); - - char conbuf[30]; // Buffer to receive response. - - int i = 0; - - for (char c = ' '; c != '!'; i++) - { - if (c_stream.recv (&c, 1) == -1) - ACE_DEBUG ((LM_DEBUG, - "(%t) buffer recv from peer1 failed\n")); - else - conbuf[i] = c; - } - - conbuf[i] = '\0'; - ACE_DEBUG ((LM_DEBUG, - "(%t) peer1 received buffer with \"%s\"\n", - conbuf)); - c_stream.close (); - return 0; -} - -static void * -peer2 (void *) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - - ACE_UPIPE_Acceptor acc (addr); - ACE_UPIPE_Stream s_stream; - - // Spawn a peer1 thread. - if (thr_mgr.spawn (ACE_THR_FUNC (peer1), (void *) 0, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 0); - - ACE_DEBUG ((LM_DEBUG, "(%t) peer2 starting accept\n")); - - if (acc.accept (s_stream) == -1) - ACE_DEBUG ((LM_DEBUG, - "(%t) ACE_UPIPE_Acceptor.accept failed\n")); - - ACE_Message_Block *mb = 0; - - if (s_stream.recv (mb) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) peer2 recv failed\n")); - - ACE_DEBUG ((LM_DEBUG, "(%t) peer2 recv is \"%s\"\n", - mb->rd_ptr ())); - - mb->wr_ptr (mb->rd_ptr ()); - mb->copy ("thanks", 7); - - if (s_stream.send (mb) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) peer2 send failed\n")); - - char s_buf[42]; - ACE_DEBUG ((LM_DEBUG, "(%t) peer2 sleeping on recv\n")); - - if (s_stream.recv (s_buf, sizeof s_buf) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) peer2 recv failed\n")); - else - ACE_DEBUG ((LM_DEBUG, - "(%t) peer2 received buffer with \"%s\"\n", - s_buf)); - - ACE_OS::strcpy (s_buf, "this is the peer2 response!"); - - if (s_stream.send (s_buf, 30) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) peer2 send failed\n")); - - s_stream.close (); - return 0; -} - -int -main (int, char *[]) -{ - // Spawn a peer2 thread. - if (thr_mgr.spawn (ACE_THR_FUNC (peer2), (void *) 0, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); - - // Wait for peer2 and peer1 threads to exit. - thr_mgr.wait (); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/IPC_SAP/UPIPE_SAP/ex2.cpp b/examples/IPC_SAP/UPIPE_SAP/ex2.cpp deleted file mode 100644 index 351fb92c21b..00000000000 --- a/examples/IPC_SAP/UPIPE_SAP/ex2.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// Example for using ACE_UPIPE_SAP and ACE_Thread for intra-process -// $Id$ - -// communication. -// -// Author : Gerhard Lenzer and Douglas C. Schmidt - -#include <fstream.h> - -#include "ace/UPIPE_Connector.h" -#include "ace/UPIPE_Acceptor.h" -#include "auto_builtin_ptr.h" - -#if defined (ACE_HAS_THREADS) - -// Global thread manager. -static ACE_Thread_Manager thr_mgr; - -// Data for testsuite. -int size = 0; -int iterations = 0; - -static void * -supplier (void *) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - ACE_UPIPE_Stream s_stream; - - ACE_UPIPE_Addr c_addr ("pattern"); - - auto_builtin_ptr <char> mybuf = new char[size]; - - for (int i = 0; i < size; i++) - mybuf[i] = 'a'; - - ACE_DEBUG ((LM_DEBUG, "(%t) supplier starting connect thread\n")); - - ACE_UPIPE_Connector con; - - if (con.connect (s_stream, c_addr) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", - "ACE_UPIPE_Acceptor.connect failed")); - - // Test asynchronisity. - s_stream.enable (SIGIO); - - for (int j = 0; j < iterations; j++) - { - ACE_Message_Block *mb_p = - new ACE_Message_Block (size, ACE_Message_Block::MB_DATA, - (ACE_Message_Block *) 0, mybuf); - - if (s_stream.send (mb_p) == -1) - { - ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", "send failed")); - return 0; - } - } - - // Insert a 0-sized message block to signal the other side to shut - // down. - if (s_stream.send (new ACE_Message_Block ((size_t) 0)) == -1) - { - cout << "error put" << endl; - return 0; - } - - s_stream.close (); - return 0; -} - -static void * -consumer (void *) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - ACE_UPIPE_Stream c_stream; - - // Set the high water mark to size to achieve optimum performance. - - int wm = size * iterations; - - if (c_stream.control (ACE_IO_Cntl_Msg::SET_HWM, &wm) == -1) - ACE_DEBUG ((LM_DEBUG, "set HWM failed\n")); - - ACE_UPIPE_Addr serv_addr ("pattern"); - - ACE_UPIPE_Acceptor acc (serv_addr); // accept will wait up to 4 seconds - - ACE_DEBUG ((LM_DEBUG, "(%t) consumer spawning the supplier thread\n")); - - // Spawn the supplier thread. - if (thr_mgr.spawn (ACE_THR_FUNC (supplier), (void *) 0, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 0); - - ACE_DEBUG ((LM_DEBUG, "(%t) consumer starting accept\n")); - - if (acc.accept (c_stream) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", - "ACE_UPIPE_Acceptor.accept failed")); - - // time measurement - time_t currsec; - ACE_OS::time (&currsec); - time_t start = (time_t) currsec; - - int received_messages = 0; - - for (ACE_Message_Block *mb = 0; - c_stream.recv (mb) != -1 && mb->size () != 0; - mb->release ()) - received_messages++; - - ACE_OS::time (&currsec); - time_t secs = (time_t) currsec - start; - - ACE_DEBUG ((LM_DEBUG, - "(%t) Transferred %d blocks of size %d\n" - "The program ran %d seconds\n", - received_messages, size, secs)); - - c_stream.close (); - return 0; -} - -int -main (int argc, char *argv[]) -{ - size = argc > 1 ? ACE_OS::atoi (argv[1]) : 32; - iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 16; - - // Spawn the two threads. - if (thr_mgr.spawn (ACE_THR_FUNC (consumer), (void *) 0, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ( (LM_ERROR, "%p\n", "spawn"), 1); - - // Wait for producer and consumer threads to exit. - thr_mgr.wait (); - return 0; -} - -#else -int -main (int, char *[]) -{ - ACE_ERROR ( (LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class auto_builtin_ptr <char>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/IPC_SAP/UPIPE_SAP/ex3.cpp b/examples/IPC_SAP/UPIPE_SAP/ex3.cpp deleted file mode 100644 index 8308532a226..00000000000 --- a/examples/IPC_SAP/UPIPE_SAP/ex3.cpp +++ /dev/null @@ -1,150 +0,0 @@ -// Example for using ACE_UPIPE_SAP and ACE_Thread for intra-process -// $Id$ - -// communication. This example uses char buffers as input/output -// interface to the ACE_UPIPE_Stream -// -// Authors: Gerhard Lenzer and Prashant Jain. - -#include <fstream.h> - -#include "ace/UPIPE_Connector.h" -#include "ace/UPIPE_Acceptor.h" -#include "auto_builtin_ptr.h" - -#if defined (ACE_HAS_THREADS) - -// Global thread manager. -static ACE_Thread_Manager thr_mgr; - -// Data for testsuite. -int size = 0; -int iterations = 0; - -static void * -supplier (void *) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - - ACE_UPIPE_Stream s_stream; - ACE_UPIPE_Addr c_addr ("pattern"); - - ACE_UPIPE_Connector con; - - ACE_DEBUG ((LM_DEBUG, "(%t) supplier starting connect thread\n")); - - if (con.connect (s_stream, c_addr) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", - "ACE_UPIPE_Acceptor.connect failed")); - - auto_builtin_ptr <char> mybuf = new char[size]; - - for (int i = 0; i < size; i++) - mybuf[i] = 'a'; - - for (int j = 0; j < iterations; j++) - if (s_stream.send (mybuf, size) == -1) - { - ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", "send failed")); - return 0; - } - - // Insert a 0-sized message block to signal the other side to shut - // down. - if (s_stream.send (new ACE_Message_Block ((size_t) 0)) == -1) - { - cout << "error put" << endl; - return 0; - } - - s_stream.close (); - return 0; -} - -static void * -consumer (void *) -{ - // Insert thread into thr_mgr. - ACE_Thread_Control thread_control (&thr_mgr); - - ACE_UPIPE_Stream c_stream; - ACE_UPIPE_Addr serv_addr ("pattern"); - - // Accept will wait up to 4 seconds - ACE_UPIPE_Acceptor acc (serv_addr); - - ACE_DEBUG ((LM_DEBUG, "(%t) consumer spawning the supplier thread\n")); - - // Spawn the supplier thread. - if (thr_mgr.spawn (ACE_THR_FUNC (supplier), (void *) 0, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 0); - - ACE_DEBUG ((LM_DEBUG, "(%t) consumer starting accept\n")); - - if (acc.accept (c_stream) == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", - "ACE_UPIPE_Acceptor.accept failed")); - - // Ensure deletion upon exit. - auto_builtin_ptr <char> mybuf = new char[size]; - time_t currsec; - - ACE_OS::time (&currsec); - - time_t start = (time_t) currsec; - int result = 0; - int blocks = 0; - - for (;; blocks++) - { - result = c_stream.recv (mybuf, size); - if (result <= 0) - break; - // ACE_DEBUG ((LM_DEBUG, "(%t) %d: %s\n", size, (char *) mybuf)); - } - - if (result == -1) - ACE_DEBUG ((LM_DEBUG, "(%t) %p\n", "recv failed")); - - ACE_OS::time (&currsec); - time_t secs = (time_t) currsec - start; - - ACE_DEBUG ((LM_DEBUG, - "(%t) Transferred %d blocks of size %d\n" - "The program ran %d seconds\n", - blocks, size, secs)); - - c_stream.close (); - return 0; -} - -int -main (int argc, char *argv[]) -{ - size = argc > 1 ? ACE_OS::atoi (argv[1]) : 32; - iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 16; - - // Spawn the thread. - if (thr_mgr.spawn (ACE_THR_FUNC (consumer), (void *) 0, - THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ( (LM_ERROR, "%p\n", "spawn"), 1); - - // Wait for producer and consumer threads to exit. - thr_mgr.wait (); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ( (LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class auto_builtin_ptr <char>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Log_Msg/Makefile b/examples/Log_Msg/Makefile deleted file mode 100644 index 1ddabf3cb08..00000000000 --- a/examples/Log_Msg/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for testing the Log_Msg logger -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_log_msg - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/test_log_msg.o .shobj/test_log_msg.so: test_log_msg.cpp \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Log_Msg/test_log_msg.cpp b/examples/Log_Msg/test_log_msg.cpp deleted file mode 100644 index 6216aa38c36..00000000000 --- a/examples/Log_Msg/test_log_msg.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// Test the Log_Msg abstraction. -// $Id$ - -#include "ace/OS.h" - -static void -cleanup (void) -{ - ACE_DEBUG ((LM_INFO, "leaving (%P)!\n")); -} - -static void -cause_error (void) -{ - errno = EWOULDBLOCK; - ACE_ERROR ((LM_DEBUG, "would block\n")); -} - -int -main (int argc, char *argv[]) -{ - // Note that the default behavior is to log to STDERR... - - if (argc > 1) - { - if (ACE_LOG_MSG->open (argv[0], ACE_Log_Msg::OSTREAM) == -1) - ACE_ERROR ((LM_ERROR, "cannot open logger!!!\n")); - - cause_error (); - // Check to see what happened. - if (ACE_LOG_MSG->op_status () == -1 - && ACE_LOG_MSG->errnum () == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, "op_status and errnum work!\n")); - else - ACE_ERROR ((LM_ERROR, "op_status and errnum failed!\n")); - } - else - { - if (ACE_LOG_MSG->open (argv[0]) == -1) - ACE_ERROR ((LM_ERROR, "cannot open logger!!!\n")); - - cause_error (); - - // Check to see what happened. - if (ACE_LOG_MSG->op_status () == -1 - && ACE_LOG_MSG->errnum () == EWOULDBLOCK) - ACE_DEBUG ((LM_DEBUG, "op_status and errnum work!\n")); - else - ACE_ERROR ((LM_ERROR, "op_status and errnum failed!\n")); - - // Exercise many different combinations of STDERR and OSTREAM. - - ACE_DEBUG ((LM_INFO, "%f, %*s%s = %d\n", - 3.1416, 8, "", "hello", 10000)); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (&cout); - - ACE_DEBUG ((LM_INFO, "%f, %*s%s = %d\n", - 3.1416 * 3.1416, 8, "", "world", 20000)); - - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR); - - ACE_DEBUG ((LM_INFO, "%f, %*s%s = %d\n", - 3.1416 * 3.1416, 8, "", "world", 20000)); - - ACE_LOG_MSG->msg_ostream (0); - - ACE_LOG_MSG->set_flags (ACE_Log_Msg::STDERR); - - ACE_DEBUG ((LM_INFO, "%f, %*s%s = %d\n", - 3.1416 * 3.1416, 8, "", "world", 20000)); - - ACE_LOG_MSG->clr_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (&cerr); - - ACE_DEBUG ((LM_INFO, "%f, %*s%s = %d\n", - 3.1416 * 3.1416, 8, "", "world", 20000)); - - static int array[] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048}; - - // Print out the binary bytes of the array in hex form. - ACE_LOG_MSG->log_hexdump (LM_DEBUG, (char *) array, sizeof array); - - // Disable the LM_DEBUG and LM_INFO messages. - int priority_mask = ACE_LOG_MSG->priority_mask (); - ACE_CLR_BITS (priority_mask, LM_DEBUG | LM_INFO); - ACE_LOG_MSG->priority_mask (priority_mask); - - ACE_DEBUG ((LM_INFO, "This LM_INFO message should not print!\n")); - ACE_DEBUG ((LM_DEBUG, "This LM_DEBUG message should not print!\n")); - - char *badname = "badname"; - - char *l_argv[2]; - l_argv[0] = badname; - l_argv[1] = 0; - - if (ACE_OS::execv (badname, l_argv) == -1) - ACE_ERROR ((LM_ERROR, "%n: (%x), %p%r%a\n", - 10000, badname, cleanup, 1)); - } - return 0; -} diff --git a/examples/Logger/Acceptor-server/Makefile b/examples/Logger/Acceptor-server/Makefile deleted file mode 100644 index d0f098bdf9a..00000000000 --- a/examples/Logger/Acceptor-server/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Reactor version of the Server Logging Daemon -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = server_loggerd - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Logger/Acceptor-server/server_loggerd.cpp b/examples/Logger/Acceptor-server/server_loggerd.cpp deleted file mode 100644 index 3b28a29b408..00000000000 --- a/examples/Logger/Acceptor-server/server_loggerd.cpp +++ /dev/null @@ -1,267 +0,0 @@ -// $Id$ - -// This server daemon collects, formats, and displays logging -// information forwarded from client daemons running on other hosts in -// the network. In addition, this example illustrates how to use the -// ACE_Reactor, ACE_Acceptor, ACE_Singleton, and the ACE_Test_and_Set -// components. - -#include "ace/Get_Opt.h" -#include "ace/Acceptor.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/Synch.h" -#include "ace/Singleton.h" - -// ---------------------------------------- - -class Options -{ - // = TITLE - // Keeps track of the options. -public: - void parse_args (int argc, char *argv[]); - u_short port (void); - -private: - u_short port_; - // Port number; -}; - -// Return the port number. - -u_short -Options::port (void) -{ - return this->port_; -} - -// Parse the command-line options. - -void -Options::parse_args (int argc, char *argv[]) -{ - this->port_ = ACE_DEFAULT_SERVER_PORT; - - ACE_Get_Opt get_opt (argc, argv, "p:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'p': - this->port_ = ACE_OS::atoi (get_opt.optarg); - break; - default: - break; - } -} - -// ---------------------------------------- - -// Our Reactor Singleton. -typedef ACE_Singleton<ACE_Reactor, ACE_Null_Mutex> - REACTOR; - -// Our Options Singleton. -typedef ACE_Singleton<Options, ACE_Null_Mutex> - OPTIONS; - -// Our ACE_Test_and_Set Singleton. -typedef ACE_Singleton<ACE_Test_and_Set <ACE_Null_Mutex, sig_atomic_t>, ACE_Null_Mutex> - QUIT_HANDLER; - -// ---------------------------------------- - -class Logging_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> - // = TITLE - // Receive client message from the remote clients. - // - // = DESCRIPTION - // This class demonstrates how to receive messages from remote - // clients using the notification mechanisms in the - // <ACE_Reactor>. In addition, it also illustrates how to - // utilize the <ACE_Reactor> timer mechanisms, as well. -{ -public: - // = Initialization and termination methods. - Logging_Handler (void); - - // = Hooks for opening and closing handlers. - virtual int open (void *); - -protected: - // = Demultiplexing hooks. - virtual int handle_input (ACE_HANDLE); - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); - -private: - char peer_name_[MAXHOSTNAMELEN + 1]; - // Host we are connected to. -}; - -// Specialize a Logging Acceptor. -typedef ACE_Acceptor <Logging_Handler, ACE_SOCK_ACCEPTOR> - Logging_Acceptor; - -// Default constructor. - -Logging_Handler::Logging_Handler (void) -{ -} - -int -Logging_Handler::handle_timeout (const ACE_Time_Value &, - const void *arg) -{ - ACE_ASSERT (arg == this); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) handling timeout from this = %u\n", this)); - return 0; -} - -// Perform the logging record receive. - -int -Logging_Handler::handle_input (ACE_HANDLE) -{ - // Perform two recv's to emulate record-oriented semantics. Note - // that this code is not entirely portable since it relies on the - // fact that sizeof (ssize_t) is the same on both the sender and - // receiver side. To correctly handle this is painful, and we leave - // it as an exercise for the reader ;-). - - ssize_t len; - ssize_t n = this->peer ().recv ((void *) &len, sizeof len); - - switch (n) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p at host %s\n", - "client logger", this->peer_name_), -1); - /* NOTREACHED */ - case 0: - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) closing log daemon at host %s (fd = %d)\n", - this->peer_name_, this->get_handle ()), -1); - /* NOTREACHED */ - case sizeof (size_t): - { - ACE_Log_Record lp; - - len = ntohl (len); - n = this->peer ().recv_n ((void *) &lp, len); - - if (n != len) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p at host %s\n", - "client logger", this->peer_name_), -1); - /* NOTREACHED */ - - lp.decode (); - - if (lp.length () == n) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) ")); - lp.print (this->peer_name_, 1, cerr); - } - else - ACE_ERROR ((LM_ERROR, "(%P|%t) error, lp.length = %d, n = %d\n", - lp.length (), n)); - break; - } - default: - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p at host %s\n", - "client logger", this->peer_name_), -1); - /* NOTREACHED */ - } - - return 0; -} - -int -Logging_Handler::open (void *) -{ - ACE_INET_Addr addr; - - if (this->peer ().get_remote_addr (addr) == -1) - return -1; - else - { - ACE_OS::strncpy (this->peer_name_, - addr.get_host_name (), - MAXHOSTNAMELEN + 1); - - if (REACTOR::instance ()->register_handler - (this, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) can't register with reactor\n"), -1); - else if (REACTOR::instance ()->schedule_timer - (this, - (const void *) this, - ACE_Time_Value (2), - ACE_Time_Value (2)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "can'(%P|%t) t register with reactor\n"), -1); - else - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) connected with %s\n", this->peer_name_)); - return 0; - } -} - -int -main (int argc, char *argv[]) -{ - // Acceptor factory. - Logging_Acceptor peer_acceptor; - - OPTIONS::instance ()->parse_args (argc, argv); - - // We need to pass in REACTOR::instance() here so that we don't use - // the default ACE_Service_Config::reactor(). - - if (peer_acceptor.open - (ACE_INET_Addr (OPTIONS::instance ()->port ()), - REACTOR::instance ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - else if (REACTOR::instance ()->register_handler - (&peer_acceptor, ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "registering service with ACE_Reactor\n"), -1); - - // Register QUIT_HANDLER to receive SIGINT commands. When received, - // QUIT_HANDLER becomes "set" and thus, the event loop below will - // exit. - else if (REACTOR::instance ()->register_handler - (SIGINT, QUIT_HANDLER::instance ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "registering service with ACE_Reactor\n"), -1); - - // Run forever, performing logging service. - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) starting up server logging daemon\n")); - - // Perform logging service until QUIT_HANDLER receives SIGINT. - while (QUIT_HANDLER::instance ()->is_set () == 0) - REACTOR::instance ()->handle_events (); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down server logging daemon\n")); - - return 0; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Acceptor<Logging_Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_Message_Queue<ACE_NULL_SYNCH>; -template class ACE_Module<ACE_NULL_SYNCH>; -template class ACE_Singleton<ACE_Reactor, ACE_Null_Mutex>; -template class ACE_Singleton<ACE_Test_and_Set <ACE_Null_Mutex, sig_atomic_t>, ACE_Null_Mutex>; -template class ACE_Singleton<Options, ACE_Null_Mutex>; -template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; -template class ACE_TSS<ACE_Dynamic>; -template class ACE_Task<ACE_NULL_SYNCH>; -template class ACE_Test_and_Set<ACE_Null_Mutex, sig_atomic_t>; -template class ACE_Thru_Task<ACE_NULL_SYNCH>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Logger/Makefile b/examples/Logger/Makefile deleted file mode 100644 index 05c41ee6fc2..00000000000 --- a/examples/Logger/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the distributed logger tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = README - -DIRS = Acceptor-server \ - client \ - simple-server - - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/examples/Logger/README b/examples/Logger/README deleted file mode 100644 index 9fa30aafbc0..00000000000 --- a/examples/Logger/README +++ /dev/null @@ -1,32 +0,0 @@ -This directory contains a simple client/server implementation of the -distributed logging server described in several papers in the C++ -Report (which can be obtained via the following WWW URLs: -http://www.cs.wustl.edu/~schmidt/{Reactor1-93.ps.gz,Reactor2-93.ps.gz}). - -The example consists of the following two directories: - - . client - - This program talks directly to the server logging - daemon. The server daemon must be started before you - can run this test. - - . simple-server - - This program runs a simple, non-templated, - single-threaded Reactive implementation of the - distributed logging server daemon. - - . Acceptor-server - - This program runs templated, Acceptor-based - single-threaded Reactive implementation of the - distributed logging server daemon. - -To see a more complex solution that implements the design described in -the C++ Report articles, please see the: - -$WRAPPER_ROOT/netsvcs/{clients,lib,servers} - -directories. - diff --git a/examples/Logger/client/Makefile b/examples/Logger/client/Makefile deleted file mode 100644 index fd4d0534480..00000000000 --- a/examples/Logger/client/Makefile +++ /dev/null @@ -1,66 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for client logging applications -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = logging_app - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/logging_app.o .shobj/logging_app.so: logging_app.cpp \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Logger/client/logging_app.cpp b/examples/Logger/client/logging_app.cpp deleted file mode 100644 index 937bbe8341c..00000000000 --- a/examples/Logger/client/logging_app.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// $Id$ - -// This program sends logging records directly to the server, rather -// than going through the client logging daemon. - -#include "ace/SOCK_Connector.h" - -#include "ace/Log_Record.h" - -static u_short LOGGER_PORT = ACE_DEFAULT_SERVER_PORT; -static const char *const LOGGER_HOST = ACE_DEFAULT_SERVER_HOST; -static const int MAX_ITERATIONS = 10; - -int -main (int argc, char *argv[]) -{ - const char *logger_host = argc > 1 ? argv[1] : LOGGER_HOST; - u_short logger_port = argc > 2 ? ACE_OS::atoi (argv[2]) : LOGGER_PORT; - int max_iterations = argc > 3 ? ACE_OS::atoi (argv[3]) : MAX_ITERATIONS; - - ACE_SOCK_Stream logger; - ACE_SOCK_Connector connector; - ACE_INET_Addr addr (logger_port, logger_host); - - if (connector.connect (logger, addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - for (int i = 0; i < max_iterations; i++) - { - ACE_Log_Record log_record (LM_DEBUG, - ACE_OS::time ((time_t *) 0), - ACE_OS::getpid ()); - - char buf[BUFSIZ]; - ::sprintf (buf, "message = %d\n", i + 1); - log_record.msg_data (buf); - size_t len = log_record.length (); - size_t encoded_len = htonl (len); - - log_record.encode (); - - if (logger.send (4, &encoded_len, sizeof encoded_len, - (char *) &log_record, len) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1); - else - ACE_OS::sleep (1); - } - - if (logger.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} diff --git a/examples/Logger/simple-server/Logging_Acceptor.cpp b/examples/Logger/simple-server/Logging_Acceptor.cpp deleted file mode 100644 index c0e5a061bb7..00000000000 --- a/examples/Logger/simple-server/Logging_Acceptor.cpp +++ /dev/null @@ -1,67 +0,0 @@ -// $Id$ - -#include "Logging_Acceptor.h" -#include "Logging_Handler.h" -#include "Reactor_Singleton.h" - -// Initialize peer_acceptor object. - -int -Logging_Acceptor::open (const ACE_INET_Addr &addr) -{ - // Reuse addr if already in use. - if (this->peer_acceptor_.open (addr, 1) == -1) - return -1; - else - return 0; -} - -// Default constructor. - -Logging_Acceptor::Logging_Acceptor (void) -{ -} - -// Performs termination activities. - -int -Logging_Acceptor::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - return this->peer_acceptor_.close (); -} - -Logging_Acceptor::~Logging_Acceptor (void) -{ - this->handle_close (ACE_INVALID_HANDLE, - ACE_Event_Handler::ACCEPT_MASK); -} - -// Returns underlying device descriptor. - -ACE_HANDLE -Logging_Acceptor::get_handle (void) const -{ - return this->peer_acceptor_.get_handle (); -} - -// Accepts connections from client and registers new object with the -// ACE_Reactor. - -int -Logging_Acceptor::handle_input (ACE_HANDLE) -{ - Logging_Handler *svc_handler; - - ACE_NEW_RETURN (svc_handler, Logging_Handler, -1); - - // Accept the connection from a client client daemon. - - if (this->peer_acceptor_.accept (svc_handler->peer ()) == -1 - || svc_handler->open () == -1) - { - svc_handler->close (); - ACE_ERROR_RETURN ((LM_ERROR, "%p", "accept/open failed"), -1); - } - - return 0; -} diff --git a/examples/Logger/simple-server/Logging_Acceptor.h b/examples/Logger/simple-server/Logging_Acceptor.h deleted file mode 100644 index bfc5bbb3d3e..00000000000 --- a/examples/Logger/simple-server/Logging_Acceptor.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// Logging_Acceptor.h -// -// = AUTHOR -// Doug Schmidt -// -// ============================================================================ - -#if !defined (_CLIENT_ACCEPTOR_H) -#define _CLIENT_ACCEPTOR_H - -#include "ace/SOCK_Acceptor.h" -#include "ace/Event_Handler.h" - -class Logging_Acceptor : public ACE_Event_Handler - // = TITLE - // Handle connection requests from remote client clients. - // - // = DESCRIPTION - // Accepts client connection requests, creates Logging_Handler's - // to process them, and registers these Handlers with the - // ACE_Reactor Singleton. -{ -friend class Logging_Handler; -public: - Logging_Acceptor (void); - ~Logging_Acceptor (void); - - int open (const ACE_INET_Addr &a); - -private: - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE); - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - - ACE_SOCK_Acceptor peer_acceptor_; - // Passive connection acceptor factory. -}; - -#endif /* _CLIENT_ACCEPTOR_H */ diff --git a/examples/Logger/simple-server/Logging_Handler.cpp b/examples/Logger/simple-server/Logging_Handler.cpp deleted file mode 100644 index 323f11483e1..00000000000 --- a/examples/Logger/simple-server/Logging_Handler.cpp +++ /dev/null @@ -1,152 +0,0 @@ -// $Id$ - -#include "Logging_Handler.h" -#include "Reactor_Singleton.h" - -// Default constructor. - -Logging_Handler::Logging_Handler (void) -{ -} - -Logging_Handler::~Logging_Handler (void) -{ - REACTOR::instance ()->cancel_timer (this); - this->cli_stream_.close (); -} - -// Extract the underlying ACE_SOCK_Stream (e.g., for purposes of -// accept()). - -ACE_SOCK_Stream & -Logging_Handler::peer (void) -{ - return this->cli_stream_; -} - -int -Logging_Handler::handle_timeout (const ACE_Time_Value &, - const void *arg) -{ - ACE_ASSERT (arg == this); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) handling timeout from this = %u\n", this)); - return 0; -} - -// Perform the logging record receive. - -int -Logging_Handler::handle_input (ACE_HANDLE) -{ - ssize_t n; - size_t len; - - // Perform two recv's to emulate record-oriented semantics. Note - // that this code is not entirely portable since it relies on the - // fact that sizeof (ssize_t) is the same on both the sender and - // receiver side. To correctly handle this is painful, and we leave - // it as an exercise for the reader ;-). - - switch (n = this->cli_stream_.recv ((void *) &len, sizeof len)) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p at host %s\n", - "client logger", this->host_name_), -1); - /* NOTREACHED */ - case 0: - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) closing log daemon at host %s (fd = %d)\n", - this->host_name_, this->get_handle ()), -1); - /* NOTREACHED */ - case sizeof (size_t): - { - ACE_Log_Record lp; - - len = ntohl (len); - n = this->cli_stream_.recv_n ((void *) &lp, len); - if (n != (ssize_t) len) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p at host %s\n", - "client logger", this->host_name_), -1); - /* NOTREACHED */ - - lp.decode (); - - if (lp.length () == n) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) ")); - lp.print (this->host_name_, 1, cerr); - } - else - ACE_ERROR ((LM_ERROR, "(%P|%t) error, lp.length = %d, n = %d\n", - lp.length (), n)); - break; - } - default: - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p at host %s\n", - "client logger", this->host_name_), -1); - /* NOTREACHED */ - } - - return 0; -} - -// Extract underlying device descriptor. - -ACE_HANDLE -Logging_Handler::get_handle (void) const -{ - return this->cli_stream_.get_handle (); -} - -int -Logging_Handler::open (void) -{ - ACE_INET_Addr addr; - - if (this->cli_stream_.get_remote_addr (addr) == -1) - return -1; - else - { - ACE_OS::strncpy (this->host_name_, - addr.get_host_name (), - MAXHOSTNAMELEN + 1); - - if (REACTOR::instance ()->register_handler - (this, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) can't register with reactor\n"), - -1); - else if (REACTOR::instance ()->schedule_timer - (this, (const void *) this, - ACE_Time_Value (2), - ACE_Time_Value (2)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "can'(%P|%t) t register with reactor\n"), - -1); - else - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) connected with %s\n", - this->host_name_)); - return 0; - } -} - -// Perform termination activities when deregistered from the -// ACE_Reactor. - -int -Logging_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask mask) -{ - // Must be allocated dynamically! - if (mask == ACE_Event_Handler::READ_MASK) - delete this; - return 0; -} - -// Perform termination activities when close fails. - -int -Logging_Handler::close (void) -{ - return this->handle_close (ACE_INVALID_HANDLE, - ACE_Event_Handler::READ_MASK); -} diff --git a/examples/Logger/simple-server/Logging_Handler.h b/examples/Logger/simple-server/Logging_Handler.h deleted file mode 100644 index 0daa974b519..00000000000 --- a/examples/Logger/simple-server/Logging_Handler.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// Logging_Handler.h -// -// = AUTHOR -// Doug Schmidt -// -// ============================================================================ - -#if !defined (_CLIENT_HANDLER_H) -#define _CLIENT_HANDLER_H - -#include "ace/Event_Handler.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_Stream.h" - -class Logging_Handler : public ACE_Event_Handler - // = TITLE - // Receive client message from the remote clients. - // - // = DESCRIPTION - // This class demonstrates how to receive messages from remote - // clients using the notification mechanisms in the - // <ACE_Reactor>. In addition, it also illustrates how to - // utilize the <ACE_Reactor> timer mechanisms, as well. -{ -public: - Logging_Handler (void); - - // = Hooks for opening and closing handlers. - virtual int open (void); - virtual int close (void); - - ACE_SOCK_Stream &peer (void); - // Conversion operators. - -protected: - // = Demultiplexing hooks. - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE); - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg); - - // = Really should be private... - virtual ~Logging_Handler (void); - // Ensure dynamic allocation. - -private: - char host_name_[MAXHOSTNAMELEN + 1]; - // Host we are connected to. - - ACE_SOCK_Stream cli_stream_; - // Connection with client -}; - -#endif /* _CLIENT_HANDLER_H */ diff --git a/examples/Logger/simple-server/Makefile b/examples/Logger/simple-server/Makefile deleted file mode 100644 index b20244c9a38..00000000000 --- a/examples/Logger/simple-server/Makefile +++ /dev/null @@ -1,131 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Reactor Server Logging Daemon -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = server_loggerd - -FILES = Logging_Acceptor \ - Logging_Handler - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LDLIBS = $(addprefix .shobj/,$(SHOBJ)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Logging_Acceptor.o .shobj/Logging_Acceptor.so: Logging_Acceptor.cpp Logging_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - Logging_Handler.h Reactor_Singleton.h \ - $(WRAPPER_ROOT)/ace/Singleton.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i -.obj/Logging_Handler.o .shobj/Logging_Handler.so: Logging_Handler.cpp Logging_Handler.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - Reactor_Singleton.h \ - $(WRAPPER_ROOT)/ace/Singleton.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Logger/simple-server/Reactor_Singleton.h b/examples/Logger/simple-server/Reactor_Singleton.h deleted file mode 100644 index 44f2a91eda7..00000000000 --- a/examples/Logger/simple-server/Reactor_Singleton.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// Reactor_Singleton.h -// -// = AUTHOR -// Doug Schmidt -// -// ============================================================================ - -#if !defined (_REACTOR_SINGLETON_H) -#define _REACTOR_SINGLETON_H - -#include "ace/Singleton.h" -#include "ace/Reactor.h" - -// Our global Reactor Singleton. -typedef ACE_Singleton<ACE_Reactor, ACE_Null_Mutex> REACTOR; - -#endif /* _REACTOR_SINGLETON_H */ diff --git a/examples/Logger/simple-server/server_loggerd.cpp b/examples/Logger/simple-server/server_loggerd.cpp deleted file mode 100644 index 7846c4ed249..00000000000 --- a/examples/Logger/simple-server/server_loggerd.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// $Id$ - -// This server daemon collects, formats, and displays logging -// information forwarded from client daemons running on other hosts in -// the network. -// -// In addition, it also illustrates how the ACE_Reactor framework is -// used. - -#include "ace/Get_Opt.h" - -#include "Logging_Acceptor.h" -#include "Reactor_Singleton.h" - -static sig_atomic_t finished = 0; - -extern "C" void -handler (int) -{ - finished = 1; -} - -// It doesn't get anymore const than this.... -static const u_short PORT = ACE_DEFAULT_SERVER_PORT; - -int -main (int argc, char *argv[]) -{ - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - ACE_UNUSED_ARG (sa); - - Logging_Acceptor peer_acceptor; - ACE_INET_Addr addr (PORT); - - ACE_Get_Opt get_opt (argc, argv, "p:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'p': - addr.set (ACE_OS::atoi (get_opt.optarg)); - break; - default: - break; - } - - if (peer_acceptor.open (addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (REACTOR::instance ()->register_handler - (&peer_acceptor, - ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "registering service with ACE_Reactor\n"), - -1); - - // Run forever, performing logging service. - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) starting up server logging daemon\n")); - - while (!finished) - REACTOR::instance ()->handle_events (); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down server logging daemon\n")); - - return 0; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Singleton<ACE_Reactor, ACE_Null_Mutex>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Makefile b/examples/Makefile deleted file mode 100644 index 3973a65d38f..00000000000 --- a/examples/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the ACE examples directory -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = README - -DIRS = ASX \ - Connection \ - IPC_SAP \ - IOStream \ - Logger \ - Log_Msg \ - Mem_Map \ - Misc \ - Reactor \ - Service_Configurator \ - Shared_Malloc \ - Shared_Memory \ - System_V_IPC \ - Threads - -# Makefiles TBD: -# ttcp -# CORBA - - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/examples/Map_Manager/Makefile b/examples/Map_Manager/Makefile deleted file mode 100644 index ab43ef34c8e..00000000000 --- a/examples/Map_Manager/Makefile +++ /dev/null @@ -1,266 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for testing the ACE Map_Manager components. -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_hash_map_manager - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/test_dump.o .shobj/test_dump.so: test_dump.cpp \ - $(WRAPPER_ROOT)/ace/Dump.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Dump_T.h -.obj/test_get_opt.o .shobj/test_get_opt.so: test_get_opt.cpp \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i -.obj/test_profile_timer.o .shobj/test_profile_timer.so: test_profile_timer.cpp \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h -.obj/test_read_buffer.o .shobj/test_read_buffer.so: test_read_buffer.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Read_Buffer.h \ - $(WRAPPER_ROOT)/ace/Read_Buffer.i -.obj/test_sstring.o .shobj/test_sstring.so: test_sstring.cpp \ - $(WRAPPER_ROOT)/ace/SString.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i -.obj/test_trace.o .shobj/test_trace.so: test_trace.cpp \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Set.h -.obj/test_XtReactor1.o .shobj/test_XtReactor1.so: test_XtReactor1.cpp \ - $(WRAPPER_ROOT)/ace/XtReactor.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h -.obj/test_XtReactor2.o .shobj/test_XtReactor2.so: test_XtReactor2.cpp \ - $(WRAPPER_ROOT)/ace/XtReactor.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Map_Manager/test_hash_map_manager.cpp b/examples/Map_Manager/test_hash_map_manager.cpp deleted file mode 100644 index eb5618e7003..00000000000 --- a/examples/Map_Manager/test_hash_map_manager.cpp +++ /dev/null @@ -1,68 +0,0 @@ -#include "ace/ACE.h" -#include "ace/Synch.h" -#include "ace/Hash_Map_Manager.h" - -const int MAX_KEY_LEN = 1000; - -typedef ACE_Hash_Map_Manager<ACE_CString, ACE_CString, ACE_RW_Mutex> MAP_MANAGER; - -int -main (int argc, char *argv[]) -{ - if (argc != 4) - cerr << "usage: " << argv[0] << " tablesize file1 file2\n"; - else - { - int total = ACE_OS::atoi (argv[1]); - - if (!freopen (argv[2], "r", stdin)) - ACE_OS::perror (argv[0]), ACE_OS::exit (1); - - MAP_MANAGER hash (total); - - char key[MAX_KEY_LEN]; - - while (gets (key)) // stream ops are just too slow!! - { - ACE_CString string (key); - hash.bind (string, string); - } - - fclose (stdin); - - MAP_MANAGER::ITERATOR iterator (hash); - - for (MAP_MANAGER::ENTRY *entry = 0; - iterator.next (entry) != 0; - iterator.advance ()) - ACE_DEBUG ((LM_DEBUG, "%s %s\n", - entry->ext_id_.fast_rep (), - entry->int_id_.fast_rep ())); - - if (!freopen (argv[3], "r", stdin)) - perror (argv[0]), exit (1); - - while (gets (key)) - { - ACE_CString name (key); - ACE_CString value; - assert (hash.find (name, value) != -1); - assert (name == value); - } - - if (!freopen (argv[3], "r", stdin)) - perror (argv[0]), exit (1); - - while (gets (key)) - { - ACE_CString string (key); - assert (hash.unbind (string) != -1); - } - - assert (hash.current_size () == 0); - - fclose (stdin); - } - - return 0; -} diff --git a/examples/Mem_Map/IO-tests/IO_Test.cpp b/examples/Mem_Map/IO-tests/IO_Test.cpp deleted file mode 100644 index 267da14428a..00000000000 --- a/examples/Mem_Map/IO-tests/IO_Test.cpp +++ /dev/null @@ -1,189 +0,0 @@ -// $Id$ - -#include "ace/OS.h" -#include "ace/Mem_Map.h" -#include "IO_Test.h" - -IO_Test::IO_Test (const char *name, ACE_Profile_Timer &tm) - : name_ (name), tm_ (tm) -{ -} - -const char * -IO_Test::name (void) -{ - return this->name_; -} - -Slow_Read_Write_Test::Slow_Read_Write_Test (char *name, ACE_Profile_Timer &tm) - : IO_Test (name, tm) -{ -} - -int -Slow_Read_Write_Test::run_test (int iterations, FILE *input_fp, FILE *output_fp) -{ - int ifd = fileno (input_fp); - int ofd = fileno (output_fp); - - this->tm_.start (); - - while (--iterations >= 0) - { - char c; - - while (ACE_OS::read (ifd, &c, sizeof c) > 0) - ::write (ofd, &c, sizeof c); - - ACE_OS::lseek (ifd, 0, SEEK_SET); - ACE_OS::lseek (ofd, 0, SEEK_SET); - } - - this->tm_.stop (); - return 0; -} - -Stdio_Test::Stdio_Test (char *name, ACE_Profile_Timer &tm) - : IO_Test (name, tm) -{ -} - -int -Stdio_Test::run_test (int iterations, FILE *input_fp, FILE *output_fp) -{ - this->tm_.start (); - - while (--iterations >= 0) - { - int c; - - while ((c = getc (input_fp)) != EOF) - putc (c, output_fp); - - ACE_OS::rewind (input_fp); - ACE_OS::rewind (output_fp); - } - this->tm_.stop (); - return 0; -} - -Block_Read_Write_Test::Block_Read_Write_Test (char *name, ACE_Profile_Timer &tm) - : IO_Test (name, tm) -{ -} - -int -Block_Read_Write_Test::run_test (int iterations, FILE *input_fp, FILE *output_fp) -{ - int ifd = fileno (input_fp); - int ofd = fileno (output_fp); - - this->tm_.start (); - - while (--iterations >= 0) - { - char buf[BUFSIZ]; - ssize_t n; - - while ((n = ACE_OS::read (ifd, buf, sizeof buf)) > 0) - ::write (ofd, buf, n); - - ACE_OS::lseek (ifd, 0, SEEK_SET); - ACE_OS::lseek (ofd, 0, SEEK_SET); - } - - this->tm_.stop (); - return 0; -} - -Block_Fread_Fwrite_Test::Block_Fread_Fwrite_Test (char *name, ACE_Profile_Timer &tm) - : IO_Test (name, tm) -{ -} - -int -Block_Fread_Fwrite_Test::run_test (int iterations, FILE *input_fp, FILE *output_fp) -{ - this->tm_.start (); - - while (--iterations >= 0) - { - char buf[BUFSIZ]; - ssize_t n; - - while ((n = ACE_OS::fread (buf, 1, sizeof buf, input_fp)) != 0) - ::fwrite (buf, n, 1, output_fp); - - ACE_OS::rewind (input_fp); - ACE_OS::rewind (output_fp); - } - - this->tm_.stop (); - return 0; -} - -Mmap1_Test::Mmap1_Test (char *name, ACE_Profile_Timer &tm) - : IO_Test (name, tm) -{ -} - -int -Mmap1_Test::run_test (int iterations, FILE *input_fp, FILE *output_fp) -{ - ACE_Mem_Map map_input (fileno (input_fp)); - void *src = 0; - - if (map_input (src) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%s", this->name ()), -1); - else - { - this->tm_.start (); - - while (--iterations >= 0) - { - if (ACE_OS::write (fileno (output_fp), src, map_input.size ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%s", this->name ()), -1); - ACE_OS::lseek (fileno (output_fp), 0, SEEK_SET); - } - - this->tm_.stop (); - } - - if (map_input.unmap () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%s", this->name ()), -1); - else - return 0; -} - -Mmap2_Test::Mmap2_Test (char *name, ACE_Profile_Timer &tm) - : IO_Test (name, tm) -{ -} - -int -Mmap2_Test::run_test (int iterations, FILE *input_fp, FILE *output_fp) -{ - ACE_Mem_Map map_input (fileno (input_fp)); - int size = map_input.size (); - ACE_Mem_Map map_output (fileno (output_fp), size, PROT_WRITE, MAP_SHARED); - void *src = 0; - void *dst = 0; - - if (map_input (src) == -1 || map_output (dst) == -1) - return -1; - else - { - this->tm_.start (); - - while (--iterations >= 0) - ACE_OS::memcpy (dst, src, size); - - this->tm_.stop (); - } - - if (map_input.unmap () == -1 - || map_output.unmap () == -1) - return -1; - else - return 0; -} diff --git a/examples/Mem_Map/IO-tests/IO_Test.h b/examples/Mem_Map/IO-tests/IO_Test.h deleted file mode 100644 index 659a85eec15..00000000000 --- a/examples/Mem_Map/IO-tests/IO_Test.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Class hierarchy for the File I/O tests. */ - -#include "ace/Profile_Timer.h" - -/* Base class for all the File I/O tests. */ - -class IO_Test -{ -public: - // Initialize the test name - IO_Test (const char *name, ACE_Profile_Timer &tm); - - // Return the name of the test - const char *name (void); - - // Execute the IO test (note this is a pure virtual function...) - virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp) = 0; - -protected: - // Name of the test - const char *name_; - - // Reference to a timer - ACE_Profile_Timer &tm_; -}; - -class Slow_Read_Write_Test : public IO_Test -{ -public: - Slow_Read_Write_Test (char *name, ACE_Profile_Timer &tm); - virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp); -}; - -class Stdio_Test : public IO_Test -{ -public: - Stdio_Test (char *name, ACE_Profile_Timer &tm); - virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp); -}; - -class Block_Read_Write_Test : public IO_Test -{ -public: - Block_Read_Write_Test (char *name, ACE_Profile_Timer &tm); - virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp); -}; - -class Block_Fread_Fwrite_Test : public IO_Test -{ -public: - Block_Fread_Fwrite_Test (char *name, ACE_Profile_Timer &tm); - virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp); -}; - -class Mmap1_Test : public IO_Test -{ -public: - Mmap1_Test (char *name, ACE_Profile_Timer &tm); - virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp); -}; - -class Mmap2_Test : public IO_Test -{ -public: - Mmap2_Test (char *name, ACE_Profile_Timer &tm); - virtual int run_test (int iterations, FILE *input_fp, FILE *output_fp); -}; - diff --git a/examples/Mem_Map/IO-tests/Makefile b/examples/Mem_Map/IO-tests/Makefile deleted file mode 100644 index eef7dc949e1..00000000000 --- a/examples/Mem_Map/IO-tests/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for Mem_Map IO tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_io - -FILES = IO_Test - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LDLIBS = $(addprefix .shobj/,$(SHOBJ)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/IO_Test.o .shobj/IO_Test.so: IO_Test.cpp \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/Mem_Map.h IO_Test.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Mem_Map/IO-tests/test_io.cpp b/examples/Mem_Map/IO-tests/test_io.cpp deleted file mode 100644 index e9ba03fb394..00000000000 --- a/examples/Mem_Map/IO-tests/test_io.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// $Id$ - -// Test program for different methods of copying files. - -#include "ace/OS.h" -#include "ace/Profile_Timer.h" -#include "ace/Get_Opt.h" -#include "ace/Signal.h" -#include "IO_Test.h" - -// Name of program. -static const char *program_name; - -// Name of default input file. -static char *input_filename = "/usr/dict/words"; - -// Name of default output file. -static char *output_filename = "/tmp/foo"; - -// Check if removing output file upon completion... -static int remove_output = 1; - -// Count of the number of iterations to run the tests. -static int iteration_count = 100; - -// Profiler used to keep track of file I/O time. -static ACE_Profile_Timer tm; - -// Explain usage and exit. - -static void -print_usage_and_die (void) -{ - cerr << "usage: " - << program_name - << " [-i input_file] [-o output_file] [-n iteration_count] [-r]\n"; - ACE_OS::exit (1); -} - -// Clean up the output file on exit from a signal. - -extern "C" void -cleanup (int = 0) -{ - if (remove_output) - ACE_OS::unlink (output_filename); - ACE_OS::exit (0); -} - -// Parse the command-line arguments and set options. - -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "i:n:o:r"); - - for (int c; ((c = get_opt ()) != -1); ) - switch (c) - { - case 'i': - input_filename = get_opt.optarg; - break; - case 'n': - iteration_count = ACE_OS::atoi (get_opt.optarg); - break; - case 'o': - output_filename = get_opt.optarg; - break; - case 'r': - remove_output = 0; - break; - default: - print_usage_and_die (); - break; - } -} - -// Vector of pointers to derived classes that inherit from IO_Test -// base class. - -static IO_Test *test_vector[100]; - -static void -run_tests (int iterations, FILE *input_fp, FILE *output_fp) -{ - // If HP/UX didn't suck so badly we could initialize in the global - // scope... - int i = 0; - - ACE_NEW (test_vector[i++], Stdio_Test ("Stdio_Test", tm)); - ACE_NEW (test_vector[i++], Block_Fread_Fwrite_Test ("Block_Fread_Fwrite_Test", tm)); - ACE_NEW (test_vector[i++], Block_Read_Write_Test ("Block_Read_Write_Test", tm)); - ACE_NEW (test_vector[i++], Mmap1_Test ("Mmap1_Test", tm)); - ACE_NEW (test_vector[i++], Mmap2_Test ("Mmap2_Test", tm)); - ACE_NEW (test_vector[i++], Slow_Read_Write_Test ("Slow_Read_Write_Test", tm)); - - test_vector[i] = (IO_Test *) 0; - - for (i = 0; test_vector[i] != 0; i++) - { - if (ACE_OS::ftruncate (fileno (output_fp), 0) == -1) - ACE_ERROR ((LM_ERROR, "%s\n", "ftruncate")); - - cerr << "--------------------\n" - << "starting " << test_vector[i]->name () << " for " << iterations - << " iteration(s):\n"; - - test_vector[i]->run_test (iterations, input_fp, output_fp); - - ACE_Profile_Timer::ACE_Elapsed_Time et; - tm.elapsed_time (et); - - cerr << "wallclock time = " << et.real_time - << ", user time = " << et.user_time - << ", system time = " << et.system_time << endl; - - delete test_vector[i]; - } - - cerr << "--------------------\n"; -} - -int -main (int argc, char *argv[]) -{ -#if defined (ACE_WIN32) - char delim = '\\'; -#else - char delim = '/'; -#endif /* ACE_WIN32 */ - program_name = ACE::basename (argv[0], delim); - parse_args (argc, argv); - - ACE_Sig_Action sa ((ACE_SignalHandler) cleanup, SIGINT); - ACE_UNUSED_ARG (sa); - - FILE *input_fp = ACE_OS::fopen (input_filename, "r"); - FILE *output_fp = ACE_OS::fopen (output_filename, "w+"); - - if (input_fp == 0) - ACE_ERROR_RETURN ((LM_ERROR, "%s\n", "input_filename"), -1); - - if (output_fp == 0) - ACE_ERROR_RETURN ((LM_ERROR, "%s\n", "output_filename"), -1); - - ACE_OS::unlink (output_filename); - - run_tests (iteration_count, input_fp, output_fp); - - if (ACE_OS::fclose (input_fp) == -1 - || ACE_OS::fclose (output_fp) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%s\n", "fclose"), -1); - - cleanup (); - return 0; -} diff --git a/examples/Mem_Map/Makefile b/examples/Mem_Map/Makefile deleted file mode 100644 index 3c5d5f2d800..00000000000 --- a/examples/Mem_Map/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Mem_Map test directory -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = IO-tests \ - file-reverse - -#---------------------------------------------------------------------------- -# macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/examples/Mem_Map/file-reverse/Makefile b/examples/Mem_Map/file-reverse/Makefile deleted file mode 100644 index 0b470a11b27..00000000000 --- a/examples/Mem_Map/file-reverse/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for Mem_Map file reverse test -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = file-reverse - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -INSTALL = - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/file-reverse.o .shobj/file-reverse.so: file-reverse.cpp \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Mem_Map/file-reverse/file-reverse.cpp b/examples/Mem_Map/file-reverse/file-reverse.cpp deleted file mode 100644 index 0bee6612628..00000000000 --- a/examples/Mem_Map/file-reverse/file-reverse.cpp +++ /dev/null @@ -1,44 +0,0 @@ - -// $Id$ - -#include "ace/Mem_Map.h" - -static void -putline (const char *s) -{ - while (putchar (*s++) != '\n') - continue; -} - -static void -print_array_in_reverse (char *array, int size) -{ - size--; - - if (array[size] == '\0') - array[size] = '\n'; - - while (--size >= 0) - if (array[size] == '\n') - putline (array + size + 1); - - putline (array); -} - -int -main (int argc, char **argv) -{ - ACE_LOG_MSG->open (argv[0]); - - if (argc != 2) - ACE_ERROR_RETURN ((LM_ERROR, "usage: %n file\n%a"), -1); - - ACE_Mem_Map mmap; - - if (mmap.map (argv[1]) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%n: %p\n%a", "mmap"), -1); - - print_array_in_reverse ((char *) mmap.addr (), mmap.size ()); - - return 0; -} diff --git a/examples/Misc/Makefile b/examples/Misc/Makefile deleted file mode 100644 index e53430e7a88..00000000000 --- a/examples/Misc/Makefile +++ /dev/null @@ -1,273 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for testing the miscellaneous ACE components. -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_dump \ - test_get_opt \ - test_profile_timer \ - test_read_buffer \ - test_sstring \ - test_trace \ - test_XtReactor1 \ - test_XtReactor2 - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/test_dump.o .shobj/test_dump.so: test_dump.cpp \ - $(WRAPPER_ROOT)/ace/Dump.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Dump_T.h -.obj/test_get_opt.o .shobj/test_get_opt.so: test_get_opt.cpp \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i -.obj/test_profile_timer.o .shobj/test_profile_timer.so: test_profile_timer.cpp \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h -.obj/test_read_buffer.o .shobj/test_read_buffer.so: test_read_buffer.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Read_Buffer.h \ - $(WRAPPER_ROOT)/ace/Read_Buffer.i -.obj/test_sstring.o .shobj/test_sstring.so: test_sstring.cpp \ - $(WRAPPER_ROOT)/ace/SString.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i -.obj/test_trace.o .shobj/test_trace.so: test_trace.cpp \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Set.h -.obj/test_XtReactor1.o .shobj/test_XtReactor1.so: test_XtReactor1.cpp \ - $(WRAPPER_ROOT)/ace/XtReactor.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h -.obj/test_XtReactor2.o .shobj/test_XtReactor2.so: test_XtReactor2.cpp \ - $(WRAPPER_ROOT)/ace/XtReactor.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Misc/test_XtReactor1.cpp b/examples/Misc/test_XtReactor1.cpp deleted file mode 100644 index 6c1647ec4f6..00000000000 --- a/examples/Misc/test_XtReactor1.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// The following is another test that exercises the Eric C. Newton's -// $Id$ - -// <ecn@clark.net> XtReactor implementation. - - -#include "ace/XtReactor.h" -#include "ace/Message_Block.h" - -#if defined (ACE_HAS_XT) -#define String XtString -#include <Xm/PushB.h> - -class Stdout : public ACE_Event_Handler -{ -public: - Stdout (ACE_Reactor * r) - : reactor_ (r), msg_ (1000000) - { - int flags; - flags = ACE_OS::fcntl (ACE_STDOUT, F_GETFL); - - if (flags != -1 - && ACE_OS::fcntl (ACE_STDOUT, F_SETFL, flags | O_NONBLOCK) != -1) - return; - else - ACE_DEBUG ((LM_DEBUG, "Unable to set stdout to non-block.")); - } - - ACE_HANDLE get_handle (void) const { return ACE_STDOUT; } - - int handle_output (ACE_HANDLE) - { - char *s = msg_.rd_ptr (); - - if (ACE_OS::write (ACE_STDOUT, s, 1)==1) - { - ACE_DEBUG ((LM_DEBUG, "wrote output '%d'\n", (int) *s)); - msg_.rd_ptr (1); - } - - if (msg_.length () == 0) - { - reactor_->remove_handler (this, ACE_Event_Handler::WRITE_MASK); - msg_.rd_ptr (msg_.base ()); - msg_.wr_ptr (msg_.base ()); - } - return 0; - } - - void put (char c) - { - if (msg_.length () == 0) - reactor_->register_handler (this, ACE_Event_Handler::WRITE_MASK); - - if (msg_.wr_ptr () < msg_.end ()) - { - *msg_.wr_ptr () = c; - msg_.wr_ptr (1); - } - else - ACE_DEBUG ((LM_DEBUG, "Oops... data falling off the end of the buffer!\n")); - } - -private: - ACE_Reactor *reactor_; - ACE_Message_Block msg_; -}; - -class Stdin : public ACE_Event_Handler -{ -public: - Stdin (Stdout *out) - : out_ (out) {} - - ACE_HANDLE get_handle () const { return ACE_STDIN; } - - int handle_input (ACE_HANDLE) - { - char c; - - if (ACE_OS::read (ACE_STDIN, &c, 1) == 1) - out_->put (c); - - return 0; - } - - int handle_timeout (const ACE_Time_Value &tv, const void *) - { - ACE_DEBUG ((LM_DEBUG, "Timeout! %f\n", (double) (tv.msec ()/1000.))); - return 0; - } - -private: - Stdout *out_; -}; - -static void -ActivateCB (Widget, XtPointer, XtPointer) -{ - ACE_DEBUG ((LM_DEBUG, "Button pushed!\n")); -} - -int -main (int argc, char**argv) -{ - // The worlds most useless user interface - Widget top_level = XtVaAppInitialize (NULL, "buttontest", NULL, 0, - &argc, argv, NULL, NULL); - Widget button = XmCreatePushButton (top_level, "change", 0, 0); - XtManageChild (button); - XtAddCallback (button, XmNactivateCallback, ActivateCB, NULL); - - // A reactor beastie - ACE_XtReactor reactor (XtWidgetToApplicationContext (top_level)); - - // Print a message when data is recv'd on stdin... - ACE_Event_Handler *stdin_ = new Stdin (new Stdout (&reactor)); - reactor.register_handler (stdin_, ACE_Event_Handler::READ_MASK); - - // Print a message every 10 seconds. - reactor.schedule_timer (stdin_, 0, ACE_Time_Value (10), ACE_Time_Value (10)); - - // Show the top_level widget. - XtRealizeWidget (top_level); - - // Demonstrate Reactor/Xt event loop unification. - XtAppMainLoop (XtWidgetToApplicationContext (top_level)); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "XT not configured for this platform\n")); - return 0; -} -#endif /* ACE_HAS_XT */ diff --git a/examples/Misc/test_XtReactor2.cpp b/examples/Misc/test_XtReactor2.cpp deleted file mode 100644 index 31fab787b26..00000000000 --- a/examples/Misc/test_XtReactor2.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// The following test exercises the Eric C. Newton's <ecn@clark.net> -// $Id$ - -// XtReactor implementation. - - -#include "ace/XtReactor.h" -#include "ace/Message_Block.h" - -#if defined (ACE_HAS_XT) -#define String XtString -#include <Xm/PushB.h> - -class Stdin : public ACE_Event_Handler -{ -public: - ACE_HANDLE get_handle (void) const { return ACE_STDIN; } - - int handle_input (ACE_HANDLE fd) - { - char c; - if (read (0, &c, 1)==1) - printf ("Got input '%d'\n", (int)c); - return 0; - } - - int handle_timeout (const ACE_Time_Value &tv, const void *arg) - { - printf ("Timeout! %f\n", (double) (tv.msec ()/1000.)); - return 0; - } -}; - -void ActivateCB (Widget w, XtPointer, XtPointer) -{ - printf ("Button pushed!\n"); -} - -int main (int argc, char**argv) -{ - // The worlds most useless user interface - Widget top_level = XtVaAppInitialize (NULL, "buttontest", NULL, 0, - &argc, argv, NULL, NULL); - Widget button = XmCreatePushButton (top_level, "change", 0, 0); - XtManageChild (button); - XtAddCallback (button, XmNactivateCallback, ActivateCB, NULL); - - // A reactor beastie. - ACE_XtReactor reactor (XtWidgetToApplicationContext (top_level)); - - // Print a message when data is recv'd on stdin... - ACE_Event_Handler * stdin_ = new Stdin; - reactor.register_handler (stdin_, ACE_Event_Handler::READ_MASK); - - // Print a message every 10 seconds - reactor.schedule_timer (stdin_, 0, ACE_Time_Value (10), ACE_Time_Value (10)); - - // Show the top_level widget - XtRealizeWidget (top_level); - - // Demonstrate Reactor/Xt event loop unification: - XtAppMainLoop (XtWidgetToApplicationContext (top_level)); -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "XT not configured for this platform\n")); - return 0; -} -#endif /* ACE_HAS_XT */ diff --git a/examples/Misc/test_dump.cpp b/examples/Misc/test_dump.cpp deleted file mode 100644 index 5b67488b405..00000000000 --- a/examples/Misc/test_dump.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// The following code illustrates how the ACE_Dumpable mechanisms are -// $Id$ - -// integrated into ACE components like the SOCK_Acceptor and -// SOCK_Stream. - -#include "ace/Dump.h" - -class SOCK -{ -public: - SOCK (void) { ACE_REGISTER_OBJECT (SOCK); } - ~SOCK (void) { ACE_REMOVE_OBJECT; } - - void dump (void) const { - cerr << "hello from SOCK = " << (u_long) this << endl; - } - - // ... -}; - -class SOCK_Acceptor : public SOCK -{ -public: - SOCK_Acceptor (void) { ACE_REGISTER_OBJECT (SOCK_Acceptor); } - ~SOCK_Acceptor (void) { ACE_REMOVE_OBJECT; } - - void dump (void) const { - cerr << "hello from SOCK_Acceptor = " << (u_long) this << endl; - } - - // ... -}; - -class SOCK_Stream : public SOCK -{ -public: - SOCK_Stream (void) { ACE_REGISTER_OBJECT (SOCK_Stream); } - ~SOCK_Stream (void) { ACE_REMOVE_OBJECT; } - - void dump (void) const { - cerr << "hello from SOCK_Stream = " << (u_long) this << endl; - } - - // ... -}; - -int -main (void) -{ - SOCK outer_sock; - // Note that the SOCK superclass is *not* printed. - SOCK_Stream outer_stream; - SOCK_Acceptor outer_acceptor; - ACE_ODB::instance ()->dump_objects (); - { - SOCK inner_sock; - // Note that the SOCK superclass is *not* printed. - SOCK_Stream inner_stream; - SOCK_Acceptor inner_acceptor; - ACE_ODB::instance ()->dump_objects (); - } - ACE_ODB::instance ()->dump_objects (); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Dumpable_Adapter<SOCK_Stream>; -template class ACE_Dumpable_Adapter<SOCK>; -template class ACE_Dumpable_Adapter<SOCK_Acceptor>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Misc/test_get_opt.cpp b/examples/Misc/test_get_opt.cpp deleted file mode 100644 index c68928b6e57..00000000000 --- a/examples/Misc/test_get_opt.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// $Id$ - -// Test the ACE_Get_Opt class. - -#include "ace/Get_Opt.h" - - -int -main (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "ab:cd:ef:gh:"); - int c; - - while ((c = get_opt ()) != EOF) - switch (c) - { - case 'a': - ACE_DEBUG ((LM_DEBUG, "got a\n")); - break; - case 'b': - ACE_DEBUG ((LM_DEBUG, "got b with arg %s\n", get_opt.optarg)); - break; - case 'c': - ACE_DEBUG ((LM_DEBUG, "got c\n")); - break; - case 'd': - ACE_DEBUG ((LM_DEBUG, "got d with arg %s\n", get_opt.optarg)); - break; - case 'e': - ACE_DEBUG ((LM_DEBUG, "got e\n")); - break; - case 'f': - ACE_DEBUG ((LM_DEBUG, "got f with arg %s\n", get_opt.optarg)); - break; - case 'g': - ACE_DEBUG ((LM_DEBUG, "got g\n")); - break; - case 'h': - ACE_DEBUG ((LM_DEBUG, "got h with arg %s\n", get_opt.optarg)); - break; - default: - ACE_DEBUG ((LM_DEBUG, "got %c, which is unrecognized!\n", c)); - break; - } - - for (int i = get_opt.optind; i < argc; i++) - ACE_DEBUG ((LM_DEBUG, "optind = %d, argv[optind] = %s\n", - i, argv[i])); - - return 0; -} diff --git a/examples/Misc/test_profile_timer.cpp b/examples/Misc/test_profile_timer.cpp deleted file mode 100644 index 366876a42a5..00000000000 --- a/examples/Misc/test_profile_timer.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "ace/Profile_Timer.h" -// $Id$ - - - -static const int DEFAULT_ITERATIONS = 100000000; - -int -main (int argc, char *argv[]) -{ - ACE_Profile_Timer timer; - int iterations = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_ITERATIONS; - - timer.start (); - - for (int i = 0; i < iterations; i++) - ACE_OS::getpid (); - - timer.stop (); - - ACE_Profile_Timer::ACE_Elapsed_Time et; - - timer.elapsed_time (et); - - ACE_DEBUG ((LM_DEBUG, "iterations = %d\n", iterations)); - ACE_DEBUG ((LM_DEBUG, "real time = %f secs, user time = %f secs, system time = %f secs\n", - et.real_time, et.user_time, et.system_time)); - - ACE_DEBUG ((LM_DEBUG, "time per call = %f usecs\n", - (et.real_time / double (iterations)) * 1000000)); - return 0; -} - diff --git a/examples/Misc/test_read_buffer.cpp b/examples/Misc/test_read_buffer.cpp deleted file mode 100644 index c661e4f1159..00000000000 --- a/examples/Misc/test_read_buffer.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "ace/Service_Config.h" -// $Id$ - -#include "ace/Read_Buffer.h" - -int -main (int argc, char *argv[]) -{ - int handle = argc > 1 ? ::open (argv[1], O_RDONLY) : 0; - int term = argc > 2 ? ::atoi (argv[2]) : EOF; - int search = argc > 3 ? ::atoi (argv[3]) : '\n'; - int replace = argc > 4 ? ::atoi (argv[4]) : '\0'; - - ACE_Read_Buffer rb (handle); - - char *buf; - - while ((buf = rb.read (term, search, replace)) != 0) - { - ::write (1, buf, rb.size ()); - ACE_Service_Config::alloc ()->free (buf); - } - return 0; -} - -#if 0 -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Stream<ACE_Null_Mutex, ACE_Null_Condition_Mutex>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ -#endif diff --git a/examples/Misc/test_sstring.cpp b/examples/Misc/test_sstring.cpp deleted file mode 100644 index 55e797c3851..00000000000 --- a/examples/Misc/test_sstring.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// $Id$ - -#include "ace/SString.h" - -int -main (int, char *[]) -{ - ACE_CString s1 ("hello"); - ACE_CString s2 ("world"); - ACE_CString s3 ("el"); - ACE_WString s4 ("hello"); - ACE_WString s5 ("world"); - ACE_WString s6 ("el"); - - ACE_ASSERT (s1 != s2); - ACE_ASSERT (s1.strstr (s2) == -1); - ACE_ASSERT (s1.strstr (s2) == -1); - ACE_ASSERT (s1.strstr (s3)); - ACE_ASSERT (s4.strstr (s5) == -1); - ACE_ASSERT (s5.strstr (s6)); - return 0; -} diff --git a/examples/Misc/test_trace.cpp b/examples/Misc/test_trace.cpp deleted file mode 100644 index 0080c6e9e04..00000000000 --- a/examples/Misc/test_trace.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// Enable tracing -// $Id$ - -#define ACE_NTRACE 0 - -#include "ace/Thread.h" -#include "ace/Signal.h" - -static void -foo (int max_depth) -{ - ACE_Trace _ ("void foo (void)", __LINE__, __FILE__); - - if (max_depth > 0) - foo (max_depth - 1); - // Destructor automatically called. -} - -int -main (int argc, char *argv[]) -{ - const int MAX_DEPTH = argc == 1 ? 10 : atoi (argv[1]); - - if (argc > 2) - ACE_Trace::set_nesting_indent (ACE_OS::atoi (argv[2])); - - ACE_Trace _ ("int main (int argc, char *argv[])", __LINE__, __FILE__); - - // The following won't work on MVS OpenEdition... - ACE_Sig_Action sig1 ((ACE_SignalHandler) ACE_Trace::start_tracing, SIGUSR1); - ACE_UNUSED_ARG (sig1); - ACE_Sig_Action sig2 ((ACE_SignalHandler) ACE_Trace::stop_tracing, SIGUSR2); - ACE_UNUSED_ARG (sig2); - -#if defined (ACE_MT_SAFE) - int n_threads = argc > 3 ? ACE_OS::atoi (argv[3]) : 4; - - if (ACE_Thread::spawn_n (n_threads, ACE_THR_FUNC (foo), - (void *) MAX_DEPTH, - THR_BOUND | THR_DETACHED) != n_threads) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), -1); - ACE_OS::thr_exit (0); -#else - for (;;) - foo (MAX_DEPTH); -#endif /* ACE_MT_SAFE */ - - // Destructor automatically called. - return 0; -} - diff --git a/examples/Naming/Makefile b/examples/Naming/Makefile deleted file mode 100644 index bdc63861618..00000000000 --- a/examples/Naming/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for tests of the Shared_Malloc wrappers -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_non_existent \ - test_writers \ - test_multiple_contexts - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LDLIBS = $(addprefix .shobj/,$(SHOBJ)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Naming/test_multiple_contexts.cpp b/examples/Naming/test_multiple_contexts.cpp deleted file mode 100644 index 2b6c9d8468d..00000000000 --- a/examples/Naming/test_multiple_contexts.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "ace/Naming_Context.h" - -int main () -{ - - static u_long ACE_DEFAULT_BASE_ADDR_1 = (1 * 64 * 1024 * 1024); - static u_long ACE_DEFAULT_BASE_ADDR_2 = (2 * 64 * 1024 * 1024); - - int i; - - ACE_Naming_Context * ns_ptr = new ACE_Naming_Context(); - ACE_Name_Options *name_options = ns_ptr->name_options (); - - ACE_Naming_Context * ns_ptr1 = new ACE_Naming_Context(); - ACE_Name_Options *name_options1 = ns_ptr1->name_options (); - - char address_arg1[BUFSIZ]; - char address_arg2[BUFSIZ]; - ACE_OS::sprintf (address_arg1, "-b%d", ACE_DEFAULT_BASE_ADDR_1); - - char * m_argv[] = {"MyName1", - "-cNODE_LOCAL" , - address_arg1, - NULL}; - int m_argc = sizeof ( m_argv ) / sizeof ( char * ) -1; - - ACE_OS::sprintf (address_arg2, "-b%d", ACE_DEFAULT_BASE_ADDR_2); - char * n_argv[] = {"MyName2", - "-cNODE_LOCAL" , - address_arg2, - NULL}; - int n_argc = sizeof ( n_argv ) / sizeof ( char * ) -1; - - name_options->parse_args(m_argc,m_argv); - i = ns_ptr->open (ACE_Naming_Context::NODE_LOCAL); - cout << ::getpid() << ": opened with " << i << endl; - if ( i != 0 ) return -1; - - name_options1->parse_args(n_argc,n_argv); - i = ns_ptr1->open (ACE_Naming_Context::NODE_LOCAL); - cout << ::getpid() << ": 1 opened with " << i << endl; - if ( i != 0 ) return -1; - - return 0; -} diff --git a/examples/Naming/test_multiple_contexts.mak b/examples/Naming/test_multiple_contexts.mak deleted file mode 100644 index 17a875231d1..00000000000 --- a/examples/Naming/test_multiple_contexts.mak +++ /dev/null @@ -1,275 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=test_multiple_contexts - Win32 Debug -!MESSAGE No configuration specified. Defaulting to test_multiple_contexts -\ - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "test_multiple_contexts - Win32 Release" && "$(CFG)" !=\ - "test_multiple_contexts - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "test_multiple_contexts.mak"\ - CFG="test_multiple_contexts - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "test_multiple_contexts - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "test_multiple_contexts - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "test_multiple_contexts - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_multiple_contexts.exe" - -CLEAN : - -@erase ".\test_multiple_contexts.exe" - -@erase ".\test_multiple_contexts.obj" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"test_multiple_contexts.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_multiple_contexts.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/test_multiple_contexts.pdb" /machine:I386\ - /out:"$(OUTDIR)/test_multiple_contexts.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_multiple_contexts.obj" - -"$(OUTDIR)\test_multiple_contexts.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "test_multiple_contexts - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_multiple_contexts.exe" - -CLEAN : - -@erase ".\test_multiple_contexts.exe" - -@erase ".\test_multiple_contexts.obj" - -@erase ".\test_multiple_contexts.ilk" - -@erase ".\test_multiple_contexts.pdb" - -@erase ".\vc40.pdb" - -@erase ".\vc40.idb" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /Fp"test_multiple_contexts.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_multiple_contexts.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/test_multiple_contexts.pdb" /debug /machine:I386\ - /out:"$(OUTDIR)/test_multiple_contexts.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_multiple_contexts.obj" - -"$(OUTDIR)\test_multiple_contexts.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx.obj: - $(CPP) $(CPP_PROJ) $< - -.c.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "test_multiple_contexts - Win32 Release" -# Name "test_multiple_contexts - Win32 Debug" - -!IF "$(CFG)" == "test_multiple_contexts - Win32 Release" - -!ELSEIF "$(CFG)" == "test_multiple_contexts - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\test_multiple_contexts.cpp -DEP_CPP_TEST_=\ - {$(INCLUDE)}"\ace\Naming_Context.h"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\SString.h"\ - {$(INCLUDE)}"\ace\Set.h"\ - {$(INCLUDE)}"\ace\Service_Object.h"\ - {$(INCLUDE)}"\ace\Name_Proxy.h"\ - {$(INCLUDE)}"\ace\Name_Space.h"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\ace\ACE.i"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\sys\types.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\timeb.h"\ - {$(INCLUDE)}"\bstring.h"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Time_Value.i"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\SString.i"\ - {$(INCLUDE)}"\ace\Set.i"\ - {$(INCLUDE)}"\ace\Set.cpp"\ - {$(INCLUDE)}"\ace\Shared_Object.h"\ - {$(INCLUDE)}"\ace\Event_Handler.h"\ - {$(INCLUDE)}"\ace\Service_Object.i"\ - {$(INCLUDE)}"\ace\Shared_Object.i"\ - {$(INCLUDE)}"\ace\Event_Handler.i"\ - {$(INCLUDE)}"\ace\INET_Addr.h"\ - {$(INCLUDE)}"\ace\SOCK_Connector.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.h"\ - {$(INCLUDE)}"\ace\Service_Config.h"\ - {$(INCLUDE)}"\ace\Synch_Options.h"\ - {$(INCLUDE)}"\ace\Name_Request_Reply.h"\ - {$(INCLUDE)}"\ace\Addr.h"\ - {$(INCLUDE)}"\ace\INET_Addr.i"\ - {$(INCLUDE)}"\ace\Addr.i"\ - {$(INCLUDE)}"\ace\SOCK_Connector.i"\ - {$(INCLUDE)}"\ace\SOCK_IO.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.i"\ - {$(INCLUDE)}"\ace\SOCK.h"\ - {$(INCLUDE)}"\ace\SOCK_IO.i"\ - {$(INCLUDE)}"\ace\IPC_SAP.h"\ - {$(INCLUDE)}"\ace\SOCK.i"\ - {$(INCLUDE)}"\ace\IPC_SAP.i"\ - {$(INCLUDE)}"\ace\Thread_Manager.h"\ - {$(INCLUDE)}"\ace\Proactor.h"\ - {$(INCLUDE)}"\ace\ReactorEx.h"\ - {$(INCLUDE)}"\ace\Service_Config.i"\ - {$(INCLUDE)}"\ace\Reactor.h"\ - {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\ - {$(INCLUDE)}"\ace\Thread.h"\ - {$(INCLUDE)}"\ace\Synch.h"\ - {$(INCLUDE)}"\ace\Thread_Manager.i"\ - {$(INCLUDE)}"\ace\Thread.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\ - {$(INCLUDE)}"\ace\Synch.i"\ - {$(INCLUDE)}"\ace\Synch_T.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\ - {$(INCLUDE)}"\ace\Synch_T.i"\ - {$(INCLUDE)}"\ace\Synch_T.cpp"\ - {$(INCLUDE)}"\ace\Message_Block.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.h"\ - {$(INCLUDE)}"\ace\Proactor.i"\ - {$(INCLUDE)}"\ace\Malloc.h"\ - {$(INCLUDE)}"\ace\Message_Block.i"\ - {$(INCLUDE)}"\ace\Malloc.i"\ - {$(INCLUDE)}"\ace\Malloc_T.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.h"\ - {$(INCLUDE)}"\ace\Malloc_T.i"\ - {$(INCLUDE)}"\ace\Malloc_T.cpp"\ - {$(INCLUDE)}"\ace\Signal.h"\ - {$(INCLUDE)}"\ace\Mem_Map.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.i"\ - {$(INCLUDE)}"\ace\Signal.i"\ - {$(INCLUDE)}"\ace\Mem_Map.i"\ - {$(INCLUDE)}"\ace\Timer_Queue.i"\ - {$(INCLUDE)}"\ace\Token.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.h"\ - {$(INCLUDE)}"\ace\ReactorEx.i"\ - {$(INCLUDE)}"\ace\Token.i"\ - {$(INCLUDE)}"\ace\Stack.h"\ - {$(INCLUDE)}"\ace\Map_Manager.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.i"\ - {$(INCLUDE)}"\ace\Stack.i"\ - {$(INCLUDE)}"\ace\Stack.cpp"\ - {$(INCLUDE)}"\ace\Map_Manager.i"\ - {$(INCLUDE)}"\ace\Map_Manager.cpp"\ - {$(INCLUDE)}"\ace\Handle_Set.h"\ - {$(INCLUDE)}"\ace\Pipe.h"\ - {$(INCLUDE)}"\ace\Reactor.i"\ - {$(INCLUDE)}"\ace\Handle_Set.i"\ - {$(INCLUDE)}"\ace\Pipe.i"\ - -NODEP_CPP_TEST_=\ - "..\..\STL\mutex.h"\ - "..\..\ace\ace\Sync_T.h"\ - - -"$(INTDIR)\test_multiple_contexts.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/examples/Naming/test_multiple_contexts.mdp b/examples/Naming/test_multiple_contexts.mdp Binary files differdeleted file mode 100644 index 4d2eada1545..00000000000 --- a/examples/Naming/test_multiple_contexts.mdp +++ /dev/null diff --git a/examples/Naming/test_non_existent.cpp b/examples/Naming/test_non_existent.cpp deleted file mode 100644 index 4c43b60fc57..00000000000 --- a/examples/Naming/test_non_existent.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "ace/Naming_Context.h" - -int main () -{ - int i; - - ACE_Naming_Context * ns_ptr = new ACE_Naming_Context(); - ACE_Name_Options *name_options = ns_ptr->name_options (); - -#if defined (ACE_WIN32) - char * m_argv[] = {"MyName","-cNODE_LOCAL" ,"-lC:\\tmp\\namespacedir\\MyName",NULL}; -#else - char * m_argv[] = {"MyName","-cNODE_LOCAL" ,"-l/tmp/foobar.mine",NULL}; -#endif - int m_argc = sizeof ( m_argv ) / sizeof ( char * ) -1; - - name_options->parse_args(m_argc,m_argv); - i = ns_ptr->open (ACE_Naming_Context::NODE_LOCAL); - cout << ::getpid() << ": opened with " << i << endl; - if ( i != 0 ) return -1; - - i = ns_ptr->bind("Key_Value","Val_Value","-"); - - cout << ::getpid() << ": bound with " << i << endl; - - return 0; - -} diff --git a/examples/Naming/test_non_existent.mak b/examples/Naming/test_non_existent.mak deleted file mode 100644 index 9893e14f6d6..00000000000 --- a/examples/Naming/test_non_existent.mak +++ /dev/null @@ -1,274 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=test_non_existent - Win32 Debug -!MESSAGE No configuration specified. Defaulting to test_non_existent - Win32\ - Debug. -!ENDIF - -!IF "$(CFG)" != "test_non_existent - Win32 Release" && "$(CFG)" !=\ - "test_non_existent - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "test_non_existent.mak" CFG="test_non_existent - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "test_non_existent - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "test_non_existent - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "test_non_existent - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_non_existent.exe" - -CLEAN : - -@erase ".\test_non_existent.exe" - -@erase ".\test_non_existent.obj" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"test_non_existent.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_non_existent.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/test_non_existent.pdb" /machine:I386\ - /out:"$(OUTDIR)/test_non_existent.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_non_existent.obj" - -"$(OUTDIR)\test_non_existent.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "test_non_existent - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_non_existent.exe" - -CLEAN : - -@erase ".\test_non_existent.exe" - -@erase ".\test_non_existent.obj" - -@erase ".\test_non_existent.ilk" - -@erase ".\test_non_existent.pdb" - -@erase ".\vc40.pdb" - -@erase ".\vc40.idb" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /Fp"test_non_existent.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_non_existent.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/test_non_existent.pdb" /debug /machine:I386\ - /out:"$(OUTDIR)/test_non_existent.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_non_existent.obj" - -"$(OUTDIR)\test_non_existent.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx.obj: - $(CPP) $(CPP_PROJ) $< - -.c.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "test_non_existent - Win32 Release" -# Name "test_non_existent - Win32 Debug" - -!IF "$(CFG)" == "test_non_existent - Win32 Release" - -!ELSEIF "$(CFG)" == "test_non_existent - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\test_non_existent.cpp -DEP_CPP_TEST_=\ - {$(INCLUDE)}"\ace\Naming_Context.h"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\SString.h"\ - {$(INCLUDE)}"\ace\Set.h"\ - {$(INCLUDE)}"\ace\Service_Object.h"\ - {$(INCLUDE)}"\ace\Name_Proxy.h"\ - {$(INCLUDE)}"\ace\Name_Space.h"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\ace\ACE.i"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\sys\types.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\timeb.h"\ - {$(INCLUDE)}"\bstring.h"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Time_Value.i"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\SString.i"\ - {$(INCLUDE)}"\ace\Set.i"\ - {$(INCLUDE)}"\ace\Set.cpp"\ - {$(INCLUDE)}"\ace\Shared_Object.h"\ - {$(INCLUDE)}"\ace\Event_Handler.h"\ - {$(INCLUDE)}"\ace\Service_Object.i"\ - {$(INCLUDE)}"\ace\Shared_Object.i"\ - {$(INCLUDE)}"\ace\Event_Handler.i"\ - {$(INCLUDE)}"\ace\INET_Addr.h"\ - {$(INCLUDE)}"\ace\SOCK_Connector.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.h"\ - {$(INCLUDE)}"\ace\Service_Config.h"\ - {$(INCLUDE)}"\ace\Synch_Options.h"\ - {$(INCLUDE)}"\ace\Name_Request_Reply.h"\ - {$(INCLUDE)}"\ace\Addr.h"\ - {$(INCLUDE)}"\ace\INET_Addr.i"\ - {$(INCLUDE)}"\ace\Addr.i"\ - {$(INCLUDE)}"\ace\SOCK_Connector.i"\ - {$(INCLUDE)}"\ace\SOCK_IO.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.i"\ - {$(INCLUDE)}"\ace\SOCK.h"\ - {$(INCLUDE)}"\ace\SOCK_IO.i"\ - {$(INCLUDE)}"\ace\IPC_SAP.h"\ - {$(INCLUDE)}"\ace\SOCK.i"\ - {$(INCLUDE)}"\ace\IPC_SAP.i"\ - {$(INCLUDE)}"\ace\Thread_Manager.h"\ - {$(INCLUDE)}"\ace\Proactor.h"\ - {$(INCLUDE)}"\ace\ReactorEx.h"\ - {$(INCLUDE)}"\ace\Service_Config.i"\ - {$(INCLUDE)}"\ace\Reactor.h"\ - {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\ - {$(INCLUDE)}"\ace\Thread.h"\ - {$(INCLUDE)}"\ace\Synch.h"\ - {$(INCLUDE)}"\ace\Thread_Manager.i"\ - {$(INCLUDE)}"\ace\Thread.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\ - {$(INCLUDE)}"\ace\Synch.i"\ - {$(INCLUDE)}"\ace\Synch_T.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\ - {$(INCLUDE)}"\ace\Synch_T.i"\ - {$(INCLUDE)}"\ace\Synch_T.cpp"\ - {$(INCLUDE)}"\ace\Message_Block.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.h"\ - {$(INCLUDE)}"\ace\Proactor.i"\ - {$(INCLUDE)}"\ace\Malloc.h"\ - {$(INCLUDE)}"\ace\Message_Block.i"\ - {$(INCLUDE)}"\ace\Malloc.i"\ - {$(INCLUDE)}"\ace\Malloc_T.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.h"\ - {$(INCLUDE)}"\ace\Malloc_T.i"\ - {$(INCLUDE)}"\ace\Malloc_T.cpp"\ - {$(INCLUDE)}"\ace\Signal.h"\ - {$(INCLUDE)}"\ace\Mem_Map.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.i"\ - {$(INCLUDE)}"\ace\Signal.i"\ - {$(INCLUDE)}"\ace\Mem_Map.i"\ - {$(INCLUDE)}"\ace\Timer_Queue.i"\ - {$(INCLUDE)}"\ace\Token.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.h"\ - {$(INCLUDE)}"\ace\ReactorEx.i"\ - {$(INCLUDE)}"\ace\Token.i"\ - {$(INCLUDE)}"\ace\Stack.h"\ - {$(INCLUDE)}"\ace\Map_Manager.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.i"\ - {$(INCLUDE)}"\ace\Stack.i"\ - {$(INCLUDE)}"\ace\Stack.cpp"\ - {$(INCLUDE)}"\ace\Map_Manager.i"\ - {$(INCLUDE)}"\ace\Map_Manager.cpp"\ - {$(INCLUDE)}"\ace\Handle_Set.h"\ - {$(INCLUDE)}"\ace\Pipe.h"\ - {$(INCLUDE)}"\ace\Reactor.i"\ - {$(INCLUDE)}"\ace\Handle_Set.i"\ - {$(INCLUDE)}"\ace\Pipe.i"\ - -NODEP_CPP_TEST_=\ - "..\..\STL\mutex.h"\ - "..\..\ace\ace\Sync_T.h"\ - - -"$(INTDIR)\test_non_existent.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/examples/Naming/test_non_existent.mdp b/examples/Naming/test_non_existent.mdp Binary files differdeleted file mode 100644 index f888bd6aeaa..00000000000 --- a/examples/Naming/test_non_existent.mdp +++ /dev/null diff --git a/examples/Naming/test_writers.cpp b/examples/Naming/test_writers.cpp deleted file mode 100644 index b00eca955e3..00000000000 --- a/examples/Naming/test_writers.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "ace/Naming_Context.h" - -int main () -{ - int i; - - ACE_Naming_Context * ns_ptr = new ACE_Naming_Context(); - ACE_Name_Options *name_options = ns_ptr->name_options (); - - char * m_argv[] = {"MyName","-cNODE_LOCAL",NULL}; - int m_argc = sizeof ( m_argv ) / sizeof ( char * ) -1; - - name_options->parse_args(m_argc,m_argv); - i = ns_ptr->open (ACE_Naming_Context::NODE_LOCAL); - cout << ::getpid() << ": opened with " << i << endl; - if ( i != 0 ) return -1; - - char Key[128]; - char Val[32]; - char Type[2]; - - Type[0] = '-'; - Type[1] = '\0'; - - for ( int l = 1; l <= 1000 ; l++) { - ::sprintf(Key,"K_%05d_%05d",::getpid(),l); - ::sprintf(Val,"Val%05d",l); - i = ns_ptr->bind(Key,Val,Type); - cout << ::getpid() << ": bind of " << Key << " :" << i << endl; - if ( i != 0 ) { - return -1; - } - - } - - return 0; -} diff --git a/examples/Naming/test_writers.mak b/examples/Naming/test_writers.mak deleted file mode 100644 index 5a26b206344..00000000000 --- a/examples/Naming/test_writers.mak +++ /dev/null @@ -1,273 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=test_writers - Win32 Debug -!MESSAGE No configuration specified. Defaulting to test_writers - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "test_writers - Win32 Release" && "$(CFG)" !=\ - "test_writers - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "test_writers.mak" CFG="test_writers - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "test_writers - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "test_writers - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "test_writers - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_writers.exe" - -CLEAN : - -@erase ".\test_writers.exe" - -@erase ".\test_writers.obj" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"test_writers.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_writers.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/test_writers.pdb" /machine:I386\ - /out:"$(OUTDIR)/test_writers.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_writers.obj" - -"$(OUTDIR)\test_writers.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "test_writers - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_writers.exe" - -CLEAN : - -@erase ".\test_writers.exe" - -@erase ".\test_writers.obj" - -@erase ".\test_writers.ilk" - -@erase ".\test_writers.pdb" - -@erase ".\vc40.pdb" - -@erase ".\vc40.idb" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /Fp"test_writers.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_writers.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/test_writers.pdb" /debug /machine:I386\ - /out:"$(OUTDIR)/test_writers.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_writers.obj" - -"$(OUTDIR)\test_writers.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx.obj: - $(CPP) $(CPP_PROJ) $< - -.c.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "test_writers - Win32 Release" -# Name "test_writers - Win32 Debug" - -!IF "$(CFG)" == "test_writers - Win32 Release" - -!ELSEIF "$(CFG)" == "test_writers - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\test_writers.cpp -DEP_CPP_TEST_=\ - {$(INCLUDE)}"\ace\Naming_Context.h"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\SString.h"\ - {$(INCLUDE)}"\ace\Set.h"\ - {$(INCLUDE)}"\ace\Service_Object.h"\ - {$(INCLUDE)}"\ace\Name_Proxy.h"\ - {$(INCLUDE)}"\ace\Name_Space.h"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\ace\ACE.i"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\sys\types.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\timeb.h"\ - {$(INCLUDE)}"\bstring.h"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Time_Value.i"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\SString.i"\ - {$(INCLUDE)}"\ace\Set.i"\ - {$(INCLUDE)}"\ace\Set.cpp"\ - {$(INCLUDE)}"\ace\Shared_Object.h"\ - {$(INCLUDE)}"\ace\Event_Handler.h"\ - {$(INCLUDE)}"\ace\Service_Object.i"\ - {$(INCLUDE)}"\ace\Shared_Object.i"\ - {$(INCLUDE)}"\ace\Event_Handler.i"\ - {$(INCLUDE)}"\ace\INET_Addr.h"\ - {$(INCLUDE)}"\ace\SOCK_Connector.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.h"\ - {$(INCLUDE)}"\ace\Service_Config.h"\ - {$(INCLUDE)}"\ace\Synch_Options.h"\ - {$(INCLUDE)}"\ace\Name_Request_Reply.h"\ - {$(INCLUDE)}"\ace\Addr.h"\ - {$(INCLUDE)}"\ace\INET_Addr.i"\ - {$(INCLUDE)}"\ace\Addr.i"\ - {$(INCLUDE)}"\ace\SOCK_Connector.i"\ - {$(INCLUDE)}"\ace\SOCK_IO.h"\ - {$(INCLUDE)}"\ace\SOCK_Stream.i"\ - {$(INCLUDE)}"\ace\SOCK.h"\ - {$(INCLUDE)}"\ace\SOCK_IO.i"\ - {$(INCLUDE)}"\ace\IPC_SAP.h"\ - {$(INCLUDE)}"\ace\SOCK.i"\ - {$(INCLUDE)}"\ace\IPC_SAP.i"\ - {$(INCLUDE)}"\ace\Thread_Manager.h"\ - {$(INCLUDE)}"\ace\Proactor.h"\ - {$(INCLUDE)}"\ace\ReactorEx.h"\ - {$(INCLUDE)}"\ace\Service_Config.i"\ - {$(INCLUDE)}"\ace\Reactor.h"\ - {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\ - {$(INCLUDE)}"\ace\Thread.h"\ - {$(INCLUDE)}"\ace\Synch.h"\ - {$(INCLUDE)}"\ace\Thread_Manager.i"\ - {$(INCLUDE)}"\ace\Thread.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\ - {$(INCLUDE)}"\ace\Synch.i"\ - {$(INCLUDE)}"\ace\Synch_T.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\ - {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\ - {$(INCLUDE)}"\ace\Synch_T.i"\ - {$(INCLUDE)}"\ace\Synch_T.cpp"\ - {$(INCLUDE)}"\ace\Message_Block.h"\ - {$(INCLUDE)}"\ace\Timer_Queue.h"\ - {$(INCLUDE)}"\ace\Proactor.i"\ - {$(INCLUDE)}"\ace\Malloc.h"\ - {$(INCLUDE)}"\ace\Message_Block.i"\ - {$(INCLUDE)}"\ace\Malloc.i"\ - {$(INCLUDE)}"\ace\Malloc_T.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.h"\ - {$(INCLUDE)}"\ace\Malloc_T.i"\ - {$(INCLUDE)}"\ace\Malloc_T.cpp"\ - {$(INCLUDE)}"\ace\Signal.h"\ - {$(INCLUDE)}"\ace\Mem_Map.h"\ - {$(INCLUDE)}"\ace\Memory_Pool.i"\ - {$(INCLUDE)}"\ace\Signal.i"\ - {$(INCLUDE)}"\ace\Mem_Map.i"\ - {$(INCLUDE)}"\ace\Timer_Queue.i"\ - {$(INCLUDE)}"\ace\Token.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.h"\ - {$(INCLUDE)}"\ace\ReactorEx.i"\ - {$(INCLUDE)}"\ace\Token.i"\ - {$(INCLUDE)}"\ace\Stack.h"\ - {$(INCLUDE)}"\ace\Map_Manager.h"\ - {$(INCLUDE)}"\ace\Local_Tokens.i"\ - {$(INCLUDE)}"\ace\Stack.i"\ - {$(INCLUDE)}"\ace\Stack.cpp"\ - {$(INCLUDE)}"\ace\Map_Manager.i"\ - {$(INCLUDE)}"\ace\Map_Manager.cpp"\ - {$(INCLUDE)}"\ace\Handle_Set.h"\ - {$(INCLUDE)}"\ace\Pipe.h"\ - {$(INCLUDE)}"\ace\Reactor.i"\ - {$(INCLUDE)}"\ace\Handle_Set.i"\ - {$(INCLUDE)}"\ace\Pipe.i"\ - -NODEP_CPP_TEST_=\ - "..\..\STL\mutex.h"\ - "..\..\ace\ace\Sync_T.h"\ - - -"$(INTDIR)\test_writers.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/examples/Naming/test_writers.mdp b/examples/Naming/test_writers.mdp Binary files differdeleted file mode 100644 index 9ecad43e35b..00000000000 --- a/examples/Naming/test_writers.mdp +++ /dev/null diff --git a/examples/OS/Makefile b/examples/OS/Makefile deleted file mode 100644 index 57607591fea..00000000000 --- a/examples/OS/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the OS class examples -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = Process - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/examples/OS/Process/Makefile b/examples/OS/Process/Makefile deleted file mode 100644 index a4113d16997..00000000000 --- a/examples/OS/Process/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for repeating token client application -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = process - -FILES = process - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(LSRC:%.cpp=$(VDIR)%.o) -SHOBJ = $(addsuffix .so,$(FILES)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - - - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/OS/Process/Process.mak b/examples/OS/Process/Process.mak deleted file mode 100644 index bf99fd864af..00000000000 --- a/examples/OS/Process/Process.mak +++ /dev/null @@ -1,311 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-!IF "$(CFG)" == ""
-CFG=Process - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to Process - Win32 Debug.
-!ENDIF
-
-!IF "$(CFG)" != "Process - Win32 Release" && "$(CFG)" !=\
- "Process - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "Process.mak" CFG="Process - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "Process - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Process - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-RSC=rc.exe
-CPP=cl.exe
-
-!IF "$(CFG)" == "Process - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-OUTDIR=.\Release
-INTDIR=.\Release
-
-ALL : "$(OUTDIR)\Process.exe"
-
-CLEAN :
- -@erase ".\Release\Process.exe"
- -@erase ".\Release\process.obj"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/Process.pch" /YX /Fo"$(INTDIR)/" /c
-CPP_OBJS=.\Release/
-CPP_SBRS=
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/Process.bsc"
-BSC32_SBRS=
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ace.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ace.lib /nologo\
- /subsystem:console /incremental:no /pdb:"$(OUTDIR)/Process.pdb" /machine:I386\
- /out:"$(OUTDIR)/Process.exe"
-LINK32_OBJS= \
- "$(INTDIR)/process.obj"
-
-"$(OUTDIR)\Process.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "Process - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\Process.exe"
-
-CLEAN :
- -@erase ".\Debug\vc40.pdb"
- -@erase ".\Debug\vc40.idb"
- -@erase ".\Process.exe"
- -@erase ".\Debug\process.obj"
- -@erase ".\Process.ilk"
- -@erase ".\Process.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/Process.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-CPP_OBJS=.\Debug/
-CPP_SBRS=
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/Process.bsc"
-BSC32_SBRS=
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ace.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
- advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ace.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/Process.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/Process.exe"
-LINK32_OBJS= \
- "$(INTDIR)/process.obj"
-
-"$(OUTDIR)\Process.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-################################################################################
-# Begin Target
-
-# Name "Process - Win32 Release"
-# Name "Process - Win32 Debug"
-
-!IF "$(CFG)" == "Process - Win32 Release"
-
-!ELSEIF "$(CFG)" == "Process - Win32 Debug"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE=.\process.cpp
-DEP_CPP_PROCE=\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Process.h"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\sys\types.h"\
- {$(INCLUDE)}"\sys\stat.h"\
- {$(INCLUDE)}"\sys\timeb.h"\
- {$(INCLUDE)}"\ace\msg_hack.h"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Time_Value.i"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\ARGV.h"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Svc_Handler.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Acceptor.h"\
- {$(INCLUDE)}"\ace\SOCK_Acceptor.h"\
- {$(INCLUDE)}"\ace\Process.i"\
- {$(INCLUDE)}"\ace\ARGV.i"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Svc_Handler.i"\
- {$(INCLUDE)}"\ace\Svc_Handler.cpp"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task.cpp"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Dynamic.h"\
- {$(INCLUDE)}"\ace\Dynamic.i"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Acceptor.i"\
- {$(INCLUDE)}"\ace\Acceptor.cpp"\
- {$(INCLUDE)}"\ace\Strategies.cpp"\
- {$(INCLUDE)}"\ace\SOCK_Acceptor.i"\
-
-NODEP_CPP_PROCE=\
- "..\..\ACE_wrappers\ace\ace\Sync_T.h"\
-
-
-"$(INTDIR)\process.obj" : $(SOURCE) $(DEP_CPP_PROCE) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
diff --git a/examples/OS/Process/Process.mdp b/examples/OS/Process/Process.mdp Binary files differdeleted file mode 100644 index dba659ad56d..00000000000 --- a/examples/OS/Process/Process.mdp +++ /dev/null diff --git a/examples/OS/Process/README b/examples/OS/Process/README deleted file mode 100644 index 2c2c801d5df..00000000000 --- a/examples/OS/Process/README +++ /dev/null @@ -1,10 +0,0 @@ -This example shows how to use ACE_Process to "portably" create new -processes and set their standard handles (stdin, stdout, and stderr). -On UNIX, ACE_Process uses fork and exec. On Win32, it uses -CreateProcess. Since we can set the standard handles, we can mimic -UNIX pipes on Win32 by building chains of processes. - -Run the application by typing ./process [filename]. It creates a new -process to print the contents of <filename> (default is the name of -the file "process.cpp") to the main console. So all you should see is -process.cpp printed to the screen. Not very exciting... diff --git a/examples/OS/Process/process.cpp b/examples/OS/Process/process.cpp deleted file mode 100644 index 7003f349d02..00000000000 --- a/examples/OS/Process/process.cpp +++ /dev/null @@ -1,64 +0,0 @@ -// ============================================================================ -// $Id$ - -// -// = LIBRARY -// examples -// -// = FILENAME -// process.cpp -// -// = DESCRIPTION -// This example tests the ACE_Process. For more info, check the -// README file in this directory. -// -// = AUTHOR -// Tim Harrison. -// -// ============================================================================ - -#include "ace/OS.h" - -#include "ace/Process.h" - -#if defined (ACE_WIN32) -#define EXEC_NAME "c:\\WINNT35\\system32\\MORE.COM" -#else -#define EXEC_NAME "/usr/bin/cat"; -#endif /* ACE_WIN32 */ - -int -main (int argc, char *argv[]) -{ - if (ACE_LOG_MSG->open (argv[0]) == -1) - ACE_ERROR ((LM_ERROR, "cannot open logger!!!\n")); - - char *executable = argc > 1 ? argv[1] : EXEC_NAME; - char *input_file = argc > 2 ? argv[2] : "process.cpp"; - - ACE_HANDLE infile = ACE_OS::open (input_file, O_RDONLY); - - if (infile == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", input_file), 1); - - static char *l_argv[2]; // Starts out with 0's ;-) - l_argv[0] = executable; - - // Try to create a new process running the <executable>. - ACE_Process new_process (l_argv, infile); - - if (ACE_LOG_MSG->op_status () == -1) - { - int error = ACE_OS::last_error (); - ACE_ERROR ((LM_ERROR, "%p errno = %d.\n", - executable, error)); - } - - new_process.wait (); - ACE_OS::close (infile); - - ACE_DEBUG ((LM_DEBUG, "Goodbye.\n")); - return 0; -} - - diff --git a/examples/README b/examples/README deleted file mode 100644 index 671baab95b3..00000000000 --- a/examples/README +++ /dev/null @@ -1,77 +0,0 @@ -This directory contains a number of examples that illustrate how to -use the following ACE library components. If you want to see how -to program using ACE, this is the best place to start reading code and -learning the ACE design. - -These examples are roughly divided up according to the class -categories in ACE. For more information on ACE class categories, -please take a look at $WRAPPER_ROOT/ACE-categories. - - . ASX - Illustrate various components in the ADAPTIVE Service - eXecutive, which is a user-level implementation of - System V STREAMS written in C++. - - - . CORBA - Illustrate how CORBA can be integrated into ACE. - - . Connection - Illustrate how the various Acceptor and Connector - components can be used. - - . IOStream - Illustrate how the ACE IOStreams wrapper works. - - . IPC_SAP - Illustrate the C++ wrappers for Sockets, TLI, UNIX and - Win32 Named Pipes, and UNIX Stream Pipes. - - . Log_Msg - Illustrate some of the features of the logging - facility used in ACE to consolidate debugging and - error report. - - . Logger - This is a simple version of a Server Logging Daemon - that illustrates the "bare-bones" usage of the - Reactor. A more sophisticated set of logging examples - are in the $WRAPPER_ROOT/netsvcs/{client,lib,server} - directories. - - . Mem_Map - Illustrate how the ACE memory-mapped file components - work. - - . Misc - Various miscellaneous tests that illustrate how ACE - utility components work. - - . Reactor - Contains many examples of how to utilize the ACE - object-oriented event demultiplexer. - - . Service_Configurator - Illustrates the use of the ACE mechanism for - dynamically configuring communication services. - - . Shared_Malloc - Illustrates the use of ACE wrappers for - sophisticated use of the ACE_Malloc shared - memory components. - - . Shared_Memory - Illustrates the use of simple ACE wrappers for - shared memory and memory mapped file. - - . System_V_IPC - Illustrates how to use the ACE wrappers for System V - IPC (i.e., semphores, shared memory, and message - queues). - - . Threads - Illustrates the use of ACE wrappers for threading - and synchronization. - - - diff --git a/examples/Reactor/Dgram/CODgram.cpp b/examples/Reactor/Dgram/CODgram.cpp deleted file mode 100644 index 6c4bc0f8052..00000000000 --- a/examples/Reactor/Dgram/CODgram.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* Exercise the ACE_SOCK_CODgram wrapper along with the ACE_Reactor. -// $Id$ - - - Typical invocation sequence is: - - % CODgram 10000 localhost 10001 & - % CODgram 10001 localhost 10000 - - This will start two interacting copies of the CODgram - application. */ - -#include "ace/Reactor.h" -#include "ace/SOCK_CODgram.h" -#include "ace/INET_Addr.h" - -class AAL_CP : public ACE_Event_Handler, public ACE_SOCK_CODgram -{ -public: - AAL_CP (const ACE_INET_Addr &remote_addr, - const ACE_INET_Addr &local_addr); - - virtual int get_handle () const; - - virtual int handle_input (int fd); - - virtual int handle_timeout (const ACE_Time_Value & tv, - const void *arg = 0); -}; - -AAL_CP::AAL_CP (const ACE_INET_Addr &remote_addr, - const ACE_INET_Addr &local_addr) - : ACE_SOCK_CODgram (remote_addr, local_addr) -{ -} - -int -AAL_CP::get_handle () const -{ - return ACE_SOCK_CODgram::get_handle (); -} - -int -AAL_CP::handle_input (int) -{ - char buf[128]; - int n; - ACE_DEBUG ((LM_DEBUG, "Activity occurred on handle %d!\n", - ACE_SOCK_CODgram::get_handle ())); - if ((n = ACE_SOCK_CODgram::recv (buf, sizeof buf)) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "handle_input")); - else - ACE_DEBUG ((LM_DEBUG, "got buf = %s\n", buf)); - - return 0; -} - -int -AAL_CP::handle_timeout (const ACE_Time_Value &, const void *) -{ - ACE_DEBUG ((LM_DEBUG, "timed out for aa1\n")); - return 0; -} - -main(int argc, char *argv[]) -{ - /* Estabish call backs, and socket names */ - if (argc != 4) - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s localport remotehost remoteport\n", - argv[0]), -1); - - ACE_Reactor reactor; - char buf[128]; - u_short localport = ACE_OS::atoi (argv[1]); - u_short remoteport = ACE_OS::atoi (argv[3]); - char *remotehost = argv[2]; - - ACE_INET_Addr remote_addr (remoteport, remotehost); - ACE_INET_Addr local_addr (localport); - - AAL_CP aal (remote_addr, local_addr); - - if (localport == 10000) // HACK - { - ACE_OS::memcpy (buf, "Data to transmit", sizeof buf); - ACE_DEBUG ((LM_DEBUG, "sending data\n")); - - for (int i = 0; i < 20; i++) - { - aal.send (buf, sizeof buf); - ACE_DEBUG ((LM_DEBUG, ".\n")); - ACE_OS::sleep (1); - } - } - - /* read data from other side */ - if (reactor.register_handler (&aal, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "ACE_Reactor::register_handler"), -1); - - if (reactor.schedule_timer (&aal, 0, - ACE_Time_Value (1, 0), - ACE_Time_Value (0, 3500000)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "ACE_Reactor::schedule_timer"), -1); - - ACE_OS::memcpy (buf, "Data to transmit", sizeof buf); - - for (;;) - { - /* Wait at most two seconds */ - ACE_Time_Value tv (2, 0); - - reactor.handle_events (tv); - - ACE_DEBUG ((LM_DEBUG, "return from handle events\n")); - aal.send (buf, sizeof buf); - ACE_DEBUG ((LM_DEBUG, ".\n")); - } - - return 0; -} diff --git a/examples/Reactor/Dgram/Dgram.cpp b/examples/Reactor/Dgram/Dgram.cpp deleted file mode 100644 index c418c3b79d2..00000000000 --- a/examples/Reactor/Dgram/Dgram.cpp +++ /dev/null @@ -1,121 +0,0 @@ -// Exercise the ACE_SOCK_Dgram wrapper along with the ACE_Reactor. -// $Id$ - -// Typical invocation sequence is: -// -// % Dgram 10000 localhost 10001 & -// % Dgram 10001 localhost 10000 -// -// This will start two interacting copies of the Dgram -// application. - -#include "ace/Reactor.h" -#include "ace/SOCK_Dgram.h" -#include "ace/INET_Addr.h" - -class AAL_CP : public ACE_Event_Handler, public ACE_SOCK_Dgram -{ -public: - AAL_CP (const ACE_INET_Addr &local_addr); - - virtual ACE_HANDLE get_handle (void) const; - - virtual int handle_input (ACE_HANDLE handle); - - virtual int handle_timeout (const ACE_Time_Value & tv, - const void *arg = 0); -}; - -AAL_CP::AAL_CP (const ACE_INET_Addr &local_addr) - : ACE_SOCK_Dgram (local_addr) -{ -} - -ACE_HANDLE -AAL_CP::get_handle (void) const -{ - return ACE_SOCK_Dgram::get_handle (); -} - -int -AAL_CP::handle_input (ACE_HANDLE) -{ - char buf[BUFSIZ]; - int n; - ACE_INET_Addr from_addr; - - ACE_DEBUG ((LM_DEBUG, "Activity occurred on handle %d!\n", - ACE_SOCK_Dgram::get_handle ())); - if ((n = ACE_SOCK_Dgram::recv (buf, sizeof buf, from_addr)) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "handle_input")); - else - ACE_DEBUG ((LM_DEBUG, "got buf = %s\n", buf)); - - return 0; -} - -int -AAL_CP::handle_timeout (const ACE_Time_Value &, const void *) -{ - ACE_DEBUG ((LM_DEBUG, "timed out for aa1\n")); - return 0; -} - -int -main (int argc, char *argv[]) -{ - // Estabish call backs, and socket names. - if (argc != 4) - ACE_ERROR_RETURN ((LM_ERROR, - "usage: %s localport remotehost remoteport\n", - argv[0]), -1); - - ACE_Reactor reactor; - char buf[128]; - u_short localport = ACE_OS::atoi (argv[1]); - u_short remoteport = ACE_OS::atoi (argv[3]); - char *remotehost = argv[2]; - - ACE_INET_Addr remote_addr (remoteport, remotehost); - ACE_INET_Addr local_addr (localport); - - AAL_CP aal (local_addr); - - if (localport == 10000) // HACK - { - ACE_OS::memcpy (buf, "Data to transmit", sizeof buf); - ACE_DEBUG ((LM_DEBUG, "sending data\n")); - - for (size_t i = 0; i < 20; i++) - { - aal.send (buf, sizeof buf, remote_addr); - ACE_DEBUG ((LM_DEBUG, ".\n")); - ACE_OS::sleep (1); - } - } - - // Read data from other side. - if (reactor.register_handler (&aal, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "ACE_Reactor::register_handler"), -1); - - if (reactor.schedule_timer (&aal, 0, - ACE_Time_Value (1, 0), - ACE_Time_Value (0, 3500000)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "ACE_Reactor::schedule_timer"), -1); - - ACE_OS::memcpy (buf, "Data to transmit", sizeof buf); - - for (;;) - { - // Wait at most two seconds. - ACE_Time_Value tv (2, 0); - - reactor.handle_events (tv); - - ACE_DEBUG ((LM_DEBUG, "return from handle events\n")); - aal.send (buf, sizeof buf, remote_addr); - ACE_DEBUG ((LM_DEBUG, ".\n")); - } - - return 0; -} diff --git a/examples/Reactor/Dgram/Makefile b/examples/Reactor/Dgram/Makefile deleted file mode 100644 index aa2c6719e66..00000000000 --- a/examples/Reactor/Dgram/Makefile +++ /dev/null @@ -1,125 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for a test of the CODgram and Dgram facilities and the Reactor -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = CODgram Dgram - -LSRC = CODgram.cpp Dgram.cpp - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -INSTALL = - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/CODgram.o .shobj/CODgram.so: CODgram.cpp \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/SOCK_CODgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_CODgram.i -.obj/Dgram.o .shobj/Dgram.so: Dgram.cpp \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Reactor/Makefile b/examples/Reactor/Makefile deleted file mode 100644 index 4613709a2a2..00000000000 --- a/examples/Reactor/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Reactor tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = Dgram \ - Misc \ - Multicast \ - Ntalker - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/examples/Reactor/Misc/Makefile b/examples/Reactor/Misc/Makefile deleted file mode 100644 index 3301ec12259..00000000000 --- a/examples/Reactor/Misc/Makefile +++ /dev/null @@ -1,404 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the miscellaneous Reactor examples -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = pingpong \ - notification \ - test_demuxing \ - test_event_handler_t \ - test_handle_set \ - test_reactors \ - test_signals_1 \ - test_signals_2 \ - test_time_value \ - test_timer_queue - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/pingpong.o .shobj/pingpong.so: pingpong.cpp \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i -.obj/notification.o .shobj/notification.so: notification.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/test_demuxing.o .shobj/test_demuxing.so: test_demuxing.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h -.obj/test_event_handler_t.o .shobj/test_event_handler_t.so: test_event_handler_t.cpp \ - $(WRAPPER_ROOT)/ace/Event_Handler_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i -.obj/test_handle_set.o .shobj/test_handle_set.so: test_handle_set.cpp \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i -.obj/test_reactors.o .shobj/test_reactors.so: test_reactors.cpp \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h -.obj/test_signals_1.o .shobj/test_signals_1.so: test_signals_1.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/test_signals_2.o .shobj/test_signals_2.so: test_signals_2.cpp \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i -.obj/test_time_value.o .shobj/test_time_value.so: test_time_value.cpp \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i -.obj/test_timer_queue.o .shobj/test_timer_queue.so: test_timer_queue.cpp \ - $(WRAPPER_ROOT)/ace/Timer_Heap.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Timer_List.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Reactor/Misc/notification.cpp b/examples/Reactor/Misc/notification.cpp deleted file mode 100644 index 89a75d7b33b..00000000000 --- a/examples/Reactor/Misc/notification.cpp +++ /dev/null @@ -1,267 +0,0 @@ -// $Id$ - -#include "ace/Service_Config.h" -#include "ace/Thread.h" - -#if defined (ACE_HAS_THREADS) - -class Thread_Handler : public ACE_Event_Handler - // = TITLE - // Illustrate how the ACE_Reactor's thread-safe event notification - // mechanism works. - // - // = DESCRIPTION - // Handle timeouts in the main thread via the ACE_Reactor and I/O - // events in a separate thread. Just before the separate I/O thread - // exits it notifies the ACE_Reactor in the main thread using the - // ACE_Reactor's notification mechanism. -{ -public: - Thread_Handler (int delay, int interval, size_t n_threads); - Thread_Handler (size_t id): id_ (id) {} - - virtual int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0); - // Handle signals. - - virtual int handle_exception (ACE_HANDLE); - // Print data from main thread. - - virtual int handle_output (ACE_HANDLE); - // Print data from main thread. - - virtual int handle_timeout (const ACE_Time_Value &, - const void *); - // Handle timeout events in the main thread. - - virtual int handle_input (ACE_HANDLE); - // General notification messages to the Reactor. - - virtual int notify (ACE_Time_Value *tv = 0); - // Perform notifications. - - virtual int svc (void); - // Handle I/O events in a separate threads. - -private: - static void *svc_run (void *); - // Glues C++ to C thread library functions. - - size_t id_; - // ID passed in by Thread_Handler constructor. - - static sig_atomic_t shutdown_; - // Shutting down. - - // = Timing variables. - // Delay factor for timer-driven I/O. - static ACE_Time_Value delay_; - - // Interval factor for Event_Handler timer. - static ACE_Time_Value interval_; -}; - -// Shutdown flag. -sig_atomic_t Thread_Handler::shutdown_ = 0; - -// Delay factor for timer-driven I/O. -ACE_Time_Value Thread_Handler::delay_; - -// Interval factor for Event_Handler timer. -ACE_Time_Value Thread_Handler::interval_; - -Thread_Handler::Thread_Handler (int delay, - int interval, - size_t n_threads) -{ - delay_.set (delay); - interval_.set (interval); - - ACE_Sig_Set sig_set; - - sig_set.sig_add (SIGQUIT); - sig_set.sig_add (SIGINT); - - this->id_ = 0; - - if (ACE::register_stdin_handler (this, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); - - else if (ACE_Service_Config::reactor ()->register_handler (sig_set, this) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "register_handler")); - - else if (ACE_Service_Config::reactor ()->schedule_timer - (this, 0, Thread_Handler::delay_, Thread_Handler::interval_) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "schedule_timer")); - - // Set up this thread's signal mask, which is inherited by the - // threads it spawns. - - ACE_Thread::sigsetmask (SIG_BLOCK, sig_set); - - // Create N new threads of control Thread_Handlers. - - for (size_t i = 0; i < n_threads; i++) - if (ACE_Thread::spawn (&Thread_Handler::svc_run, - new Thread_Handler (i + 1), - THR_NEW_LWP | THR_DETACHED) != 0) - ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Thread::spawn")); - - // Unblock signal set so that only this thread receives them! - ACE_Thread::sigsetmask (SIG_UNBLOCK, sig_set); -} - -int -Thread_Handler::notify (ACE_Time_Value *timeout) -{ - // Just do something to test the ACE_Reactor's multi-thread - // capabilities... - - if (ACE_Service_Config::reactor ()->notify - (this, ACE_Event_Handler::EXCEPT_MASK, timeout) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "notify"), -1); - - else if (ACE_Service_Config::reactor ()->notify - (this, ACE_Event_Handler::WRITE_MASK, timeout) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "notify"), -1); - - return 0; -} - -// Test stdin handling (can use select to demultiplex HANDLEs) - -int -Thread_Handler::handle_input (ACE_HANDLE handle) -{ - char buf[BUFSIZ]; - ssize_t n = ACE_OS::read (handle, buf, sizeof buf); - - if (n > 0) - { - ACE_DEBUG ((LM_DEBUG, "(%t) %*s", n, buf)); - - // Only wait up to 10 milliseconds to notify the Reactor. - ACE_Time_Value timeout (0, 10 * 1000); - - if (this->notify (&timeout) == -1) - ACE_ERROR ((LM_DEBUG, "(%t), %p\n", "notify")); - return 0; - } - else - return -1; -} - -// Perform a task that will test the ACE_Reactor's multi-threading -// capabilities in separate threads. - -int -Thread_Handler::svc (void) -{ - while (this->shutdown_ == 0) - { - if (Thread_Handler::delay_.sec () > 0) - // Block for delay_.secs () / 2, then notify the Reactor. - ACE_OS::sleep (Thread_Handler::delay_.sec () / 2); - - // Only wait up to 10 milliseconds to notify the Reactor. - ACE_Time_Value timeout (0, 10 * 1000); - - if (notify (&timeout) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "notify")); - } - - ACE_DEBUG ((LM_DEBUG, "(%t) exiting svc\n")); - return 0; -} - -// Test signal handling. - -int -Thread_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) received signal %S\n", signum)); - - switch (signum) - { - case SIGINT: - case SIGQUIT: - ACE_ERROR ((LM_ERROR, - "(%t) ******************** shutting down %n on signal %S\n", - signum)); - this->shutdown_ = 1; - ACE_Service_Config::end_reactor_event_loop (); - } - return 0; -} - -int -Thread_Handler::handle_timeout (const ACE_Time_Value &time, - const void *) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) received timeout at (%u, %u)\n", - time.sec (), time.usec ())); - return 0; -} - -// Called by the ACE_Reactor when it receives a notification. - -int -Thread_Handler::handle_exception (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) handle_exception received notification from id %d\n", - this->id_)); - return 0; -} - -// Called by the ACE_Reactor when it receives a notification. - -int -Thread_Handler::handle_output (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) handle_output received notification from id %d\n", - this->id_)); - return 0; -} - -// "Shim" function that integrates C thread API with C++. - -void * -Thread_Handler::svc_run (void *eh) -{ - Thread_Handler *this_handler = (Thread_Handler *) eh; - - return this_handler->svc () == 0 ? 0 : (void *) -1; -} - -int -main (int argc, char *argv[]) -{ - // Required to initialize the Service Configurator. - ACE_Service_Config daemon (argv[0]); - - if (argc != 4) - ACE_ERROR ((LM_ERROR, - "usage: %s delay interval n_threads%a\n", - argv[0], 1)); - - int delay = ACE_OS::atoi (argv[1]); - int interval = ACE_OS::atoi (argv[2]); - size_t n_threads = ACE_OS::atoi (argv[3]); - - Thread_Handler thr_handler (delay, interval, n_threads); - - ACE_Service_Config::run_reactor_event_loop (); - ACE_DEBUG ((LM_DEBUG, "exiting from main%a\n", 1)); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "threads not supported on this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Reactor/Misc/pingpong.cpp b/examples/Reactor/Misc/pingpong.cpp deleted file mode 100644 index 3b515fc5d40..00000000000 --- a/examples/Reactor/Misc/pingpong.cpp +++ /dev/null @@ -1,244 +0,0 @@ -/* Simple program that illustrates all the features of the ACE_Reactor: -// $Id$ - - - 1. I/O event demultiplexing - 2. Signal-based demultiplexing - 3. Timer-based demultiplexing - - To test this program, compile it and then execute it as follows: - - % ./pingpong hello - - You should see lots of the following output: - - writing <4> [7860] - writing <4> [7860] - writing <4> [7860] - writing <4> [7860] - reading <5> (7860) [1] = hello - writing <4> [7860] - writing <5> [7861] - reading <4> (7861) [2] = hello - reading <5> (7860) [2] = hello - writing <4> [7860] - writing <5> [7861] - reading <4> (7861) [3] = hello - reading <5> (7860) [3] = hello - - After 10 seconds you'll see the following: - - ./pingpong: shutting down tester (pid = 7861) - ./pingpong: shutting down tester (pid = 7860) - - and the program will stop. If you'd like to - stop it earlier, just hit the control-C sequence - and you'll see the same messages. */ - - -#include "ace/Synch.h" -#include "ace/Reactor.h" -#include "ace/Pipe.h" - -class Ping_Pong : public ACE_Test_and_Set<ACE_Null_Mutex, sig_atomic_t> -{ -public: - Ping_Pong (char b[], ACE_HANDLE f); - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE); - virtual int handle_output (ACE_HANDLE); - virtual int handle_timeout (const ACE_Time_Value &, const void *); - -private: - char buf_[BUFSIZ]; - // Buffer to send. - - size_t buflen_; - // Length of the buffer to send. - - int pid_; - // Process ID. - - ACE_HANDLE handle_; - // Open handle. -}; - -Ping_Pong::Ping_Pong (char b[], ACE_HANDLE f) - : buflen_ (ACE_OS::strlen (b) + 1 + (2 * sizeof (int))), - pid_ (ACE_OS::getpid ()), - handle_ (f) -{ - *((int *) this->buf_) = (int) this->pid_; - *((int *) (this->buf_ + sizeof (int))) = 0; - ACE_OS::strcpy (this->buf_ + (2 * sizeof (int)), b); - this->buf_[this->buflen_ - 1] = '\n'; - this->buf_[this->buflen_] = '\0'; -} - -ACE_HANDLE -Ping_Pong::get_handle (void) const -{ - return this->handle_; -} - -int -Ping_Pong::handle_input (ACE_HANDLE) -{ -#if defined (ACE_HAS_STREAM_PIPES) - // We can rely on record-oriented reads... - - ssize_t n = ACE::recv (this->handle_, this->buf_, this->buflen_); - - if (n != (ssize_t) this->buflen_) - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) reading [%d] %p\n", handle_, "read"), -1); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) reading <%d> (%d) [%d] = %s\n", - this->handle_, - *(int *) this->buf_, - *(int *) (this->buf_ + sizeof (int)), - this->buf_ + (2 * sizeof (int)))); -#else - ssize_t n = ACE::recv (this->handle_, this->buf_, sizeof this->buf_); - - if (n == -1) - ACE_ERROR_RETURN ((LM_ERROR, "[%d] %p\n", handle_, "read"), -1); - - n -= (2 * sizeof (int)); - char *buf = this->buf_ + (2 * sizeof (int)); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) reading <%d> = %*s\n", - this->handle_, n, buf)); -#endif /* ACE_HAS_STREAM_PIPES */ - return 0; -} - -int -Ping_Pong::handle_output (ACE_HANDLE) -{ -#if defined (ACE_HAS_STREAM_PIPES) - // We can rely on record-oriented reads... - - (*(int *) (this->buf_)) = this->pid_; - (*(int *) (this->buf_ + sizeof (int)))++; - if (ACE::send (this->handle_, this->buf_, this->buflen_) == -1) - return -1; - else - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) writing <%d> [%d]\n", - this->handle_, this->pid_)); - return 0; - } -#else - if (ACE::send (this->handle_, this->buf_, this->buflen_) == -1) - return -1; - else - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) writing <%d>\n", this->handle_)); - return 0; - } -#endif /* ACE_HAS_STREAM_PIPES */ -} - -int -Ping_Pong::handle_timeout (const ACE_Time_Value &, - const void *) -{ - this->set (1); - return 0; -} - -// Contains the string to "pingpong" back and forth... -static char *string_name; - -// Wait for 10 seconds and then shut down. -static const int SHUTDOWN_TIME = 10; - -#if defined (ACE_WIN32) -static ACE_Barrier barrier (3); - -static void * -worker (void *arg) -{ - ACE_HANDLE handle = (ACE_HANDLE) arg; - - run_svc (handle); - barrier.wait (); - ACE_DEBUG ((LM_DEBUG, "(%P|%t) %n: shutting down tester\n")); - return 0; -} -#endif /* ACE_WIN32 */ - -static void -run_svc (ACE_HANDLE handle) -{ - ACE_Reactor reactor; - - Ping_Pong callback (string_name, handle); - - // Register the callback object for the various I/O, signal, and - // timer-based events. - - if (reactor.register_handler (&callback, - ACE_Event_Handler::READ_MASK - | ACE_Event_Handler::WRITE_MASK) == -1 - || reactor.register_handler (SIGINT, &callback) == -1 - || reactor.schedule_timer (&callback, 0, SHUTDOWN_TIME) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "reactor", 1)); - - // Main event loop (one per process). - - while (callback.is_set () == 0) - if (reactor.handle_events () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "handle_events")); -} - -int -main (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - - if (argc != 2) - ACE_ERROR ((LM_ERROR, "usage: %n string\n%a", 1)); - - string_name = argv[1]; - - ACE_HANDLE handles[2]; - - // Create a pipe and initialize the handles. - ACE_Pipe pipe (handles); - -#if defined (ACE_WIN32) - if (ACE_Thread::spawn (ACE_THR_FUNC (worker), - (void *) handles[0], - THR_DETACHED) == -1 - || ACE_Thread::spawn (ACE_THR_FUNC (worker), - (void *) handles[1], - THR_DETACHED) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "spawn", 1)); - - barrier.wait (); - -#else - pid_t pid = ACE_OS::fork (argv[0]); - - if (pid == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "fork", 1)); - - run_svc (handles[pid == 0]); - - ACE_DEBUG ((LM_DEBUG, "(%P|%t) %n: shutting down tester\n")); -#endif /* ACE_WIN32 */ - - if (pipe.close () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "close")); - - return 0; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Test_and_Set<ACE_Null_Mutex, sig_atomic_t>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Reactor/Misc/signal_tester.cpp b/examples/Reactor/Misc/signal_tester.cpp deleted file mode 100644 index 37613f14f38..00000000000 --- a/examples/Reactor/Misc/signal_tester.cpp +++ /dev/null @@ -1,221 +0,0 @@ -// Perform an extensive test of the ACE_Reactor's event dispatching -// $Id$ - -// mechanisms. These mechanisms illustrate how signals, I/O, and -// timeout events can all be handled within the same framework. In -// addition, this example illustrates how to use the ACE_Reactor for -// devices that perform I/O via signals (such as SVR4 message queues). - - -#include "ace/Service_Config.h" - -// Used to shut down the event loop. -static sig_atomic_t done = 0; - -// This class illustrates how to handle signal-driven I/O using the -// ACE_Reactor framework. Note that signals may be caught and -// processed without requiring the use of global signal handler -// functions or global signal handler data. - -class Sig_Handler : public ACE_Event_Handler -{ -public: - Sig_Handler (void); - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE); - virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask); - virtual int handle_signal (ACE_HANDLE signum, siginfo_t * = 0, - ucontext_t * = 0); - -private: - ACE_HANDLE handle_; -}; - -// A dummy_handle is required to reserve a slot in the ACE_Reactor's -// descriptor table. - -Sig_Handler::Sig_Handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); - - // Create a sigset_t corresponding to the signals we want to catch. - ACE_Sig_Set sig_set; - - sig_set.sig_add (SIGINT); - sig_set.sig_add (SIGQUIT); - sig_set.sig_add (SIGALRM); - - // Register the signal handler object to catch the signals. - if (ACE_Service_Config::reactor ()->register_handler (sig_set, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); -} - -// Called by the ACE_Reactor to extract the fd. - -ACE_HANDLE -Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -// In a real application, this method would be where the read on the -// signal-driven I/O device would occur asynchronously. For now we'll -// just print a greeting to let you know that everything is working -// properly! - -int -Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "handling asynchonrous input...\n")); - return 0; -} - -// In a real application, this method would do any cleanup activities -// required when shutting down the I/O device. - -int -Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. In our simple example, we are simply catching SIGALRM, -// SIGINT, and SIGQUIT. Anything else is logged and ignored. -// -// There are several advantages to using this approach. First, -// the behavior triggered by the signal is handled in the main event -// loop, rather than in the signal handler. Second, the ACE_Reactor's -// signal handling mechanism eliminates the need to use global signal -// handler functions and data. - -int -Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "received signal %S\n", signum)); - - switch (signum) - { - case SIGALRM: - // Rearm the alarm. - ACE_OS::alarm (4); - break; - case SIGINT: - // Tell the ACE_Reactor to enable the ready bit for - // this->handle_. The ACE_Reactor will subsequently call the - // Sig_Handler::handle_input method from within its event loop. - return ACE_Service_Config::reactor ()->ready_ops - (this->handle_, ACE_Event_Handler::READ_MASK, ACE_Reactor::ADD_MASK); - case SIGQUIT: - ACE_DEBUG ((LM_DEBUG, "%S: shutting down signal tester\n", signum)); - ACE_Service_Config::end_reactor_event_loop (); - break; - default: - ACE_DEBUG ((LM_DEBUG, - "%S: not handled, returning to program\n", signum)); - break; - } - return 0; -} - -// This class illustrates that the ACE_Reactor can handle signals, -// STDIO, and timeouts using the same mechanisms. - -class STDIN_Handler : public ACE_Event_Handler -{ -public: - STDIN_Handler (void); - virtual int handle_input (ACE_HANDLE); - virtual int handle_timeout (const ACE_Time_Value &, - const void *arg); -}; - -STDIN_Handler::STDIN_Handler (void) -{ - if (ACE::register_stdin_handler (this, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); - - // Register the STDIN_Handler to be dispatched once every second. - else if (ACE_Service_Config::reactor ()->schedule_timer - (this, 0, ACE_Time_Value (1), ACE_Time_Value (1)) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "schedule_timer", 1)); -} - -int -STDIN_Handler::handle_timeout (const ACE_Time_Value &tv, - const void *) -{ - ACE_DEBUG ((LM_DEBUG, "timeout occurred at %d sec, %d usec\n", - tv.sec (), tv.usec ())); - return 0; -} - -// Read from input descriptor and write to stdout descriptor. - -int -STDIN_Handler::handle_input (ACE_HANDLE handle) -{ - ssize_t n; - char buf[BUFSIZ]; - - switch (n = ACE_OS::read (handle, buf, sizeof buf)) - { - case -1: - if (errno == EINTR) - return 0; - /* NOTREACHED */ - else - ACE_ERROR ((LM_ERROR, "%p\n", "read")); - /* FALLTHROUGH */ - case 0: - ACE_Service_Config::end_reactor_event_loop (); - break; - default: - { - ssize_t result = ACE::write_n (ACE_STDOUT, buf, n); - - if (result != n) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "write"), - result == -1 && errno == EINTR ? 0 : -1); - } - } - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv [0]); - - // Signal handler. - Sig_Handler sh; - - // Define an I/O handler object. - STDIN_Handler ioh; - - // Optionally start the alarm. - if (argc > 1) - ACE_OS::alarm (4); - - // Loop handling signals and I/O events until SIGQUIT occurs. - - while (daemon.reactor_event_loop_done () == 0) - daemon.run_reactor_event_loop (); - - return 0; -} diff --git a/examples/Reactor/Misc/test_demuxing.cpp b/examples/Reactor/Misc/test_demuxing.cpp deleted file mode 100644 index 235d8fbd1df..00000000000 --- a/examples/Reactor/Misc/test_demuxing.cpp +++ /dev/null @@ -1,314 +0,0 @@ -// $Id$ - -// Perform an extensive test of all the ACE_Reactor's event handler -// dispatching mechanisms. These mechanisms illustrate how I/O, -// timeout, and signal events, as well as ACE_Message_Queues, can all -// be handled within the same demultiplexing and dispatching -// framework. In addition, this example illustrates how to use the -// ACE_Reactor for devices that perform I/O via signals (such as SVR4 -// message queues). - -#include "ace/Service_Config.h" -#include "ace/Task.h" - -// Default is to have a 2 second timeout. -static int timeout = 2; - -// This class illustrates how to handle signal-driven I/O using the -// ACE_Reactor framework. Note that signals may be caught and -// processed without requiring the use of global signal handler -// functions or global signal handler data. - -class Sig_Handler : public ACE_Event_Handler -{ -public: - Sig_Handler (void); - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE); - virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask); - virtual int handle_signal (ACE_HANDLE signum, siginfo_t * = 0, - ucontext_t * = 0); - -private: - ACE_HANDLE handle_; -}; - -// A dummy_handle is required to reserve a slot in the ACE_Reactor's -// descriptor table. - -Sig_Handler::Sig_Handler (void) -{ - // Assign the Sig_Handler a dummy I/O descriptor. Note that even - // though we open this file "Write Only" we still need to use the - // ACE_Event_Handler::NULL_MASK when registering this with the - // ACE_Reactor (see below). - this->handle_ = ACE_OS::open (ACE_DEV_NULL, O_WRONLY); - ACE_ASSERT (this->handle_ != -1); - - // Register signal handler object. Note that NULL_MASK is used to - // keep the ACE_Reactor from calling us back on the "/dev/null" - // descriptor. - if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::NULL_MASK) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); - - // Create a sigset_t corresponding to the signals we want to catch. - ACE_Sig_Set sig_set; - - sig_set.sig_add (SIGINT); - sig_set.sig_add (SIGQUIT); - sig_set.sig_add (SIGALRM); - - // Register the signal handler object to catch the signals. - if (ACE_Service_Config::reactor ()->register_handler (sig_set, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); -} - -// Called by the ACE_Reactor to extract the fd. - -ACE_HANDLE -Sig_Handler::get_handle (void) const -{ - return this->handle_; -} - -// In a real application, this method would be where the read on the -// signal-driven I/O device would occur asynchronously. For now we'll -// just print a greeting to let you know that everything is working -// properly! - -int -Sig_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handling asynchonrous input...\n")); - return 0; -} - -// In a real application, this method would do any cleanup activities -// required when shutting down the I/O device. - -int -Sig_Handler::shutdown (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing down Sig_Handler...\n")); - return 0; -} - -// This method handles all the signals that are being caught by this -// object. In our simple example, we are simply catching SIGALRM, -// SIGINT, and SIGQUIT. Anything else is logged and ignored. -// -// There are several advantages to using this approach. First, -// the behavior triggered by the signal is handled in the main event -// loop, rather than in the signal handler. Second, the ACE_Reactor's -// signal handling mechanism eliminates the need to use global signal -// handler functions and data. - -int -Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) received signal %S\n", signum)); - - switch (signum) - { - case SIGALRM: - // Rearm the alarm. - ACE_OS::alarm (4); - break; - case SIGINT: - // Tell the ACE_Reactor to enable the ready bit for - // this->handle_. The ACE_Reactor will subsequently call the - // <Sig_Handler::handle_input> method from within its event - // loop. - return ACE_Service_Config::reactor ()->ready_ops - (this->handle_, ACE_Event_Handler::READ_MASK, ACE_Reactor::ADD_MASK); - case SIGQUIT: - ACE_DEBUG ((LM_DEBUG, "(%t) %S: shutting down signal tester\n", signum)); - ACE_Service_Config::end_reactor_event_loop (); - break; - default: - ACE_DEBUG ((LM_DEBUG, - "(%t) %S: not handled, returning to program\n", signum)); - break; - } - return 0; -} - -// This class illustrates that the ACE_Reactor can handle signals, -// STDIO, and timeouts using the same mechanisms. - -class STDIN_Handler : public ACE_Event_Handler -{ -public: - STDIN_Handler (void); - virtual int handle_input (ACE_HANDLE); - virtual int handle_timeout (const ACE_Time_Value &, - const void *arg); -}; - -STDIN_Handler::STDIN_Handler (void) -{ - if (ACE::register_stdin_handler (this, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); - - // Register the STDIN_Handler to be dispatched once every <timeout> - // seconds. - else if (ACE_Service_Config::reactor ()->schedule_timer - (this, 0, ACE_Time_Value (timeout), ACE_Time_Value (timeout)) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "schedule_timer", 1)); -} - -int -STDIN_Handler::handle_timeout (const ACE_Time_Value &tv, - const void *) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) timeout occurred at %d sec, %d usec\n", - tv.sec (), tv.usec ())); - return 0; -} - -// Read from input descriptor and write to stdout descriptor. - -int -STDIN_Handler::handle_input (ACE_HANDLE handle) -{ - ssize_t n; - char buf[BUFSIZ]; - - switch (n = ACE_OS::read (handle, buf, sizeof buf)) - { - case -1: - if (errno == EINTR) - return 0; - /* NOTREACHED */ - else - ACE_ERROR ((LM_ERROR, "%p\n", "read")); - /* FALLTHROUGH */ - case 0: - ACE_Service_Config::end_reactor_event_loop (); - break; - default: - { - ssize_t result = ACE::write_n (ACE_STDOUT, buf, n); - - if (result != n) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "write"), - result == -1 && errno == EINTR ? 0 : -1); - } - } - return 0; -} - -class Message_Handler : public ACE_Task <ACE_SYNCH> -{ -public: - Message_Handler (void); - - virtual int handle_input (ACE_HANDLE); - // Called back within the context of the <ACE_Reactor> Singleton to - // dequeue and process the message on the <ACE_Message_Queue>. - - virtual int svc (void); - // Run the "event-loop" periodically putting messages to our - // internal <Message_Queue> that we inherit from <ACE_Task>. - -private: - ACE_Reactor_Notification_Strategy notification_strategy_; - // This strategy will notify the <ACE_Reactor> Singleton when a new - // message is enqueued. -}; - -Message_Handler::Message_Handler (void) - : notification_strategy_ (ACE_Service_Config::reactor (), - this, - ACE_Event_Handler::READ_MASK) -{ - // Set this to the Reactor notification strategy. - this->msg_queue ()->notification_strategy (&this->notification_strategy_); - - if (this->activate ()) - ACE_ERROR ((LM_ERROR, "%p\n", "activate")); -} - -int -Message_Handler::svc (void) -{ - for (int i = 0;; i++) - { - ACE_Message_Block *mb; - - ACE_NEW_RETURN (mb, ACE_Message_Block (1), 0); - - mb->msg_priority (i); - ACE_OS::sleep (1); - - // Note that this putq() call with automagically invoke the - // notify() hook of our ACE_Reactor_Notification_Strategy, - // thereby informing the <ACE_Reactor> Singleton to call our - // <handle_input> method. - if (this->putq (mb) == -1) - { - if (errno == ESHUTDOWN) - ACE_ERROR_RETURN ((LM_ERROR, "(%t) queue is deactivated"), 0); - else - ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "putq"), -1); - } - } - - return 0; -} - -int -Message_Handler::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Message_Handler::handle_input\n")); - - ACE_Message_Block *mb; - - if (this->getq (mb, (ACE_Time_Value *) &ACE_Time_Value::zero) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "dequeue_head")); - else - { - ACE_DEBUG ((LM_DEBUG, "(%t) priority = %d\n", mb->msg_priority ())); - mb->release (); - } - - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv [0]); - - // Optionally start the alarm. - if (argc > 1) - { - ACE_OS::alarm (4); - timeout = ACE_OS::atoi (argv[1]); - } - - // Signal handler. - Sig_Handler sh; - - // Define an I/O handler object. - STDIN_Handler ioh; - - // Define a message handler. - Message_Handler mh; - - // Loop handling signals and I/O events until SIGQUIT occurs. - - while (daemon.reactor_event_loop_done () == 0) - daemon.run_reactor_event_loop (); - - // Deactivate the message queue. - mh.msg_queue ()->deactivate (); - - // Wait for the thread to exit. - ACE_Service_Config::thr_mgr ()->wait (); - ACE_DEBUG ((LM_DEBUG, "(%t) leaving main\n")); - return 0; -} diff --git a/examples/Reactor/Misc/test_event_handler_t.cpp b/examples/Reactor/Misc/test_event_handler_t.cpp deleted file mode 100644 index beedb8e7e2d..00000000000 --- a/examples/Reactor/Misc/test_event_handler_t.cpp +++ /dev/null @@ -1,45 +0,0 @@ - -// $Id$ - -#include "ace/Event_Handler_T.h" - -#if defined (ACE_HAS_TEMPLATE_TYPEDEFS) - -class ACE_Sig_Handler -{ -public: - ACE_Sig_Handler (void) {} - virtual ACE_HANDLE get_handle (void) const { return 0; } - virtual void set_handle (ACE_HANDLE) {} - virtual int handle_async_io (ACE_HANDLE) { return 0; } - virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask) { return 0; } - virtual int signal_handler (ACE_HANDLE signum -#if defined (ACE_HAS_SIGINFO_T) - , siginfo_t * = 0, ucontext_t * = 0 -#endif /* ACE_HAS_SIGINFO_T */ - ) - { - return 0; - } -}; - -int -main (void) -{ - typedef ACE_Event_Handler_T<ACE_Sig_Handler> EH_SH; - - // Tie the ACE_Event_Handler_T together with the methods from ACE_Sig_Handler. - EH_SH tied_sh (new ACE_Sig_Handler, 1, - &ACE_Sig_Handler::get_handle, - &ACE_Sig_Handler::handle_async_io, - &ACE_Sig_Handler::shutdown, - &ACE_Sig_Handler::signal_handler); - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform does not support template typedefs\n"), 1); -} -#endif /* ACE_HAS_TEMPLATE_TYPEDEFS */ diff --git a/examples/Reactor/Misc/test_handle_set.cpp b/examples/Reactor/Misc/test_handle_set.cpp deleted file mode 100644 index cfd4791f6e8..00000000000 --- a/examples/Reactor/Misc/test_handle_set.cpp +++ /dev/null @@ -1,73 +0,0 @@ - -// $Id$ - -#include "ace/Handle_Set.h" - -void -test1 (int count) -{ - int duplicates = 0; - int sets = 0; - int clears = 0; - - ACE_Handle_Set handle_set; - - ACE_OS::srand (ACE_OS::time (0L)); - - for (int j = 0; j < count; j++) - { - int i = int (ACE_OS::rand () % ACE_Handle_Set::MAXSIZE); - - if (ACE_ODD (i)) - { - if (handle_set.is_set (i)) - duplicates++; - - handle_set.set_bit (i); - sets++; - } - else - { - if (handle_set.is_set (i)) - duplicates--; - - handle_set.clr_bit (i); - clears++; - } - } - - ACE_DEBUG ((LM_DEBUG, "count = %d, set_size = %d, duplicates = %d\n", - count, handle_set.num_set (), (sets - clears) == duplicates)); -} - -void -test2 (void) -{ - ACE_Handle_Set handle_set; - ACE_HANDLE handle; - - handle_set.set_bit (0); - handle_set.set_bit (1); - handle_set.set_bit (32); - handle_set.set_bit (63); - handle_set.set_bit (64); - handle_set.set_bit (65); - handle_set.set_bit (122); - handle_set.set_bit (129); - handle_set.set_bit (245); - handle_set.set_bit (255); - - for (ACE_Handle_Set_Iterator fi (handle_set); - (handle = fi ()) != -1; - ++fi) - ACE_DEBUG ((LM_DEBUG, "handle = %d\n", handle)); -} - -int -main (int argc, char *argv[]) -{ - int count = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_Handle_Set::MAXSIZE; - test1 (count); - test2 (); -} - diff --git a/examples/Reactor/Misc/test_reactors.cpp b/examples/Reactor/Misc/test_reactors.cpp deleted file mode 100644 index 8dd246f2293..00000000000 --- a/examples/Reactor/Misc/test_reactors.cpp +++ /dev/null @@ -1,196 +0,0 @@ -// $Id$ - -// Perform a torture test of multiple ACE_Reactors and ACE_Tasks in -// the same process... Thanks to Detlef Becker for contributing this. - -#include "ace/Reactor.h" -#include "ace/Synch.h" -#include "ace/Service_Config.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -static const int NUM_INVOCATIONS = 10; -static const int MAX_TASKS = 20; - -class Test_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Test_Task (void); - ~Test_Task (void); - - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int svc (void); - - virtual int handle_input (ACE_HANDLE handle); - virtual int handle_close (ACE_HANDLE fd, - ACE_Reactor_Mask close_mask); - -private: - int handled_; - - static int task_count_; -}; - -int Test_Task::task_count_ = 0; - -static ACE_Atomic_Op<ACE_Thread_Mutex, int> done_count = MAX_TASKS * 2; - -static ACE_Recursive_Thread_Mutex reclock_; - -Test_Task::Test_Task (void) - : handled_ (0) -{ - ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, reclock_); - - Test_Task::task_count_++; - ACE_DEBUG ((LM_DEBUG, - "(%t) TT+ Test_Task::task_count_ = %d\n", - Test_Task::task_count_)); -} - -Test_Task::~Test_Task (void) -{ - ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, reclock_); - - ACE_DEBUG ((LM_DEBUG, - "(%t) TT- Test_Task::task_count_ = %d\n", - Test_Task::task_count_)); -} - -int -Test_Task::open (void *args) -{ - this->reactor ((ACE_Reactor *) args); - return this->activate (THR_NEW_LWP); -} - -int -Test_Task::close (u_long) -{ - ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex, ace_mon, reclock_, -1); - - Test_Task::task_count_--; - ACE_DEBUG ((LM_DEBUG, - "(%t) close Test_Task::task_count_ = %d\n", - Test_Task::task_count_)); - return 0; -} - -int -Test_Task::svc (void) -{ - for (int i = 0; i < NUM_INVOCATIONS; i++) - { - ACE_OS::thr_yield (); - - // ACE_DEBUG ((LM_DEBUG, "(%t) calling notify %d\n", i)); - - if (this->reactor ()->notify (this, ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "notify"), -1); - - // ACE_DEBUG ((LM_DEBUG, "(%t) leaving notify %d\n", i)); - } - - return 0; -} - -int -Test_Task::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handle_close\n")); - return 0; -} - -int -Test_Task::handle_input (ACE_HANDLE) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handle_input\n")); - - this->handled_++; - - if (this->handled_ == NUM_INVOCATIONS) - { - done_count--; - ACE_DEBUG ((LM_DEBUG, - "(%t) handle_input, handled_ = %d, done_count = %d\n", - this->handled_, (int) done_count)); - } - - ACE_OS::thr_yield (); - return -1; -} - -static void * -worker (void *args) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - ACE_Reactor *reactor = (ACE_Reactor *) args; - - reactor->owner (ACE_Thread::self ()); - - ACE_Time_Value timeout (4); - - for (;;) - { - //ACE_DEBUG ((LM_DEBUG, "(%t) calling handle_events\n")); - - switch (reactor->handle_events (timeout)) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "reactor"), 0); - /* NOTREACHED */ - case 0: - ACE_ERROR_RETURN ((LM_ERROR, "(%t) timeout\n"), 0); - /* NOTREACHED */ - } - - // ACE_DEBUG ((LM_DEBUG, "(%t) done with handle_events\n")); - - } - - return 0; -} - -int -main (void) -{ - ACE_Reactor *react1 = ACE_Service_Config::reactor (); - ACE_Reactor *react2 = new ACE_Reactor (); - Test_Task tt1[MAX_TASKS]; - Test_Task tt2[MAX_TASKS]; - - for (int i = 0; i < MAX_TASKS; i++) - { - tt1[i].open (react1); - tt2[i].open (react2); - } - - if (ACE_Service_Config::thr_mgr ()->spawn - (ACE_THR_FUNC (worker), (void *) react1, THR_NEW_LWP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), -1); - - else if (ACE_Service_Config::thr_mgr ()->spawn - (ACE_THR_FUNC (worker), (void *) react2, THR_NEW_LWP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), -1); - - ACE_Service_Config::thr_mgr ()->wait (); - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Reactor/Misc/test_signals.cpp b/examples/Reactor/Misc/test_signals.cpp deleted file mode 100644 index 6493667de12..00000000000 --- a/examples/Reactor/Misc/test_signals.cpp +++ /dev/null @@ -1,226 +0,0 @@ -// Test the ability of the Reactor/Signal_Handler to register multiple -// $Id$ - -// handler per-signal. - -/* This test works as follows: - - 1. To test the "original" semantics of ACE (i.e., only one - ACE_Event_Handler can be registered per signal), you don't - need to do anything special. Existing programs work the - same since giving the Reactor's constructor a 0 value - (which is the default argument, BTW) instructs it to behave - as before. When a 0 is given, the ACE_Reactor's - constructor/open method creates an instance of - ACE_Sig_Handler and assigns this to an internal pointer. - This pointer is then used to dispatch all signal-related - methods within the Reactor. The default ACE_Sig_Handler - only allows *one* ACE_Event_Handler to be registered - per-signal. - - To run this version of the test do the following: - - % ./test-signal - ./test_signals - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in Sig_Handler_2 (fruity, 0, 0) with count = 1 - waiting for SIGINT or SIGQUIT - ^\ - signal Quit occurred in Sig_Handler_2 (fruity, 0, 0) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (fruity, 0, 0) - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in Sig_Handler_2 (fruity, 0, 0) with count = 3 - waiting for SIGINT or SIGQUIT - ^\Quit (core dumped) - - Note that in this test only one handler (the last one -- - "Sig_Handler_2 (fruity)") is actually registered. BTW, the - core dump is the expected behavior since the default - disposition is restored when there are no more handlers - (see the code below). - - 2. To test the "multiple handlers per-signal semantics", you - need to pass the constructor/open method of the ACE_Reactor - a pointer to a an instance of ACE_Sig_Handlers (note the - plural "s"). ACE_Sig_Handlers is a class that derives from - ACE_Sig_Handler. The difference between these two classes - is that (1) ACE_Sig_Handlers::register_signal allows - multiple ACE_Event_Handlers to be registered per-signal and - (2) it enables SA_RESTART by default. This class also - implements Detlef Becker's algorithm for integrating ACE - signal handling with 3rd party libraries. - - To run this version of the test do the following: - - % ./test_signals 1 - - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in external handler! - signal Interrupt occurred in Sig_Handler_1 (howdy, 3, 1) with count = 1 - shutting down SIGINT in Sig_Handler_1 (howdy, 3, 1) - signal Interrupt occurred in Sig_Handler_1 (doody, 5, 4) with count = 1 - shutting down SIGINT in Sig_Handler_1 (doody, 5, 4) - signal Interrupt occurred in Sig_Handler_2 (tutty, 7, 6) with count = 1 - signal Interrupt occurred in Sig_Handler_2 (fruity, 9, 8) with count = 1 - waiting for SIGINT or SIGQUIT - ^\ - signal Quit occurred in Sig_Handler_1 (howdy, 3, 1) with count = 2 - shutting down SIGQUIT in Sig_Handler_1 (howdy, 3, 1) - signal Quit occurred in Sig_Handler_1 (doody, 5, 4) with count = 2 - shutting down SIGQUIT in Sig_Handler_1 (doody, 5, 4) - signal Quit occurred in Sig_Handler_2 (tutty, 7, 6) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (tutty, 7, 6) - signal Quit occurred in Sig_Handler_2 (fruity, 9, 8) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (fruity, 9, 8) - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in external handler! - signal Interrupt occurred in Sig_Handler_2 (tutty, 7, 6) with count = 3 - signal Interrupt occurred in Sig_Handler_2 (fruity, 9, 8) with count = 3 - waiting for SIGINT or SIGQUIT - ^\Quit (core dumped) - - When this test begins all four handlers are registered and - dispatched when a SIGINT or SIGQUIT occurs. After the - first SIGINT, the handle_signal method of the Sig_Handler_1 - objects unregister themselves. At that point there are 4 - SIGQUIT handlers left, but only 2 of our SIGINT handlers - left (and the 1 external handler). After the first - SIGQUIT, there are no SIGQUIT handlers left since they all - deregister themselves (which restores the "SIG_DFL" - disposition). On the second SIGINT there are only 3 - handlers left (2 of ours and 1 external). Finally, on the - second SIGQUIT we exit and dump core since that's what - happens with the default disposition for SIGQUIT. */ - -#include "ace/Log_Msg.h" -#include "ace/Reactor.h" - -class Sig_Handler_1 : public ACE_Event_Handler -{ -public: - Sig_Handler_1 (ACE_Reactor &reactor, char *msg) - : msg_ (msg), - count_ (0), - reactor_ (reactor) - { - // Register the signal handlers. - this->quit_sigkey_ = reactor.register_handler (SIGQUIT, this); - this->int_sigkey_ = reactor.register_handler (SIGINT, this); - - if (this->quit_sigkey_ == -1 || this->int_sigkey_ == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_handler")); - } - - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *) - { - this->count_++; - ACE_DEBUG ((LM_DEBUG, - "\nsignal %S occurred in Sig_Handler_1 (%s, %d, %d) with count = %d", - signum, this->msg_, this->int_sigkey_, this->quit_sigkey_, this->count_)); - if (this->count_ != 1 && signum == SIGQUIT) - { - if (this->reactor_.remove_handler (SIGQUIT, 0, 0, - this->quit_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGQUIT in Sig_Handler_1 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - else if (this->count_ != 2 && signum == SIGINT) - { - if (this->reactor_.remove_handler (SIGINT, 0, 0, - this->int_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGINT in Sig_Handler_1 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - return 0; - } - -protected: - char *msg_; - int count_; - int int_sigkey_; - int quit_sigkey_; - ACE_Reactor &reactor_; -}; - -class Sig_Handler_2 : public Sig_Handler_1 -{ -public: - Sig_Handler_2 (ACE_Reactor &reactor, char *msg) - : Sig_Handler_1 (reactor, msg) - { - } - - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *) - { - this->count_++; - ACE_DEBUG ((LM_DEBUG, - "\nsignal %S occurred in Sig_Handler_2 (%s, %d, %d) with count = %d", - signum, this->msg_, this->int_sigkey_, this->quit_sigkey_, this->count_)); - if (this->count_ != 0 && signum == SIGQUIT) - { - if (this->reactor_.remove_handler (SIGQUIT, 0, 0, - this->quit_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGQUIT in Sig_Handler_2 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - else - return 0; - } -}; - -static void -external_handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "\nsignal %S occurred in external handler!", signum)); -} - -#if !defined (HPUX) -int -main (int argc, char *argv) -{ - // If argc > 1 then allow multiple handlers per-signal, else just - // allow 1 handler per-signal. - ACE_Sig_Handlers multi_handlers; - - ACE_Reactor reactor (argc > 1 ? &multi_handlers: 0); - - if (argc > 1) - { - // Register an "external" signal handler so that the - // ACE_Sig_Handlers code will have something to incorporate! - ACE_SignalHandler eh = ACE_SignalHandler (external_handler); - ACE_Sig_Action sa (eh); - - sa.register_action (SIGINT); - } - - // Create a bevy of handlers. - Sig_Handler_1 h1 (reactor, "howdy"), h2 (reactor, "doody"); - Sig_Handler_2 h3 (reactor, "tutty"), h4 (reactor, "fruity"); - - // Wait for user to type SIGINT and SIGQUIT. - - for (;;) - { - ACE_DEBUG ((LM_DEBUG, "\nwaiting for SIGINT or SIGQUIT\n")); - reactor.handle_events (); - } - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "The HP C++ compiler is too lame to support this feature\n"), -1); -} -#endif /* HPUX */ diff --git a/examples/Reactor/Misc/test_signals_1.cpp b/examples/Reactor/Misc/test_signals_1.cpp deleted file mode 100644 index faaf1941661..00000000000 --- a/examples/Reactor/Misc/test_signals_1.cpp +++ /dev/null @@ -1,80 +0,0 @@ -// This simple program illustrates the difference between handling -// signals via the Reactor (which doesn't cause the event loop to -// terminate) and signals that aren't handled via the Reactor (which -// do). - -#include "ace/Service_Config.h" - -// Number of times to allow signal to execute until we quit. -static size_t count = 10; - -static void -my_signal_function (int sig) -{ - ACE_DEBUG ((LM_DEBUG, "Executed non-ACE signal handler for sig %S\n", sig)); -} - -class My_Handler : public ACE_Event_Handler -{ -public: - virtual int handle_signal (int sig, - siginfo_t *, - ucontext_t *) - { - ACE_DEBUG ((LM_DEBUG, "Executed ACE signal handler for sig %S, count = %d\n", - sig, count)); - - count--; - - if (count == 0) - ACE_Service_Config::end_reactor_event_loop (); - - return 0; - } - - virtual int handle_timeout (const ACE_Time_Value &, - const void *arg) - { - ACE_DEBUG ((LM_DEBUG, "%s\n", (const char *) arg)); - return 0; - } -}; - -int -main (int, char *argv[]) -{ - // The following sets up a service configurator - mostly used to get - // a reactor for the process. - ACE_Service_Config my_config (argv[0]); - - // ----- First you need a handler for the timeout ----- - My_Handler my_handler; - - // ----- Now set up the timer ----- - - // This is the timeout period in seconds. - ACE_Time_Value period (2); - - if (my_config.reactor ()->schedule_timer (&my_handler, - "hello", period, period) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", "schedule_timer"), -1); - - // ----- Set up an ACE signal handler ----- - - if (my_config.reactor ()->register_handler (SIGINT, &my_handler) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, "%p\n", "register_handler"), -1); - - // ----- Set up a non-ACE signal handler ----- - ACE_Sig_Action sig ((ACE_SignalHandler) my_signal_function, SIGQUIT); - ACE_UNUSED_ARG (sig); - - // This just executes the reactor events until my_handler tells us - // we are finished. - ACE_DEBUG ((LM_DEBUG, "starting event loop that runs until you've typed ^C a total of 10 times or ^\\ once.\n")); - - int result = my_config.run_reactor_event_loop (); - - ACE_DEBUG ((LM_DEBUG, "result = %d\n", result)); - - return 0; -} diff --git a/examples/Reactor/Misc/test_signals_2.cpp b/examples/Reactor/Misc/test_signals_2.cpp deleted file mode 100644 index 568ca2515f4..00000000000 --- a/examples/Reactor/Misc/test_signals_2.cpp +++ /dev/null @@ -1,228 +0,0 @@ -// $Id$ - -// Test the ability of the Reactor/Signal_Handler to register multiple -// handler per-signal. - -/* This test works as follows: - - 1. To test the "original" semantics of ACE (i.e., only one - ACE_Event_Handler can be registered per signal), you don't - need to do anything special. Existing programs work the - same since giving the Reactor's constructor a 0 value - (which is the default argument, BTW) instructs it to behave - as before. When a 0 is given, the ACE_Reactor's - constructor/open method creates an instance of - ACE_Sig_Handler and assigns this to an internal pointer. - This pointer is then used to dispatch all signal-related - methods within the Reactor. The default ACE_Sig_Handler - only allows *one* ACE_Event_Handler to be registered - per-signal. - - To run this version of the test do the following: - - % ./test-signal - ./test_signals - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in Sig_Handler_2 (fruity, 0, 0) with count = 1 - waiting for SIGINT or SIGQUIT - ^\ - signal Quit occurred in Sig_Handler_2 (fruity, 0, 0) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (fruity, 0, 0) - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in Sig_Handler_2 (fruity, 0, 0) with count = 3 - waiting for SIGINT or SIGQUIT - ^\Quit (core dumped) - - Note that in this test only one handler (the last one -- - "Sig_Handler_2 (fruity)") is actually registered. BTW, the - core dump is the expected behavior since the default - disposition is restored when there are no more handlers - (see the code below). - - 2. To test the "multiple handlers per-signal semantics", you - need to pass the constructor/open method of the ACE_Reactor - a pointer to a an instance of ACE_Sig_Handlers (note the - plural "s"). ACE_Sig_Handlers is a class that derives from - ACE_Sig_Handler. The difference between these two classes - is that (1) ACE_Sig_Handlers::register_signal allows - multiple ACE_Event_Handlers to be registered per-signal and - (2) it enables SA_RESTART by default. This class also - implements Detlef Becker's algorithm for integrating ACE - signal handling with 3rd party libraries. - - To run this version of the test do the following: - - % ./test_signals 1 - - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in external handler! - signal Interrupt occurred in Sig_Handler_1 (howdy, 3, 1) with count = 1 - shutting down SIGINT in Sig_Handler_1 (howdy, 3, 1) - signal Interrupt occurred in Sig_Handler_1 (doody, 5, 4) with count = 1 - shutting down SIGINT in Sig_Handler_1 (doody, 5, 4) - signal Interrupt occurred in Sig_Handler_2 (tutty, 7, 6) with count = 1 - signal Interrupt occurred in Sig_Handler_2 (fruity, 9, 8) with count = 1 - waiting for SIGINT or SIGQUIT - ^\ - signal Quit occurred in Sig_Handler_1 (howdy, 3, 1) with count = 2 - shutting down SIGQUIT in Sig_Handler_1 (howdy, 3, 1) - signal Quit occurred in Sig_Handler_1 (doody, 5, 4) with count = 2 - shutting down SIGQUIT in Sig_Handler_1 (doody, 5, 4) - signal Quit occurred in Sig_Handler_2 (tutty, 7, 6) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (tutty, 7, 6) - signal Quit occurred in Sig_Handler_2 (fruity, 9, 8) with count = 2 - shutting down SIGQUIT in Sig_Handler_2 (fruity, 9, 8) - waiting for SIGINT or SIGQUIT - ^C - signal Interrupt occurred in external handler! - signal Interrupt occurred in Sig_Handler_2 (tutty, 7, 6) with count = 3 - signal Interrupt occurred in Sig_Handler_2 (fruity, 9, 8) with count = 3 - waiting for SIGINT or SIGQUIT - ^\Quit (core dumped) - - When this test begins all four handlers are registered and - dispatched when a SIGINT or SIGQUIT occurs. After the - first SIGINT, the handle_signal method of the Sig_Handler_1 - objects unregister themselves. At that point there are 4 - SIGQUIT handlers left, but only 2 of our SIGINT handlers - left (and the 1 external handler). After the first - SIGQUIT, there are no SIGQUIT handlers left since they all - deregister themselves (which restores the "SIG_DFL" - disposition). On the second SIGINT there are only 3 - handlers left (2 of ours and 1 external). Finally, on the - second SIGQUIT we exit and dump core since that's what - happens with the default disposition for SIGQUIT. */ - - -#include "ace/Reactor.h" - -class Sig_Handler_1 : public ACE_Event_Handler -{ -public: - Sig_Handler_1 (ACE_Reactor &reactor, char *msg) - : msg_ (msg), - count_ (0), - reactor_ (reactor) - { - // Register the signal handlers. - this->quit_sigkey_ = reactor.register_handler (SIGQUIT, this); - this->int_sigkey_ = reactor.register_handler (SIGINT, this); - - if (this->quit_sigkey_ == -1 || this->int_sigkey_ == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_handler")); - } - - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *) - { - this->count_++; - ACE_DEBUG ((LM_DEBUG, - "\nsignal %S occurred in Sig_Handler_1 (%s, %d, %d) with count = %d", - signum, this->msg_, this->int_sigkey_, this->quit_sigkey_, this->count_)); - if (this->count_ != 1 && signum == SIGQUIT) - { - if (this->reactor_.remove_handler (SIGQUIT, 0, 0, - this->quit_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGQUIT in Sig_Handler_1 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - else if (this->count_ != 2 && signum == SIGINT) - { - if (this->reactor_.remove_handler (SIGINT, 0, 0, - this->int_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGINT in Sig_Handler_1 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - return 0; - } - -protected: - char *msg_; - int count_; - int int_sigkey_; - int quit_sigkey_; - ACE_Reactor &reactor_; -}; - -class Sig_Handler_2 : public Sig_Handler_1 -{ -public: - Sig_Handler_2 (ACE_Reactor &reactor, char *msg) - : Sig_Handler_1 (reactor, msg) - { - } - - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *) - { - this->count_++; - ACE_DEBUG ((LM_DEBUG, - "\nsignal %S occurred in Sig_Handler_2 (%s, %d, %d) with count = %d", - signum, this->msg_, this->int_sigkey_, this->quit_sigkey_, this->count_)); - if (this->count_ != 0 && signum == SIGQUIT) - { - if (this->reactor_.remove_handler (SIGQUIT, 0, 0, - this->quit_sigkey_) == -1) - ACE_ERROR ((LM_ERROR, "\n%p", "remove_handler")); - else - ACE_DEBUG ((LM_DEBUG, "\nshutting down SIGQUIT in Sig_Handler_2 (%s, %d, %d)", - this->msg_, this->int_sigkey_, this->quit_sigkey_)); - } - return 0; - } -}; - -static void -external_handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "\nsignal %S occurred in external handler!", signum)); -} - -#if !defined (HPUX) -int -main (int argc, char *) -{ - // If argc > 1 then allow multiple handlers per-signal, else just - // allow 1 handler per-signal. - ACE_Sig_Handlers multi_handlers; - - ACE_Reactor reactor (argc > 1 ? &multi_handlers: 0); - - if (argc > 1) - { - // Register an "external" signal handler so that the - // ACE_Sig_Handlers code will have something to incorporate! - - ACE_SignalHandler eh = ACE_SignalHandler (external_handler); - ACE_Sig_Action sa (eh); - - sa.register_action (SIGINT); - } - - // Create a bevy of handlers. - Sig_Handler_1 h1 (reactor, "howdy"), h2 (reactor, "doody"); - Sig_Handler_2 h3 (reactor, "tutty"), h4 (reactor, "fruity"); - - // Wait for user to type SIGINT and SIGQUIT. - - for (;;) - { - ACE_DEBUG ((LM_DEBUG, "\nwaiting for SIGINT or SIGQUIT\n")); - - if (reactor.handle_events () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "handle_events")); - } - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "The HP C++ compiler is too lame to support this feature\n"), -1); -} -#endif /* HPUX */ diff --git a/examples/Reactor/Misc/test_time_value.cpp b/examples/Reactor/Misc/test_time_value.cpp deleted file mode 100644 index 6e4f6f494d2..00000000000 --- a/examples/Reactor/Misc/test_time_value.cpp +++ /dev/null @@ -1,69 +0,0 @@ -#include "ace/ACE.h" -// $Id$ - - -inline int my_abs (int d) { return d > 0 ? d : -d; } - -ostream & -operator<< (ostream &stream, const ACE_Time_Value &tv) -{ - if (tv.usec () < 0 || tv.sec () < 0) - stream << "-"; - - stream << dec << my_abs (int (tv.sec ())) << "." -// << setw (6) << setfill ('0') - << dec << my_abs (int (tv.usec ())); - return stream; -} - -int -main (int, char *[]) -{ - ACE_Time_Value tv1; - ACE_Time_Value tv2 (2); - ACE_Time_Value tv3 (100); - ACE_Time_Value tv4 (1, 1000000); - ACE_Time_Value tv5 (2); - ACE_Time_Value tv6 (1, -1000000); - - ACE_ASSERT (tv1 == ACE_Time_Value (0)); - ACE_ASSERT (tv2 < tv3); - ACE_ASSERT (tv2 <= tv2); - ACE_ASSERT (tv2 >= tv4); - ACE_ASSERT (tv5 >= tv6); - ACE_ASSERT (tv2 == ACE_Time_Value (1, 1000000)); - ACE_ASSERT (tv5 == tv4); - ACE_ASSERT (tv2 == tv4); - ACE_ASSERT (tv1 != tv2); - ACE_ASSERT (tv6 == tv1); - - cout << "0,0 :\t\t" << ACE_Time_Value (0,0) << endl; - cout << "-0,0 :\t\t" << ACE_Time_Value (-0,0) << endl; - cout << "0,-0 :\t\t" << ACE_Time_Value (0,-0) << endl; - cout << "-0,-0 :\t\t" << ACE_Time_Value (-0,-0) << endl; - cout << endl; - - cout << "0,1 :\t\t" << ACE_Time_Value (0,1) << endl; - cout << "1,0 :\t\t" << ACE_Time_Value (1,0) << endl; - cout << "-1,0 :\t\t" << ACE_Time_Value (-1,0) << endl; - cout << "-1,-0 :\t\t" << ACE_Time_Value (-1,-0) << endl; - cout << endl; - - cout << "1,1 :\t\t" << ACE_Time_Value (1,1) << endl; - cout << "-1,1 :\t\t" << ACE_Time_Value (-1,1) << endl; - cout << "1,-1 :\t\t" << ACE_Time_Value (1,-1) << endl; - cout << "-1,-1 :\t\t" << ACE_Time_Value (-1,-1) << endl; - cout << endl; - - cout << "1,-1111111 :\t" << ACE_Time_Value (1,-1111111) << endl; - cout << "1,-100000 :\t" << ACE_Time_Value (1,-100000) << endl; - cout << "1,-1000000 :\t" << ACE_Time_Value (1,-1000000) << endl; - cout << "-1,1000000 :\t" << ACE_Time_Value (-1,1000000) << endl; - cout << "5,-1000000 :\t" << ACE_Time_Value (5,-1000000) << endl; - cout << "5,-1500000 :\t" << ACE_Time_Value (5,-1500000) << endl; - cout << "2,-2500000 :\t" << ACE_Time_Value (2,-2500000) << endl; - cout << "2,-4500000 :\t" << ACE_Time_Value (2,-4500000) << endl; - - return 0; -} - diff --git a/examples/Reactor/Misc/test_timer_queue.cpp b/examples/Reactor/Misc/test_timer_queue.cpp deleted file mode 100644 index d31ae9d6874..00000000000 --- a/examples/Reactor/Misc/test_timer_queue.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// $Id$ - -#include "ace/Timer_Heap.h" -#include "ace/Timer_List.h" - -class Example_Handler : public ACE_Event_Handler -{ -public: - Example_Handler (void) - : count_ (0) - {} - - virtual int handle_timeout (const ACE_Time_Value &, const void *arg) - { - ACE_DEBUG ((LM_DEBUG, - "yow, the time has come and gone %d times %d, Horatio!\n", - this->count_++, int (arg))); - return 0; - } - -private: - int count_; -}; - -static void -test_functionality (ACE_Timer_Queue *tq) -{ - Example_Handler eh; - - ACE_ASSERT (tq->is_empty ()); - ACE_ASSERT (ACE_Time_Value::zero == ACE_Time_Value (0)); - int timer_id; - - timer_id = tq->schedule (&eh, (const void *) 1, ACE_OS::gettimeofday ()); - ACE_ASSERT (timer_id != -1); - - ACE_ASSERT (tq->schedule (&eh, (const void *) 42, - ACE_OS::gettimeofday ()) != -1); - ACE_ASSERT (tq->schedule (&eh, (const void *) 42, - ACE_OS::gettimeofday ()) != -1); - ACE_ASSERT (tq->cancel (timer_id) == 1); - ACE_ASSERT (!tq->is_empty ()); - - ACE_ASSERT (tq->expire () == 2); - - ACE_ASSERT (tq->schedule (&eh, (const void *) 4, ACE_OS::gettimeofday - ()) != -1); - ACE_ASSERT (tq->schedule (&eh, (const void *) 5, ACE_OS::gettimeofday - ()) != -1); - ACE_ASSERT (tq->cancel (&eh) == 2); - ACE_ASSERT (tq->is_empty ()); - ACE_ASSERT (tq->expire () == 0); -} - -struct Timer_Queues -{ - ACE_Timer_Queue *queue_; - // Pointer to the subclass of <ACE_Timer_Queue> that we're testing. - - const char *name_; - // Name of the Queue that we're testing. -}; - -static Timer_Queues timer_queues[] = -{ - { new ACE_Timer_List, "ACE_Timer_List" }, - { new ACE_Timer_Heap, "ACE_Timer_Heap" }, - { 0, 0 }, -}; - -int -main (int, char *[]) -{ - for (int i = 0; timer_queues[i].name_ != 0; i++) - { - test_functionality (timer_queues[i].queue_); - delete timer_queues[i].queue_; - } - - return 0; -} diff --git a/examples/Reactor/Multicast/Log_Wrapper.cpp b/examples/Reactor/Multicast/Log_Wrapper.cpp deleted file mode 100644 index 9b98aca7990..00000000000 --- a/examples/Reactor/Multicast/Log_Wrapper.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// $Id$ - -// client.C - -#include "Log_Wrapper.h" - -Log_Wrapper::Log_Wrapper (void) -{ - sequence_number_ = 0; - this->log_msg_.app_id = ACE_OS::getpid (); -} - -Log_Wrapper::~Log_Wrapper (void) -{ -} - -// Set the log_msg_ host address. - -int -Log_Wrapper::open (const int port, const char *mcast_addr) -{ - struct hostent *host_info; - struct utsname host_data; - - if (ACE_OS::uname (&host_data) < 0) - return -1; - - if ((host_info = ACE_OS::gethostbyname (host_data.nodename)) == NULL) - return -1; - else - ACE_OS::memcpy ((char *) &this->log_msg_.host, - (char *) host_info->h_addr, - host_info->h_length); - - // This starts out initialized to all zeros! - server_ = ACE_INET_Addr(port, mcast_addr); - - if (logger_.subscribe (server_) == -1) - perror("can't subscribe to multicast group"), exit(1); - - // success. - return 0; -} - -// Send the message to a logger object. -// This wrapper fills in all the log_record info for you. -// uses iovector stuff to make contiguous header and message. - -int -Log_Wrapper::log_message (ACE_Log_Priority type, char *message) -{ - sequence_number_++; - - this->log_msg_.type = type; - this->log_msg_.time = time (0); - this->log_msg_.msg_length = strlen(message)+1; - this->log_msg_.sequence_number = htonl(sequence_number_); - - iovec *iovp = new iovec[2]; - iovp[0].iov_base = (char *) &log_msg_; - iovp[0].iov_len = sizeof log_msg_; - iovp[1].iov_base = message; - iovp[1].iov_len = log_msg_.msg_length; - - logger_.send (iovp, 2); - - delete iovp; - - // success. - return 0; -} - diff --git a/examples/Reactor/Multicast/Log_Wrapper.h b/examples/Reactor/Multicast/Log_Wrapper.h deleted file mode 100644 index 859ed3c3ae6..00000000000 --- a/examples/Reactor/Multicast/Log_Wrapper.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// log_wrapper.h - -#include "ace/Profile_Timer.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram_Mcast.h" - -#if !defined (_LOG_WRAPPER_H) -#define _LOG_WRAPPER_H - -class Log_Wrapper - // = TITLE - // Provide a wrapper around sending log messages via IP - // multicast. -{ -public: - Log_Wrapper (void); - ~Log_Wrapper (void); - - // = Types of logging messages. - enum ACE_Log_Priority - { - LOG_MESSAGE, - LOG_DEBUG, - LOG_WARNING, - LOG_ERROR, - LOG_EMERG - }; - - int open (const int port, const char* mcast_addr); - // get an object reference from an orbixd - - int log_message (ACE_Log_Priority type, char *message); - // send a string to the logger - - // = Format of the logging record. - struct ACE_Log_Record - { - u_long sequence_number; - ACE_Log_Priority type; - long host; - long time; - long app_id; - long msg_length; - }; - -private: - ACE_INET_Addr server_; - // Server address where records are logged. - - u_long sequence_number_; - // Keep track of the sequence. - - ACE_Log_Record log_msg_; - // One record used for many log messages. - - ACE_SOCK_Dgram_Mcast logger_; - // A logger object. -}; - -#endif /* _LOG_WRAPPER_H */ diff --git a/examples/Reactor/Multicast/Makefile b/examples/Reactor/Multicast/Makefile deleted file mode 100644 index 3848fb2e54a..00000000000 --- a/examples/Reactor/Multicast/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Reactor multicast tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = client server - -FILES = Log_Wrapper - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LDLIBS = $(addprefix .shobj/,$(SHOBJ)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# ACE stuff -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Log_Wrapper.o .shobj/Log_Wrapper.so: Log_Wrapper.cpp Log_Wrapper.h \ - $(WRAPPER_ROOT)/ace/Profile_Timer.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Reactor/Multicast/README b/examples/Reactor/Multicast/README deleted file mode 100644 index 85f64cc8120..00000000000 --- a/examples/Reactor/Multicast/README +++ /dev/null @@ -1,15 +0,0 @@ -The following test illustrates the SOCK Mcast multicast wrappers in -conjunction with the Reactor. This test was written by Tim Harrison -(harrison@cs.wustl.edu). - -To run the server type: - -% server & - -It will wait for the first message sent to it and then read for 5 seconds. - -To run the client type any of these: - -% client -m max_message_size -i iterations -% client < <filename> -% client diff --git a/examples/Reactor/Multicast/client.cpp b/examples/Reactor/Multicast/client.cpp deleted file mode 100644 index db85cc16a8f..00000000000 --- a/examples/Reactor/Multicast/client.cpp +++ /dev/null @@ -1,118 +0,0 @@ -// $Id$ - -// This program reads in messages from stdin and sends them to a -// Log_Wrapper. - -#include "ace/Get_Opt.h" -#include "Log_Wrapper.h" - -// Multi-cast address. -static const char *MCAST_ADDR = ACE_DEFAULT_MULTICAST_ADDR; - -// UDP port. -static const int UDP_PORT = ACE_DEFAULT_MULTICAST_PORT; - -// Maximum message size. -static int max_message_size = BUFSIZ; - -// Number of times to send message of max_message_size. -static int iterations = 0; - -static void -parse_args (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - - // Start at argv[1] - ACE_Get_Opt getopt (argc, argv, "m:ui:", 1); - - for (int c; (c = getopt ()) != -1; ) - switch (c) - { - case 'm': - max_message_size = ACE_OS::atoi (getopt.optarg) * BUFSIZ; - break; - case 'i': - iterations = ACE_OS::atoi (getopt.optarg); - break; - case 'u': - // usage fallthrough - default: - ACE_ERROR ((LM_ERROR, - "%n: -m max_message_size (in k) -i iterations\n%a", - 1)); - /* NOTREACHED */ - } -} - -int -main (int argc, char **argv) -{ - int user_prompt; - - parse_args (argc,argv); - - ACE_DEBUG ((LM_DEBUG, "max buffer size = %d\n", max_message_size)); - - // Instantiate a log wrapper for logging - Log_Wrapper log; - - // Make a connection to a logger. - if (log.open (UDP_PORT, MCAST_ADDR) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n" "open"), -1); - - char *buf; - ACE_NEW_RETURN (buf, char[max_message_size], -1); - - // If -i has been specified, send max_message_size messages - // iterations number of times. - if (iterations) - { - ACE_OS::memset (buf, 1, max_message_size); - - while (iterations--) - if (log.log_message (Log_Wrapper::LOG_DEBUG, buf) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n" "log"), -1); - } - - // otherwise, a file has been redirected, or give prompts - else - { - // If a file has been redirected, don't activate user prompts. - if (ACE_OS::isatty (0)) - user_prompt = 1; - else - user_prompt = 0; - - // Continually read messages from stdin and log them. - - for (int count = 1;;) - { - if (user_prompt) - ACE_DEBUG ((LM_DEBUG, "\nEnter message ('Q':quit):\n")); - - ssize_t nbytes = ACE_OS::read (ACE_STDIN, buf, max_message_size); - - if (nbytes <= 0) - break; // End of file or error. - buf[nbytes - 1] = '\0'; - - // Quitting? - if (user_prompt) - { - if (buf[0] == 'Q' || buf[0] == 'q') - break; - } - else // Keep from overrunning the receiver. - ACE_OS::sleep (1); - - // Send the message to the logger. - if (log.log_message (Log_Wrapper::LOG_DEBUG, buf) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n" "log_message"), -1); - ACE_DEBUG ((LM_DEBUG, "finished sending message %d\n", count++)); - } - } - - ACE_DEBUG ((LM_DEBUG, "Client done.\n")); - return 0; -} diff --git a/examples/Reactor/Multicast/server.cpp b/examples/Reactor/Multicast/server.cpp deleted file mode 100644 index 473e92bcb42..00000000000 --- a/examples/Reactor/Multicast/server.cpp +++ /dev/null @@ -1,212 +0,0 @@ -// $Id$ - -// server.C (written by Tim Harrison) - -// Listens to multicast address for client log messages. Prints -// Mbits/sec received from client. - -#include "ace/SOCK_Dgram.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram_Mcast.h" -#include "ace/Reactor.h" -#include "Log_Wrapper.h" - -#if defined (ACE_HAS_IP_MULTICAST) -class Server_Events : public ACE_Event_Handler -{ -public: - Server_Events (u_short port, - const char *mcast_addr, - long time_interval = 0); - ~Server_Events (void); - - virtual int handle_input (ACE_HANDLE fd); - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); - - virtual ACE_HANDLE get_handle (void) const; - - ACE_Time_Value *wait_time (void); - -private: - char *message_; - Log_Wrapper::ACE_Log_Record *log_record_; - char buf_[4 * BUFSIZ]; - char hostname_[MAXHOSTNAMELEN]; - - int initialized_; - int count_; - int interval_; - // time interval to log messages - - ACE_Time_Value *how_long_; - ACE_Reactor *reactor_; - ACE_SOCK_Dgram_Mcast mcast_dgram_; - ACE_INET_Addr remote_addr_; - ACE_INET_Addr mcast_addr_; - - // = statistics on messages received - double total_bytes_received_; - int total_messages_received_; - int last_sequence_number_; -}; - -static const char MCAST_ADDR[] = ACE_DEFAULT_MULTICAST_ADDR; -static const int UDP_PORT = ACE_DEFAULT_MULTICAST_PORT; -static const int DURATION = 5; - -ACE_HANDLE -Server_Events::get_handle (void) const -{ - return this->mcast_dgram_.get_handle (); -} - -ACE_Time_Value * -Server_Events::wait_time (void) -{ - return this->how_long_; -} - -Server_Events::Server_Events (u_short port, - const char *mcast_addr, - long time_interval) - : initialized_ (0), - count_ (1), - interval_ (time_interval), - mcast_addr_ (port, mcast_addr), - total_bytes_received_ (0) -{ - // Use ACE_SOCK_Dgram_Mcast factory to subscribe to multicast group. - - if (ACE_OS::hostname (this->hostname_, MAXHOSTNAMELEN) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "hostname")); - - else if (this->mcast_dgram_.subscribe (this->mcast_addr_) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "subscribe")); - - else - { - // Point to NULL so that we block in the beginning. - this->how_long_ = 0; - - this->log_record_ = (Log_Wrapper::ACE_Log_Record *) &buf_; - this->message_ = &buf_[sizeof (Log_Wrapper::ACE_Log_Record)]; - } -} - -// A destructor that emacs refuses to color blue ;-) - -Server_Events::~Server_Events (void) -{ - this->mcast_dgram_.unsubscribe (); - - ACE_DEBUG ((LM_DEBUG, "total bytes received = %d after %d second\n", - this->total_bytes_received_, this->interval_)); - - ACE_DEBUG ((LM_DEBUG, "Mbits/sec = %.2f\n", - (float) (total_bytes_received_ * 8 / (float) (1024*1024*interval_)))); - - ACE_DEBUG ((LM_DEBUG, - "last sequence number = %d\ntotal messages received = %d\ndiff = %d\n", - this->last_sequence_number_, - this->total_messages_received_, - this->last_sequence_number_ - total_messages_received_)); -} - -int -Server_Events::handle_timeout (const ACE_Time_Value &, - const void *arg) -{ - ACE_DEBUG ((LM_DEBUG, "\t%d timeout%s occurred for %s.\n", - this->count_, - this->count_ == 1 ? "" : "s", - (char *) arg)); - - // Don't let the timeouts continue if there's no activity since - // otherwise we use up a lot of CPU time unnecessarily. - if (this->count_ == 5) - { - reactor ()->cancel_timer (this); - this->initialized_ = 0; - - ACE_DEBUG ((LM_DEBUG, - "\t%cancelled timeout for %s to avoid busy waiting.\n", - (char *) arg)); - } - - this->count_++; - return 0; -} - -int -Server_Events::handle_input (ACE_HANDLE) -{ - // Receive message from multicast group. - iovec iovp[2]; - iovp[0].iov_base = buf_; - iovp[0].iov_len = sizeof log_record_; - iovp[1].iov_base = &buf_[sizeof (log_record_)]; - iovp[1].iov_len = 4 * BUFSIZ - sizeof log_record_; - - ssize_t retcode = - this->mcast_dgram_.recv (iovp, 2, this->remote_addr_); - - if (retcode != -1) - { - total_messages_received_++; - total_bytes_received_ += retcode; - last_sequence_number_ = ntohl (log_record_->sequence_number); - - ACE_DEBUG ((LM_DEBUG, "sequence number = %d\n", - last_sequence_number_)); - ACE_DEBUG ((LM_DEBUG, "message = '%s'\n", - this->message_)); - - if (this->initialized_ == 0) - { - // Restart the timer since we've received events again. - reactor()->schedule_timer (this, - (void *) this->hostname_, - ACE_Time_Value::zero, - ACE_Time_Value (DURATION)); - this->initialized_ = 1; - } - - this->count_ = 1; - return 0; - } - else - return -1; -} - -int -main (int, char *[]) -{ - // Instantiate a server which will receive messages for DURATION - // seconds. - Server_Events server_events (UDP_PORT, MCAST_ADDR, DURATION); - - // Instance of the ACE_Reactor. - ACE_Reactor reactor; - - if (reactor.register_handler (&server_events, - ACE_Event_Handler::READ_MASK) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "register_handler", 1)); - - ACE_DEBUG ((LM_DEBUG, "starting up server\n")); - - for (;;) - reactor.handle_events (server_events.wait_time ()); - - /* NOTREACHED */ - return 0; -} -#else -int -main (int, char *argv[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "error: %s must be run on a platform that support IP multicast\n", - argv[0]), -1); -} -#endif /* ACE_HAS_IP_MULTICAST */ diff --git a/examples/Reactor/Ntalker/Makefile b/examples/Reactor/Ntalker/Makefile deleted file mode 100644 index af41c0b8194..00000000000 --- a/examples/Reactor/Ntalker/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for ntalker demo of SOCK_Dgram_Mcast -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = ntalker - -SRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# ACE stuff -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/ntalker.o .shobj/ntalker.so: ntalker.cpp \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram_Mcast.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram_Mcast.i \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Reactor/Ntalker/ntalker.cpp b/examples/Reactor/Ntalker/ntalker.cpp deleted file mode 100644 index ad0daf3879f..00000000000 --- a/examples/Reactor/Ntalker/ntalker.cpp +++ /dev/null @@ -1,174 +0,0 @@ -// Server.C -// $Id$ - -// -// listens to multicast address. after first message received, will -// listen for 5 more seconds. prints Mbits/sec received from client - -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram_Mcast.h" -#include "ace/Reactor.h" -#include "ace/Get_Opt.h" -#include "ace/Thread_Manager.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_IP_MULTICAST) -// network interface to subscribe to -// this is hardware specific. -// use netstat(1M) to find whether your interface -// is le0 or ie0 - -static const char *INTERFACE = 0; -static const char *MCAST_ADDR = ACE_DEFAULT_MULTICAST_ADDR; -static const u_short UDP_PORT = ACE_DEFAULT_MULTICAST_PORT; - -// Handle both multicast and stdin events. - -class Handler : public ACE_Event_Handler -{ -public: - Handler (u_short udp_port, - const char *ip_addr, - const char *interface, - ACE_Reactor &); - ~Handler (void); - - virtual int handle_input (ACE_HANDLE); - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - -private: - ACE_SOCK_Dgram_Mcast mcast_; -}; - -int -Handler::handle_input (ACE_HANDLE h) -{ - char buf[BUFSIZ]; - - if (h == ACE_STDIN) - { - int result = ACE_OS::read (h, buf, BUFSIZ); - if (result > 0) - { - if (this->mcast_.send (buf, result) != result) - { - ACE_OS::perror ("send error"); - return -1; - } - return 0; - } - else if (result == -1) - ::perror ("can't read from STDIN"); - - return -1; - } - else - { - ACE_INET_Addr remote_addr; - - // receive message from multicast group - int result = this->mcast_.recv (buf, sizeof buf, remote_addr); - if (result != -1) - { - cout << "received datagram from host " << remote_addr.get_host_name () - << " on port " << remote_addr.get_port_number () - << " bytes = " << result << endl; - ACE_OS::write (ACE_STDOUT, buf, result); - cout << endl; - return 0; - } - - ACE_OS::perror ("Something amiss."); - return -1; - } -} - -int -Handler::handle_close (ACE_HANDLE h, ACE_Reactor_Mask) -{ - if (h == ACE_STDIN) - cout << "STDIN_Events handle removed from reactor." << endl << flush; - else - cout << "Mcast_Events handle removed from reactor." << endl << flush; - return 0; -} - -Handler::~Handler (void) -{ - // ACE_OS::exit on error (bogus)... - - if (this->mcast_.unsubscribe () == -1) - ACE_OS::perror ("unsubscribe fails"), ACE_OS::exit (1); -} - -Handler::Handler (u_short udp_port, - const char *ip_addr, - const char *interface, - ACE_Reactor &reactor) -{ - // Create multicast address to listen on. - - ACE_INET_Addr sockmc_addr (udp_port, ip_addr); - - // subscribe to multicast group. - - if (this->mcast_.subscribe (sockmc_addr, 1, interface) == -1) - ACE_OS::perror ("can't subscribe to multicast group"), ACE_OS::exit (1); - - // Disable loopbacks. - // if (this->mcast_.set_option (IP_MULTICAST_LOOP, 0) == -1 ) - // ACE_OS::perror (" can't disable loopbacks " ), ACE_OS::exit (1); - - // Register callbacks with the ACE_Reactor. - if (reactor.register_handler (this->mcast_.get_handle (), - this, - ACE_Event_Handler::READ_MASK) == -1) - ACE_OS::perror ("can't register events"), ACE_OS::exit (1); -} - -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "i:u"); - - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 'i': - INTERFACE = get_opt.optarg; - break; - case 'u': - // Usage fallthrough. - default: - ACE_DEBUG ((LM_DEBUG, "%s -i interface\n", argv[0])); - ACE_OS::exit (1); - } -} - -int -main (int argc, char *argv[]) -{ - parse_args (argc, argv); - - Handler handler (UDP_PORT, MCAST_ADDR, INTERFACE, *ACE_Service_Config::reactor ()); - - ACE::register_stdin_handler (&handler, - ACE_Service_Config::reactor (), - ACE_Service_Config::thr_mgr ()); - - ACE_Service_Config::run_reactor_event_loop (); - - cout << "\ntalker Done.\n"; - return 0; -} -#else -int -main (int argc, char *argv[]) -{ - ACE_ERROR ((LM_ERROR, "error: %s must be run on a platform that support IP multicast\n", - argv[0])); - return 0; -} -#endif /* ACE_HAS_IP_MULTICAST */ diff --git a/examples/Reactor/Ntalker/ntalker.mak b/examples/Reactor/Ntalker/ntalker.mak deleted file mode 100644 index dbf071441a3..00000000000 --- a/examples/Reactor/Ntalker/ntalker.mak +++ /dev/null @@ -1,229 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-!IF "$(CFG)" == ""
-CFG=ntalker - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to ntalker - Win32 Debug.
-!ENDIF
-
-!IF "$(CFG)" != "ntalker - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "ntalker.mak" CFG="ntalker - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ntalker - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "ntalker - Win32 Debug"
-RSC=rc.exe
-CPP=cl.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "debug"
-OUTDIR=.\.
-INTDIR=.\debug
-
-ALL : "$(OUTDIR)\ntalker.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\ntalker.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\ntalker.exe"
- -@erase "$(OUTDIR)\ntalker.ilk"
- -@erase "$(OUTDIR)\ntalker.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "MULTI_THREADED" /YX /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/ntalker.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/ntalker.pdb" /debug /machine:I386 /out:"$(OUTDIR)/ntalker.exe"
-LINK32_OBJS= \
- "$(INTDIR)\ntalker.obj"
-
-"$(OUTDIR)\ntalker.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /D "MULTI_THREADED" /Fp"$(INTDIR)/ntalker.pch" /YX /Fo"$(INTDIR)/"\
- /Fd"$(INTDIR)/" /c
-CPP_OBJS=.\debug/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-################################################################################
-# Begin Target
-
-# Name "ntalker - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\ntalker.cpp
-DEP_CPP_NTALK=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_Dgram.h"\
- {$(INCLUDE)}"\ace\SOCK_Dgram.i"\
- {$(INCLUDE)}"\ace\SOCK_Dgram_Mcast.h"\
- {$(INCLUDE)}"\ace\SOCK_Dgram_Mcast.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\ntalker.obj" : $(SOURCE) $(DEP_CPP_NTALK) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
diff --git a/examples/Reactor/Ntalker/ntalker.mdp b/examples/Reactor/Ntalker/ntalker.mdp Binary files differdeleted file mode 100644 index f901cfbb539..00000000000 --- a/examples/Reactor/Ntalker/ntalker.mdp +++ /dev/null diff --git a/examples/Reactor/Proactor/test_proactor.cpp b/examples/Reactor/Proactor/test_proactor.cpp deleted file mode 100644 index d70baddd91b..00000000000 --- a/examples/Reactor/Proactor/test_proactor.cpp +++ /dev/null @@ -1,552 +0,0 @@ -// $Id: test_proactor.cpp,v - -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// test_proactor.cpp -// -// = DESCRIPTION -// This program illustrates how the ACE_Proactor can be used to -// implement an application that does various asynchronous -// operations. -// -// = AUTHOR -// Irfan Pyarali (irfan@cs.wusl.edu) -// -// ============================================================================ - -#include "ace/Service_Config.h" -#include "ace/Proactor.h" -#include "ace/Asynch_IO.h" -#include "ace/Asynch_Acceptor.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_Connector.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/SOCK_Stream.h" -#include "ace/Message_Block.h" -#include "ace/Get_Opt.h" - -static char *host = 0; -static u_short port = ACE_DEFAULT_SERVER_PORT; -static char *file = "test_proactor.cpp"; -static char *dump_file = "output"; -static int done = 0; - -class Receiver : public ACE_Service_Handler - // - // = TITLE - // - // Receiver - // - // = DESCRIPTION - // - // The class will be created by ACE_Asynch_Acceptor when new - // connections arrive. This class will then receive data from - // the network connection and dump it to a file. -{ -public: - Receiver (void); - ~Receiver (void); - - virtual void open (ACE_HANDLE handle, - ACE_Message_Block &message_block); - // This is called after the new connection has been accepted. - -protected: - // These methods are called by the framework - - virtual void handle_read_stream (const ACE_Asynch_Read_Stream::Result &result); - // This is called when asynchronous read from the socket complete - - virtual void handle_write_file (const ACE_Asynch_Write_File::Result &result); - // This is called when asynchronous writes to the file complete - -private: - int initiate_read_stream (void); - - ACE_Asynch_Read_Stream rs_; - // rs (read stream): for reading from a socket - - ACE_HANDLE dump_file_; - // File for dumping data - - ACE_Asynch_Write_File wf_; - // wf (write file): for writing to a file - - u_long file_offset_; - // Offset for the file - - ACE_HANDLE handle_; - // Handle for IO to remote peer -}; - -Receiver::Receiver (void) - : handle_ (ACE_INVALID_HANDLE), - dump_file_ (ACE_INVALID_HANDLE) -{ -} - -Receiver::~Receiver (void) -{ - ACE_OS::close (this->dump_file_); - ACE_OS::closesocket (this->handle_); -} - -void -Receiver::open (ACE_HANDLE handle, - ACE_Message_Block &message_block) -{ - // New connection, initiate stuff - - // Cache the new connection - this->handle_ = handle; - - // File offset starts at zero - this->file_offset_ = 0; - - // Open dump file (in OVERLAPPED mode) - this->dump_file_ = ACE_OS::open (dump_file, _O_CREAT | O_RDWR | _O_TRUNC | FILE_FLAG_OVERLAPPED); - if (this->dump_file_ == ACE_INVALID_HANDLE) - { - ACE_ERROR ((LM_ERROR, "%p\n", "ACE_OS::open")); - return; - } - - // Initiate ACE_Asynch_Write_File - if (this->wf_.open (*this, this->dump_file_) == -1) - { - ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Asynch_Write_File::open")); - return; - } - - // Initiate ACE_Asynch_Read_Stream - if (this->rs_.open (*this, this->handle_) == -1) - { - ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Asynch_Read_Stream::open")); - return; - } - - // Print any initial data which came withthe AcceptEx call - message_block.rd_ptr ()[message_block.length ()] = '\0'; - ACE_DEBUG ((LM_DEBUG, "%s = %s\n", "Initial data", message_block.rd_ptr ())); - - // Initiate new read from the stream - if (this->initiate_read_stream () == -1) - return; -} - -int -Receiver::initiate_read_stream (void) -{ - // Create Message_Block - ACE_Message_Block *mb = 0; - ACE_NEW_RETURN (mb, ACE_Message_Block (BUFSIZ + 1), -1); - - // Inititiate read - if (this->rs_.read (*mb, - mb->size () - 1) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Asynch_Read_Stream::read"), -1); - - return 0; -} - -void -Receiver::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result) -{ - ACE_DEBUG ((LM_DEBUG, "handle_read_stream called\n")); - - // Reset pointers - result.message_block ().rd_ptr ()[result.message_block ().length ()] = '\0'; - - ACE_DEBUG ((LM_DEBUG, "********************\n")); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_to_read", result.bytes_to_read ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "handle", result.handle ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_transfered", result.bytes_transferred ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "act", (u_long) result.act ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "success", result.success ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "completion_key", (u_long) result.completion_key ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "error", result.error ())); - ACE_DEBUG ((LM_DEBUG, "********************\n")); - ACE_DEBUG ((LM_DEBUG, "%s = %s\n", "message_block", result.message_block ().rd_ptr ())); - - if (result.success () && result.bytes_transferred () != 0) - { - // Successful read: Write the data to the file. - if (this->wf_.write (result.message_block (), - result.message_block ().length (), - this->file_offset_) == -1) - { - ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Asynch_Write_File::write")); - return; - } - - // Initiate new read from the stream - if (this->initiate_read_stream () == -1) - return; - } - else - done = 1; -} - -void -Receiver::handle_write_file (const ACE_Asynch_Write_File::Result &result) -{ - ACE_DEBUG ((LM_DEBUG, "handle_write_file called\n")); - - ACE_DEBUG ((LM_DEBUG, "********************\n")); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_to_write", result.bytes_to_write ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "handle", result.handle ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_transfered", result.bytes_transferred ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "act", (u_long) result.act ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "success", result.success ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "completion_key", (u_long) result.completion_key ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "error", result.error ())); - ACE_DEBUG ((LM_DEBUG, "********************\n")); - - result.message_block ().release (); - - if (result.success ()) - // Write successful: Increment file offset - this->file_offset_ += result.bytes_transferred (); -} - -class Sender : public ACE_Handler - // - // = TITLE - // - // Sender - // - // = DESCRIPTION - // - // The class will be created by main(). After connecting to the - // host, this class will then read data from a file and send it - // to the network connection. -{ -public: - Sender (void); - ~Sender (void); - int open (const char *host, - u_short port); - ACE_HANDLE handle (void) const; - -protected: - // These methods are called by the freamwork - - virtual void handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result); - // This is called when asynchronous transmit files complete - virtual void handle_write_stream (const ACE_Asynch_Write_Stream::Result &result); - // This is called when asynchronous writes from the socket complete - virtual void handle_read_file (const ACE_Asynch_Read_File::Result &result); - // This is called when asynchronous reads from the socket complete - -private: - int transmit_file (void); - - int initiate_read_file (void); - - ACE_SOCK_Stream stream_; - // Network I/O handle - - ACE_Asynch_Write_Stream ws_; - // ws (write stream): for writing to the socket - - ACE_Asynch_Read_File rf_; - // rf (read file): for writing from the file - - ACE_HANDLE input_file_; - // File to read from - - u_long file_offset_; - // Current file offset - - u_long file_size_; - // File size - - ACE_Message_Block welcome_message_; - // Welcome message - - ACE_Asynch_Transmit_File::Header_And_Trailer header_and_trailer_; - // Header and trailer which goes with transmit_file - - int stream_write_done_; - int transmit_file_done_; - // These flags help to determine when to close down the event loop -}; - - -Sender::Sender (void) - : input_file_ (ACE_INVALID_HANDLE), - file_offset_ (0), - file_size_ (0), - stream_write_done_ (0), - transmit_file_done_ (0) -{ - // Moment of inspiration :-) - static char *data = "Welcome to Irfan World! Irfan RULES here !!"; - this->welcome_message_.init (data, ACE_OS::strlen (data)); - this->welcome_message_.wr_ptr (ACE_OS::strlen (data)); -} - -Sender::~Sender (void) -{ - this->stream_.close (); -} - -ACE_HANDLE -Sender::handle (void) const -{ - return this->stream_.get_handle (); -} - -int -Sender::open (const char *host, - u_short port) -{ - // Initialize stuff - - // Open input file (in OVERLAPPED mode) - this->input_file_ = ACE_OS::open (file, GENERIC_READ | FILE_FLAG_OVERLAPPED); - if (this->input_file_ == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::open"), -1); - - // Find file size - this->file_size_ = ACE_OS::filesize (this->input_file_); - - // Connect to remote host - ACE_INET_Addr address (port, host); - ACE_SOCK_Connector connector; - if (connector.connect (this->stream_, - address) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_SOCK_Connector::connect"), -1); - - // Open ACE_Asynch_Write_Stream - if (this->ws_.open (*this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Asynch_Write_Stream::open"), -1); - - // Open ACE_Asynch_Read_File - if (this->rf_.open (*this, this->input_file_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Asynch_Read_File::open"), -1); - - // Start an asynchronous transmit file - if (this->transmit_file () == -1) - return -1; - - // Start an asynchronous read file - if (initiate_read_file () == -1) - return -1; - - return 0; -} - -int -Sender::initiate_read_file (void) -{ - // Create Message_Block - ACE_Message_Block *mb = 0; - ACE_NEW_RETURN (mb, ACE_Message_Block (BUFSIZ + 1), -1); - - // Inititiate an asynchronous read from the file - if (this->rf_.read (*mb, - mb->size () - 1, - this->file_offset_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Asynch_Read_File::read"), -1); - - return 0; -} - -int -Sender::transmit_file (void) -{ - // Open file (in SEQUENTIAL_SCAN mode) - ACE_HANDLE file_handle = ACE_OS::open (file, GENERIC_READ | FILE_FLAG_SEQUENTIAL_SCAN); - if (file_handle == ACE_INVALID_HANDLE) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_OS::open"), -1); - - // Open ACE_Asynch_Transmit_File - ACE_Asynch_Transmit_File tf; - if (tf.open (*this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Asynch_Transmit_File::open"), -1); - - // Header and trailer data for the file - this->header_and_trailer_.header_and_trailer (&this->welcome_message_, - this->welcome_message_.length (), - &this->welcome_message_, - this->welcome_message_.length ()); - - // Starting position - cerr << "Staring position: " << ACE_OS::lseek (file_handle, 0L, SEEK_CUR) << endl; - - // Send it - if (tf.transmit_file (file_handle, - &this->header_and_trailer_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Asynch_Transmit_File::transmit_file"), -1); - - return 0; -} - -void -Sender::handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result) -{ - ACE_DEBUG ((LM_DEBUG, "handle_transmit_file called\n")); - - ACE_DEBUG ((LM_DEBUG, "********************\n")); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "socket", result.socket ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "file", result.file ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_to_write", result.bytes_to_write ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_per_send", result.bytes_per_send ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "flags", result.flags ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_transfered", result.bytes_transferred ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "act", (u_long) result.act ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "success", result.success ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "completion_key", (u_long) result.completion_key ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "error", result.error ())); - ACE_DEBUG ((LM_DEBUG, "********************\n")); - - // Ending position - cerr << "Ending position: " << ACE_OS::lseek (result.file (), 0L, SEEK_CUR) << endl; - - // Done with file - ACE_OS::close (result.file ()); - - this->transmit_file_done_ = 1; - if (this->stream_write_done_) - done = 1; -} - -void -Sender::handle_read_file (const ACE_Asynch_Read_File::Result &result) -{ - ACE_DEBUG ((LM_DEBUG, "handle_read_file called\n")); - - result.message_block ().rd_ptr ()[result.message_block ().length ()] = '\0'; - - ACE_DEBUG ((LM_DEBUG, "********************\n")); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_to_read", result.bytes_to_read ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "handle", result.handle ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_transfered", result.bytes_transferred ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "act", (u_long) result.act ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "success", result.success ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "completion_key", (u_long) result.completion_key ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "error", result.error ())); - ACE_DEBUG ((LM_DEBUG, "********************\n")); - //ACE_DEBUG ((LM_DEBUG, "%s = %s\n", "message_block", result.message_block ().rd_ptr ())); - - if (result.success ()) - { - // Read successful: increment offset and write data to network - this->file_offset_ += result.bytes_transferred (); - if (this->ws_.write (result.message_block (), - result.message_block ().length ()) == -1) - { - ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Asynch_Write_Stream::write")); - return; - } - - if (this->file_size_ > this->file_offset_) - { - // Start an asynchronous read file - if (initiate_read_file () == -1) - return; - } - } -} - -void -Sender::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result) -{ - ACE_DEBUG ((LM_DEBUG, "handle_write_stream called\n")); - - // Reset pointers - result.message_block ().rd_ptr (-result.bytes_transferred ()); - - ACE_DEBUG ((LM_DEBUG, "********************\n")); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_to_write", result.bytes_to_write ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "handle", result.handle ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "bytes_transfered", result.bytes_transferred ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "act", (u_long) result.act ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "success", result.success ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "completion_key", (u_long) result.completion_key ())); - ACE_DEBUG ((LM_DEBUG, "%s = %d\n", "error", result.error ())); - ACE_DEBUG ((LM_DEBUG, "********************\n")); - ACE_DEBUG ((LM_DEBUG, "%s = %s\n", "message_block", result.message_block ().rd_ptr ())); - - result.message_block ().release (); - - if (result.success ()) - if (!(this->file_size_ > this->file_offset_)) - { - this->stream_write_done_ = 1; - if (this->transmit_file_done_) - done = 1; - } -} - -static int -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "h:p:f:d:"); - int c; - - while ((c = get_opt ()) != EOF) - switch (c) - { - case 'h': - host = get_opt.optarg; - break; - case 'p': - port = ACE_OS::atoi (get_opt.optarg); - break; - case 'f': - file = get_opt.optarg; - break; - case 'd': - dump_file = get_opt.optarg; - break; - default: - ACE_ERROR ((LM_ERROR, "%p.\n", - "usage :\n" - "-h <host>\n" - "-p <port>\n" - "-f <file>\n")); - return -1; - } - - return 0; -} - -int -main (int argc, char *argv[]) -{ - if (parse_args (argc, argv) == -1) - return -1; - - Sender sender; - - // Note: acceptor parameterized by the Receiver - ACE_Asynch_Acceptor <Receiver> acceptor; - - // If passive side - if (host == 0) - { - if (acceptor.open (ACE_INET_Addr (port), - BUFSIZ, - 1) == -1) - return -1; - } - else - { - // If active side - if (sender.open (host, port) == -1) - return -1; - } - - int error = 0; - while (!error && !done) - // dispatch events - error = ACE_Service_Config::proactor ()->handle_events (); - - return 0; -} diff --git a/examples/Reactor/Proactor/test_proactor.mak b/examples/Reactor/Proactor/test_proactor.mak deleted file mode 100644 index 2579cccae78..00000000000 --- a/examples/Reactor/Proactor/test_proactor.mak +++ /dev/null @@ -1,282 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-!IF "$(CFG)" == ""
-CFG=test_proactor - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to test_proactor - Win32\
- Debug.
-!ENDIF
-
-!IF "$(CFG)" != "test_proactor - Win32 Release" && "$(CFG)" !=\
- "test_proactor - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test_proactor.mak" CFG="test_proactor - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "test_proactor - Win32 Release" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "test_proactor - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-RSC=rc.exe
-CPP=cl.exe
-
-!IF "$(CFG)" == "test_proactor - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-OUTDIR=.
-INTDIR=.
-
-ALL : "$(OUTDIR)\test_proactor.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_proactor.obj"
- -@erase "$(OUTDIR)\test_proactor.exe"
-
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\
- /Fp"test_proactor.pch" /YX /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_proactor.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\
- /pdb:"$(OUTDIR)/test_proactor.pdb" /machine:I386\
- /out:"$(OUTDIR)/test_proactor.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_proactor.obj"
-
-"$(OUTDIR)\test_proactor.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_proactor - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-OUTDIR=.
-INTDIR=.
-
-ALL : "$(OUTDIR)\test_proactor.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_proactor.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_proactor.exe"
- -@erase "$(OUTDIR)\test_proactor.ilk"
- -@erase "$(OUTDIR)\test_proactor.pdb"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"test_proactor.pch" /YX /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_proactor.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_proactor.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_proactor.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_proactor.obj"
-
-"$(OUTDIR)\test_proactor.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-.c.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-################################################################################
-# Begin Target
-
-# Name "test_proactor - Win32 Release"
-# Name "test_proactor - Win32 Debug"
-
-!IF "$(CFG)" == "test_proactor - Win32 Release"
-
-!ELSEIF "$(CFG)" == "test_proactor - Win32 Debug"
-
-!ENDIF
-
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_proactor.cpp
-DEP_CPP_TEST_=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\Asynch_Acceptor.cpp"\
- {$(INCLUDE)}"\ace\Asynch_Acceptor.h"\
- {$(INCLUDE)}"\ace\Asynch_Acceptor.i"\
- {$(INCLUDE)}"\ace\Asynch_IO.h"\
- {$(INCLUDE)}"\ace\Asynch_IO.i"\
- {$(INCLUDE)}"\ace\config-win32-common.h"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_Acceptor.h"\
- {$(INCLUDE)}"\ace\SOCK_Acceptor.i"\
- {$(INCLUDE)}"\ace\SOCK_Connector.h"\
- {$(INCLUDE)}"\ace\SOCK_Connector.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_proactor.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
diff --git a/examples/Reactor/Proactor/test_proactor.mdp b/examples/Reactor/Proactor/test_proactor.mdp Binary files differdeleted file mode 100644 index d03e368531f..00000000000 --- a/examples/Reactor/Proactor/test_proactor.mdp +++ /dev/null diff --git a/examples/Reactor/README b/examples/Reactor/README deleted file mode 100644 index fefaeeaf317..00000000000 --- a/examples/Reactor/README +++ /dev/null @@ -1,20 +0,0 @@ -This directory contains subdirectories that test the ACE Reactor and Proactor - - . Dgram - Tests the CODgram and Dgram classes with the Reactor. - - . Misc - Various miscellaneous tests of Reactor functionality - (e.g., signals, timers, notification, etc.). - - . Multicast - Tests out the ACE multicast capabilities in conjunction - with the Reactor. - - . Ntalker - A program that implements a multicast "chat" program. - - - . Proactor - A program that illustrates the "Proactive" version of - the Reactor diff --git a/examples/Reactor/ReactorEx/README b/examples/Reactor/ReactorEx/README deleted file mode 100644 index 17fa59edf25..00000000000 --- a/examples/Reactor/ReactorEx/README +++ /dev/null @@ -1,224 +0,0 @@ -The ACE_ReactorEx encapsulates the Win32 WaitForMultipleObjects() API -within ACE. The ACE_ReactorEx is similar in spirit to the -ACE_Reactor, except that (1) it is much simpler and (2) it works for -the complete range of Win32 handles (whereas the ACE_Reactor just -works for socket handles. - -Here's the API for the ACE_ReactorEx: - -class ACE_ReactorEx -{ -public: - // = Event loop. - virtual int handle_events (ACE_Time_Value *); - - // = Handler registration management. - virtual int register_handler (ACE_Event_Handler *); - virtual int remove_handler (ACE_Event_Handler *); - - virtual int notify (void); - - // = Timer management - virtual int schedule_timer (), etc. - // ... -}; - ----------------------------------------- - -Here's how you might use it: - ----------------------------------------- - -class My_Thread_Handler : public ACE_Event_Handler -{ -public: - My_Thread_Handler (void) { - // Create a thread that will run - // for a time and then exit. - this->thread_handle_ = - ACE_OS::thr_create (run, ......); - } - - // Called back by the ACE_ReactorEx when the - // event is signaled. - virtual int handle_signal (int) - { - cout << "thread is done" << endl; - } - - virtual ACE_HANDLE get_handle (void) const - { - return this->thread_handle_; - } - -private: - ACE_HANDLE thread_handle_; - - static void *run (void *) { - // Sleep for a while and then exit. - ACE_OS::sleep (100000); - return 0; - } -}; - ----------------------------------------- - -The main program might look something like this: - ----------------------------------------- - -int main (void) -{ - // ... - ACE_ReactorEx dispatcher; - My_Thread_Handler handler; - - // Register the thread handler. - dispatcher.register_handler (&handler); - - // Block until the thread exits and the - // handle_signal() method of the My_Thread_Handler - // is called! - dispatcher.handle_events (); - - // ... -} - ----------------------------------------- - -. test_timeout -- - -This example application shows how to write ReactorEx and Proactor -event loops that handle events for some fixed amount of time. It uses -ACE_Service_Config::run_reactorEx_event_loop (run_time) to handle -events for run_time seconds. The output should be the following: - -1 timeout occurred for Foo. -2 timeout occurred for Bar. -3 timeout occurred for Foo. -4 timeout occurred for Bar. -5 timeout occurred for Foo. -6 timeout occurred for Bar. -7 timeout occurred for Foo. -8 timeout occurred for Foo. -9 timeout occurred for Bar. -10 timeout occurred for Foo. -11 timeout occurred for Bar. -12 timeout occurred for Foo. - -. test_remove_handler -- - -This application tests the ReactorEx's ability to handle simultaneous -events. If you pass anything on the command-line, then each handler -requests to be removed from the ReactorEx after each event. This has -a funky effect on the order in which handlers are serviced. So, if no -parameters are passed in, the handlers should be serviced 1 through -MAXIMUM_WAIT_OBJECTS. If handlers to request to be removed as signals -occur, they will be serviced 1, MAX, MAX-1, ..., 2. This is because -of a ReactorEx bookkeeping optimization. - -. test_reactorEx.cpp -- - -This test application tests a wide range of events that can be -demultiplexed using various ACE utilities. Events used include ^C -events, reading from STDIN, vanilla Win32 events, thread exits, -ReactorEx notifications, proactive reads, and proactive writes. - -The proactive I/O events are demultiplexed by the ACE_Proactor. The -thread exits, notications, and vanilla Win32 events are demultiplexed -by the ACE_ReactorEx. To enable a single thread to run all these -events, the Proactor is integrated with the ReactorEx. - -The test application prototypes a simple ntalk program. Two instances -of the application connect. Input from either console is displayed on -the others console also. Because of the evils of Win32 STDIN, a -separate thread is used to read from STDIN. To test the Proactor and -ReactorEx, I/O between the remote processes is performed proactively -and interactions between the STDIN thread and the main thread are -performed reactively. - -The following description of the test application is in two parts. -The participants section explains the main components involved in the -application. The collaboration section describes how the partipants -interact in response to the multiple event types which occur. - -The ReactorEx test application has the following participants: - -. ReactorEx -- The ReactorEx demultiplexes Win32 "waitable" events - using WaitForMultipleObjects. - -. Proactor -- The proactor initiates and demultiplexes overlapped I/O - operations. The Proactor registers with the ReactorEx so that a - single-thread can demultiplex all application events. - -. STDIN_Handler -- STDIN_Handler is an Active Object which reads from - STDIN and forwards the input to the Peer_Handler. This runs - in a separate thread to make the test more interesting. However, - STDIN is "waitable", so in general it can be waited on by the ACE - ReactorEx, thanks MicroSlush! - -. Peer_Handler -- The Peer_Handler connects to another instance of - test_reactorEx. It Proactively reads and writes data to the peer. - When the STDIN_Handler gives it messages, it fowards them to the - remote peer. When it receives messages from the remote peer, it - prints the output to the console. - -The collaborations of the participants are as follows: - -. Initialization - - Peer_Handler -- connects to the remote peer. It then begins - proactively reading from the remote connection. Note that it will - be notified by the Proactor when a read completes. It also - registers a new_msg_event with the ReactorEx. Note that when the - new_msg_event is signaled (by the STDIN_Handler), - Peer_Handler::handle_signal will get called. - - STDIN_Handler -- STDIN_Handler registers a signal handler for - SIGINT. This just captures the exception so that the kernel doesn't - kill our process; We want to exit gracefully. It also creates an - Exit_Hook object which registers the STDIN_Handler's thread handle - with the ReactorEx. The Exit_Hook will get called back when the - STDIN_Handler thread exits. After registering these, it blocks - reading from STDIN. - - Proactor -- is registered with the ReactorEx. - - The main thread of control waits in the ReactorEx. - -. STDIN events -- When the STDIN_Handler thread reads from STDIN, it - puts the message on Peer_Handler's message queue and signals the - new_msg_event. It then returns to reading from STDIN. - -. new_msg_events -- The ReactorEx thread wakes up and calls - Peer_Handler::handle_signal. The Peer_Handler then tries to dequeue - a message from its message queue. If it can, the message is - Proactively sent to the remote peer. Note that the Peer_Handler - will be notified with this operation is complete. The Peer_Handler - then falls back into the ReactorEx event loop. - -. Send complete event -- When a proactive send is complete, the - Proactor is notified by the ReactorEx. The Proactor, in turn, - notifies the Peer_Handler. The Peer_Handler then checks for more - messages from the message queue. If there are any, it tries to send - them. If there are not, it returns to the ReactorEx event loop. - This is ok since it is notified via new_msg_event when new message - arrive. - -. Read complete event -- When a proactive read is complete (the - Peer_Handler initiated a proactive read when it connected to the - remote peer), the Proactor is notified by the ReactorEx. The - Proactor, in turn notifies the Peer_Handler. If the read was - successful the Peer_Handler just displays the received msg to the - console and reinvokes a proactive read from the network connection. - If the read failed (i.e. the remote peer exited), the Peer_Handler - sets a flag to end the event loop and returns. This will cause the - application to exit. - -. ^C events -- When the user types ^C at the console, the - STDIN_Handler's signal handler will be called. It does nothing, but - as a result of the signal, the STDIN_Handler thread will exit. - -. STDIN_Handler thread exits -- The Exit_Hook will get called back - from the ReactorEx. Exit_Hook::handle_signal sets a flag to end the - event loop and returns. This will cause the application to exit. diff --git a/examples/Reactor/ReactorEx/reactorex.mak b/examples/Reactor/ReactorEx/reactorex.mak deleted file mode 100644 index 82d7ac5f464..00000000000 --- a/examples/Reactor/ReactorEx/reactorex.mak +++ /dev/null @@ -1,938 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-!IF "$(CFG)" == ""
-CFG=test_exception - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to test_exception - Win32\
- Debug.
-!ENDIF
-
-!IF "$(CFG)" != "ntalk - Win32 Debug" && "$(CFG)" !=\
- "test_remove_handler - Win32 Debug" && "$(CFG)" != "test_timeout - Win32 Debug"\
- && "$(CFG)" != "test_MT - Win32 Debug" && "$(CFG)" !=\
- "test_exception - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "reactorex.mak" CFG="test_exception - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ntalk - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_remove_handler - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "test_timeout - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "test_MT - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_exception - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "ntalk - Win32 Debug"
-RSC=rc.exe
-CPP=cl.exe
-
-!IF "$(CFG)" == "ntalk - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ntalk\Debug"
-# PROP BASE Intermediate_Dir "ntalk\Debug"
-# PROP BASE Target_Dir "ntalk"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "ntalk"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_reactorEx.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_reactorEx.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_reactorEx.exe"
- -@erase "$(OUTDIR)\test_reactorEx.ilk"
- -@erase "$(OUTDIR)\test_reactorEx.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/ntalk.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/ntalk.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"test_reactorEx.exe"
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_reactorEx.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_reactorEx.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_reactorEx.obj"
-
-"$(OUTDIR)\test_reactorEx.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_remove_handler - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test_remove_handler\Debug"
-# PROP BASE Intermediate_Dir "test_remove_handler\Debug"
-# PROP BASE Target_Dir "test_remove_handler"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "test_remove_handler"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_remove_handler.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_remove_handler.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_remove_handler.exe"
- -@erase "$(OUTDIR)\test_remove_handler.ilk"
- -@erase "$(OUTDIR)\test_remove_handler.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/test_remove_handler.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_remove_handler.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_remove_handler.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_remove_handler.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_remove_handler.obj"
-
-"$(OUTDIR)\test_remove_handler.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_timeout - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test_timeout\Debug"
-# PROP BASE Intermediate_Dir "test_timeout\Debug"
-# PROP BASE Target_Dir "test_timeout"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "test_timeout"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_timeout.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_timeout.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_timeout.exe"
- -@erase "$(OUTDIR)\test_timeout.ilk"
- -@erase "$(OUTDIR)\test_timeout.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/test_timeout.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_timeout.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_timeout.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_timeout.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_timeout.obj"
-
-"$(OUTDIR)\test_timeout.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_MT - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test_MT\Debug"
-# PROP BASE Intermediate_Dir "test_MT\Debug"
-# PROP BASE Target_Dir "test_MT"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "test_MT"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_MT.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_MT.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_MT.exe"
- -@erase "$(OUTDIR)\test_MT.ilk"
- -@erase "$(OUTDIR)\test_MT.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/test_MT.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_MT.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_MT.pdb" /debug /machine:I386 /out:"$(OUTDIR)/test_MT.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_MT.obj"
-
-"$(OUTDIR)\test_MT.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_exception - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test_exception\Debug"
-# PROP BASE Intermediate_Dir "test_exception\Debug"
-# PROP BASE Target_Dir "test_exception"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "test_exception"
-OUTDIR=.\.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_exception.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_exceptions.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_exception.exe"
- -@erase "$(OUTDIR)\test_exception.ilk"
- -@erase "$(OUTDIR)\test_exception.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/test_exception.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_exception.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_exception.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_exception.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_exceptions.obj"
-
-"$(OUTDIR)\test_exception.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-CPP_OBJS=.\Debug/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-################################################################################
-# Begin Target
-
-# Name "ntalk - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_reactorEx.cpp
-DEP_CPP_TEST_=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_Acceptor.h"\
- {$(INCLUDE)}"\ace\SOCK_Acceptor.i"\
- {$(INCLUDE)}"\ace\SOCK_Connector.h"\
- {$(INCLUDE)}"\ace\SOCK_Connector.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_reactorEx.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "test_remove_handler - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_remove_handler.cpp
-DEP_CPP_TEST_R=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_remove_handler.obj" : $(SOURCE) $(DEP_CPP_TEST_R) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "test_timeout - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_timeout.cpp
-DEP_CPP_TEST_T=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_timeout.obj" : $(SOURCE) $(DEP_CPP_TEST_T) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "test_MT - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_MT.cpp
-DEP_CPP_TEST_M=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_MT.obj" : $(SOURCE) $(DEP_CPP_TEST_M) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "test_exception - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_exceptions.cpp
-DEP_CPP_TEST_E=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_exceptions.obj" : $(SOURCE) $(DEP_CPP_TEST_E) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
diff --git a/examples/Reactor/ReactorEx/reactorex.mdp b/examples/Reactor/ReactorEx/reactorex.mdp Binary files differdeleted file mode 100644 index a62982c81fc..00000000000 --- a/examples/Reactor/ReactorEx/reactorex.mdp +++ /dev/null diff --git a/examples/Reactor/ReactorEx/test_MT.cpp b/examples/Reactor/ReactorEx/test_MT.cpp deleted file mode 100644 index 3d124dcb255..00000000000 --- a/examples/Reactor/ReactorEx/test_MT.cpp +++ /dev/null @@ -1,232 +0,0 @@ -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// test_MT.cpp -// -// = DESCRIPTION -// This application tests multiple threads simultaneously calling -// ReactorEx->handle_events(). It also shows how different threads -// can update the state of ReactorEx by registering and removing -// Event_Handlers. -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#include "ace/Task.h" -#include "ace/ReactorEx.h" -#include "ace/Get_Opt.h" - -static int concurrent_threads = 1; -static int number_of_handles = ACE_ReactorEx::DEFAULT_SIZE; -static int number_of_handles_to_signal = 1; -static int interval = 2; -static int iterations = 10; - -// Explain usage and exit. -static void -print_usage_and_die (void) -{ - ACE_DEBUG ((LM_DEBUG, - "usage: \n\t" - "[-t (# of threads - default 1)] \n\t" - "[-h (# of handlers) - default 62] \n\t" - "[-i (# time interval between signals) - default 2] \n\t" - "[-s (# of handles to signal) - default 1] \n\t" - "[-e (# of iterations) - default 10] \n\t")); - ACE_OS::exit (1); -} - -// Parse the command-line arguments and set options. -static void -parse_args (int argc, char **argv) -{ - ACE_Get_Opt get_opt (argc, argv, "t:h:s:i:e:"); - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 't': - concurrent_threads = atoi (get_opt.optarg); - break; - case 'e': - iterations = atoi (get_opt.optarg); - break; - case 'h': - number_of_handles = atoi (get_opt.optarg); - break; - case 'i': - interval = atoi (get_opt.optarg); - break; - case 's': - number_of_handles_to_signal = atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -class Task_Handler : public ACE_Task<ACE_NULL_SYNCH> -{ -public: - Task_Handler (size_t number_of_handles, - size_t concurrent_threads); - // Constructor. - - ~Task_Handler (void); - // Destructor. - - virtual int handle_close (ACE_HANDLE handle, - ACE_Reactor_Mask close_mask); - // Called when object is removed from the ACE_Reactor - - int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0); - // Handle events being signaled by the main thread. - - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg = 0); - // Called when timer expires. - - int svc (void); - // Task event loop. - - int signal (size_t index); - // Signal an event. - -private: - ACE_Auto_Event *events_; -}; - -// All threads do reactorEx->handle_events () -int -Task_Handler::svc (void) -{ - // Try to become the owner - ACE_Service_Config::reactorEx ()->owner (ACE_Thread::self ()); - // Run the event loop. - return ACE_Service_Config::run_reactorEx_event_loop (); -} - -Task_Handler::Task_Handler (size_t number_of_handles, - size_t concurrent_threads) -{ - ACE_NEW (this->events_, ACE_Auto_Event [number_of_handles]); - - for (size_t i = 0; i < number_of_handles; i++) - { - if (ACE_Service_Config::reactorEx ()->register_handler (this, - this->events_[i].handle ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\t cannot register handle %d with ReactorEx\n", - "Task_Handler::Task_Handler", i)); - } - // Make us an active object. - if (this->activate (THR_NEW_LWP, - concurrent_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\t cannot activate task\n", - "activate")); -} - -Task_Handler::~Task_Handler (void) -{ - delete [] this->events_; -} - - -int -Task_Handler::handle_signal (int signum, siginfo_t *siginfo, ucontext_t *) -{ - // When signaled, print message, remove self, and add self - // This will force ReactorEx to update its internal handle tables - ACE_DEBUG ((LM_DEBUG, "(%t) handle_signal() called: handle value = %d\n", - siginfo->si_handle_)); - - if (ACE_Service_Config::reactorEx ()->remove_handler (siginfo->si_handle_, - ACE_Event_Handler::DONT_CALL) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%t) %p\tTask cannot be unregistered from ReactorEx: handle value = %d\n", - "Task_Handler::handle_signal", - siginfo->si_handle_), -1); - - if (ACE_Service_Config::reactorEx ()->register_handler (this, - siginfo->si_handle_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%t) %p\tTask cannot be registered with ReactorEx: handle value = %d\n", - "Task_Handler::handle_signal", - siginfo->si_handle_), -1); - return 0; -} - -int -Task_Handler::handle_close (ACE_HANDLE handle, - ACE_Reactor_Mask close_mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handle_close() called: handle value = %d\n", - handle)); - return 0; -} - -int -Task_Handler::handle_timeout (const ACE_Time_Value &tv, - const void *arg) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handle_timeout() called: iteration value = %d\n", - int (arg))); - return 0; -} - -int -Task_Handler::signal (size_t index) -{ - return this->events_[index].signal (); -} - -int -main (int argc, char **argv) -{ - parse_args (argc, argv); - Task_Handler task (number_of_handles, - concurrent_threads); - - ACE_OS::srand (ACE_OS::time (0L)); - - for (int i = 1; i <= iterations; i++) - { - // Sleep for a while - ACE_OS::sleep (interval); - - // Randomly generate events - ACE_DEBUG ((LM_DEBUG, "********************************************************\n")); - ACE_DEBUG ((LM_DEBUG, "(%t -- main thread) signaling %d events : iteration = %d\n", - number_of_handles_to_signal, - i)); - ACE_DEBUG ((LM_DEBUG, "********************************************************\n")); - - // Setup a timer for the task - ACE_Service_Config::reactorEx ()->schedule_timer (&task, - (void *) i, - 0); - - for (int i = 0; i < number_of_handles_to_signal; i++) - { - // Randomly select a handle to signal. - task.signal (ACE_OS::rand() % number_of_handles); - } - } - - // Sleep for a while - ACE_OS::sleep (interval); - // Close ReactorEx - ACE_Service_Config::reactorEx ()->close (); - // Wait for all threads to exit - ACE_Service_Config::thr_mgr ()->wait (); - // Delete dynamic resources - ACE_Service_Config::close_singletons (); - - return 0; -} diff --git a/examples/Reactor/ReactorEx/test_exceptions.cpp b/examples/Reactor/ReactorEx/test_exceptions.cpp deleted file mode 100644 index 075e35a89e5..00000000000 --- a/examples/Reactor/ReactorEx/test_exceptions.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "ace/ReactorEx.h" - -class Event_Handler : public ACE_Event_Handler -{ -public: - Event_Handler () - : event_ (1) - { - ACE_DEBUG ((LM_DEBUG, "Event_Handler created\n")); - } - ~Event_Handler () - { - ACE_DEBUG ((LM_DEBUG, "Event_Handler destroyed\n")); - } - int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0) - { - char *cause_exception = 0; - char a = *cause_exception; - return 0; - } - ACE_HANDLE get_handle (void) const - { - return this->event_.handle (); - } -private: - ACE_Manual_Event event_; -}; - -class ACE_ReactorEx_Test -{ -public: - static void doit () - { - for (int i = 1; i <= 10; i++) - { - ACE_DEBUG ((LM_DEBUG, "Active threads in ReactorEx (before handle_events) = %d\n", - ACE_Service_Config::reactorEx ()->active_threads_)); - ACE_SEH_TRY - { - ACE_Service_Config::reactorEx ()->handle_events (); - } - ACE_SEH_EXCEPT (EXCEPTION_EXECUTE_HANDLER) - { - ACE_DEBUG ((LM_DEBUG, "Exception occurred\n")); - } - ACE_DEBUG ((LM_DEBUG, "Active threads in ReactorEx (after handle_events) = %d\n", - ACE_Service_Config::reactorEx ()->active_threads_)); - } - } -}; - -int -main () -{ - Event_Handler *handler; - ACE_NEW_RETURN (handler, Event_Handler, -1); - ACE_Service_Config::reactorEx ()->register_handler (handler); - ACE_ReactorEx_Test::doit (); - delete handler; - return 0; -} - diff --git a/examples/Reactor/ReactorEx/test_reactorEx.cpp b/examples/Reactor/ReactorEx/test_reactorEx.cpp deleted file mode 100644 index e2f678c4279..00000000000 --- a/examples/Reactor/ReactorEx/test_reactorEx.cpp +++ /dev/null @@ -1,429 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// test_reactorEx.cpp -// -// = DESCRIPTION -// This test application tests a wide range of events that can be -// demultiplexed using various ACE utilities. Events used include ^C -// events, reading from STDIN, vanilla Win32 events, thread exits, -// ReactorEx notifications, proactive reads, and proactive writes. -// -// The proactive I/O events are demultiplexed by the ACE_Proactor. -// The thread exits, notications, and vanilla Win32 events are -// demultiplexed by the ACE_ReactorEx. To enable a single thread -// to run all these events, the Proactor is integrated with the -// ReactorEx. -// -// = AUTHOR -// Tim Harrison -// -// ============================================================================ - -#include "ace/ReactorEx.h" -#include "ace/Proactor.h" -#include "ace/SOCK_Connector.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/Get_Opt.h" -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Task.h" - -typedef ACE_Task<ACE_MT_SYNCH> MT_TASK; - -class Peer_Handler : public MT_TASK - // = TITLE - // Connect to a server. Receive messages from STDIN_Handler - // and forward them to the server using proactive I/O. -{ -public: - // = Initialization methods. - Peer_Handler (int argc, char *argv[]); - ~Peer_Handler (void); - - int open (void * =0); - // This method creates the network connection to the remote peer. - // It does blocking connects and accepts depending on whether a - // hostname was specified from the command line. - - virtual int handle_output_complete (ACE_Message_Block *msg, - long bytes_transferred); - // One of our asynchronous writes to the remote peer has completed. - // Make sure it succeeded and then delete the message. - - virtual int handle_input_complete (ACE_Message_Block *msg, - long bytes_transferred); - // The remote peer has sent us something. If it succeeded, print - // out the message and reinitiate a read. Otherwise, fail. In both - // cases, delete the message sent. - - virtual ACE_Message_Block *get_message (void); - // This is so the Proactor can get a message to read into. - - virtual ACE_HANDLE get_handle (void) const; - // This is so the Proactor can get our handle. - - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - // We've been removed from the ReactorEx. - - virtual int handle_output (ACE_HANDLE fd); - // Called when output events should start. Note that this is - // automatically invoked by the - // <ACE_ReactorEx_Notificiation_Strategy>. - -private: - ACE_SOCK_Stream stream_; - // Socket that we have connected to the server. - - ACE_ReactorEx_Notification_Strategy strategy_; - // The strategy object that the reactorEx uses to notify us when - // something is added to the queue. - - // = Remote peer info. - char *host_; - // Name of remote host. - - u_short port_; - // Port number for remote host. -}; - -class STDIN_Handler : public ACE_Task<ACE_NULL_SYNCH> - // = TITLE - // Active Object. Reads from STDIN and passes message blocks to - // the peer handler. -{ -public: - STDIN_Handler (MT_TASK &ph); - // Initialization. - - virtual int open (void * = 0); - // Activate object. - - virtual int close (u_long = 0); - // Shut down. - - int svc (void); - // Thread runs here as an active object. - -private: - static void handler (int signum); - // Handle a ^C. (Do nothing, this just illustrates how we can catch - // signals along with the other things). - - void register_thread_exit_hook (void); - // Helper function to register with the ReactorEx for thread exit. - - virtual int handle_signal (int index, siginfo_t *, ucontext_t *); - // The STDIN thread has exited. This means the user hit ^C. We can - // end the event loop. - - MT_TASK &ph_; - // Send all input to ph_. - - ACE_HANDLE thr_handle_; - // Handle of our thread. -}; - -Peer_Handler::Peer_Handler (int argc, char *argv[]) - : host_ (0), - port_ (ACE_DEFAULT_SERVER_PORT), - strategy_ (ACE_Service_Config::reactorEx (), - this, - ACE_Event_Handler::WRITE_MASK) -{ - // This code sets up the message to notify us when a new message is - // added to the queue. Actually, the queue notifies ReactorEx which - // then notifies us. - this->msg_queue ()->notification_strategy (&this->strategy_); - - ACE_Get_Opt get_opt (argc, argv, "h:p:"); - int c; - - while ((c = get_opt ()) != EOF) - { - switch (c) - { - case 'h': - host_ = get_opt.optarg; - break; - case 'p': - port_ = ACE_OS::atoi (get_opt.optarg); - break; - } - } -} - -Peer_Handler::~Peer_Handler (void) -{ -} - -// This method creates the network connection to the remote peer. It -// does blocking connects and accepts depending on whether a hostname -// was specified from the command line. - -int -Peer_Handler::open (void *) -{ - if (host_ != 0) // Connector - { - ACE_INET_Addr addr (port_, host_); - ACE_SOCK_Connector connector; - - // Establish connection with server. - if (connector.connect (stream_, addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), -1); - - ACE_DEBUG ((LM_DEBUG, "connected.\n")); - } - else // Acceptor - { - ACE_SOCK_Acceptor acceptor; - ACE_INET_Addr local_addr (port_); - - if ((acceptor.open (local_addr) == -1) || - (acceptor.accept (this->stream_) == -1)) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "accept failed"), -1); - - ACE_DEBUG ((LM_DEBUG, "accepted.\n")); - } - - return ACE_Service_Config::proactor ()->initiate - (this, ACE_Event_Handler::READ_MASK); -} - -// One of our asynchronous writes to the remote peer has completed. -// Make sure it succeeded and then delete the message. - -int -Peer_Handler::handle_output_complete (ACE_Message_Block *msg, - long bytes_transferred) -{ - if (bytes_transferred <= 0) - ACE_DEBUG ((LM_DEBUG, "%p bytes = %d\n", "Message failed", - bytes_transferred)); - - // This was allocated by the STDIN_Handler, queued, dequeued, - // passed to the proactor, and now passed back to us. - msg->release (); - return 0; // Do not reinvoke a send. -} - -// The remote peer has sent us something. If it succeeded, print -// out the message and reinitiate a read. Otherwise, fail. In both -// cases, delete the message sent. - -int -Peer_Handler::handle_input_complete (ACE_Message_Block *msg, - long bytes_transferred) -{ - int result = 1; // Reinvokes the recv() operation by default! - - if (bytes_transferred > 0 && msg->length () > 0) - { - msg->rd_ptr ()[bytes_transferred] = '\0'; - // Print out the message received from the server. - ACE_DEBUG ((LM_DEBUG, "%s", msg->rd_ptr ())); - } - else - { - // If a read failed, we will assume it's because the remote peer - // went away. We will end the event loop. Since we're in the - // main thread, we don't need to do a notify. - ACE_Service_Config::end_reactorEx_event_loop (); - result = -1; - } - - msg->release (); - return result; -} - -// This is so the Proactor can get a message to read into. - -ACE_Message_Block * -Peer_Handler::get_message (void) -{ - // An extra byte for NUL termination. - ACE_Message_Block *message = - new ACE_Message_Block (BUFSIZ + 1); - - message->size (BUFSIZ); - return message; -} - -// This is so the Proactor can get our handle. -ACE_HANDLE -Peer_Handler::get_handle (void) const -{ - return this->stream_.get_handle (); -} - -// We've been removed from the ReactorEx. -int -Peer_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "Peer_Handler closing down\n")); - return 0; -} - -// New stuff added to the message queue. Try to dequeue a message. -int -Peer_Handler::handle_output (ACE_HANDLE fd) -{ - ACE_Message_Block *mb; - - ACE_Time_Value tv (ACE_Time_Value::zero); - - // Forward the message to the remote peer receiver. - if (this->getq (mb, &tv) != -1) - { - if (ACE_Service_Config::proactor ()-> - initiate (this, ACE_Event_Handler::WRITE_MASK, mb) == -1) - ACE_ERROR ((LM_ERROR, "%p Write initiate.\n", "Peer_Handler")); - } - return 0; -} - -void -STDIN_Handler::handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "signal = %S\n", signum)); -} - -STDIN_Handler::STDIN_Handler (MT_TASK &ph) - : ph_ (ph) -{ - // Register for ^C from the console. We just need to catch the - // exception so that the kernel doesn't kill our process. - // Registering this signal handler just tells the kernel that we - // know what we're doing; to leave us alone. - - ACE_OS::signal (SIGINT, ACE_SignalHandler (STDIN_Handler::handler)); -}; - -// Activate object. - -int -STDIN_Handler::open (void *) -{ - if (this->activate (THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), -1); - - return 0; -} - -// Shut down. - -int -STDIN_Handler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) thread is exiting.\n")); - return 0; -} - -// Thread runs here. - -int -STDIN_Handler::svc (void) -{ - this->register_thread_exit_hook (); - - for (;;) - { - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - - // Read from stdin into mb. - int read_result = ACE_OS::read (ACE_STDIN, - mb->rd_ptr (), - mb->size ()); - - // If read succeeds, put mb to peer handler, else end the loop. - if (read_result > 0) - { - mb->wr_ptr (read_result); - // Note that this call will first enqueue mb onto the peer - // handler's message queue, which will then turn around and - // notify the ReactorEx via the Notification_Strategy. This - // will subsequently signal the Peer_Handler, which will - // react by calling back to its handle_output() method, - // which dequeues the message and sends it to the peer - // across the network. - this->ph_.putq (mb); - } - else - break; - } - - // handle_signal will get called on the main proactor thread since - // we just exited and the main thread is waiting on our thread exit. - return 0; -} - -// Register an exit hook with the reactorEx. - -void -STDIN_Handler::register_thread_exit_hook (void) -{ - // Get a real handle to our thread. - ACE_Service_Config::thr_mgr ()->thr_self (this->thr_handle_); - - // Register ourselves to get called back when our thread exits. - - if (ACE_Service_Config::reactorEx ()-> - register_handler (this, this->thr_handle_) == -1) - ACE_ERROR ((LM_ERROR, "Exit_Hook Register failed.\n")); - - // We're in another thread, so we need to notify the ReactorEx so - // that it wakes up and waits on the new set of handles. - ACE_Service_Config::reactorEx ()->notify (); -} - -// The STDIN thread has exited. This means the user hit ^C. We can -// end the event loop and delete ourself. - -int -STDIN_Handler::handle_signal (int, siginfo_t *si, ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "STDIN thread has exited.\n")); - ACE_ASSERT (this->thr_handle_ == si->si_handle_); - ACE_Service_Config::end_reactorEx_event_loop (); - return 0; -} - -int -main (int argc, char *argv[]) -{ - // Open handler for remote peer communications this will run from - // the main thread. - Peer_Handler peer_handler (argc, argv); - - if (peer_handler.open () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p open failed, errno = %d.\n", - "peer_handler", errno), 0); - - // Open active object for reading from stdin. - STDIN_Handler stdin_handler (peer_handler); - - // Spawn thread. - if (stdin_handler.open () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p open failed, errno = %d.\n", - "stdin_handler", errno), 0); - - // Register proactor with ReactorEx so that we can demultiplex - // "waitable" events and I/O operations from a single thread. - if (ACE_Service_Config::reactorEx ()->register_handler - (ACE_Service_Config::proactor ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p failed to register Proactor.\n", - argv[0]), -1); - - // Run main event demultiplexor. - ACE_Service_Config::run_reactorEx_event_loop (); - - return 0; -} diff --git a/examples/Reactor/ReactorEx/test_remove_handler.cpp b/examples/Reactor/ReactorEx/test_remove_handler.cpp deleted file mode 100644 index 521bab21cf3..00000000000 --- a/examples/Reactor/ReactorEx/test_remove_handler.cpp +++ /dev/null @@ -1,101 +0,0 @@ -// ============================================================================ -// $Id$ - -// -// = LIBRARY -// examples -// -// = FILENAME -// test_remove_handler.cpp -// -// = DESCRIPTION -// Tests the ReactorEx's ability to handle simultaneous events. If -// you pass anything on the command-line, then each handler -// requests to be removed from the ReactorEx after each event. -// -// = AUTHOR -// Tim Harrison -// -// ============================================================================ - -#include "ace/ReactorEx.h" -#include "ace/Service_Config.h" -#include "ace/Synch.h" - -class Event_Handler : public ACE_Event_Handler -// = TITLE -// Generic Event Handler. -// -// = DESCRIPTION -// -// Creates event. Registers with ReactorEx. Signals event. If -// created with -close_down- it returns -1 from handle signal. -{ -public: - Event_Handler (int event_number, - int close_down) - : event_number_ (event_number), - close_down_ (close_down) - { - if (ACE_Service_Config::reactorEx ()->register_handler (this, - this->event_.handle ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\tevent handler %d cannot be added to ReactorEx\n", "", event_number_)); - this->event_.signal (); - } - - virtual int handle_signal (int index, siginfo_t *, ucontext_t *) - { - ACE_DEBUG ((LM_DEBUG, "event %d occured.\n", event_number_)); - - if (this->close_down_) - return -1; - else - return 0; - } - - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask) - { - ACE_DEBUG ((LM_DEBUG, "event handler %d closed.\n", event_number_)); - delete this; - return 0; - } - - virtual ACE_HANDLE get_handle (void) const - { - return event_.handle (); - } - -private: - int event_number_; - // Our event number. - - int close_down_; - // Shall we close down or not. - - ACE_Event event_; - // Signaled to shut down the handler. -}; - -int -main (int argc, char *argv[]) -{ - int close_down = argc > 1 ? 1 : 0; - - for (int i = 1; i <= ACE_ReactorEx::DEFAULT_SIZE; i++) - new Event_Handler (i, close_down); - - int result = 0; - ACE_Time_Value time (1); - while (1) - { - result = ACE_Service_Config::reactorEx ()->handle_events (time); - if (result == 0 && errno == ETIME) - { - ACE_DEBUG ((LM_DEBUG, "No more work left: timing out\n")); - break; - } - if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "main"), -1); - } - return 0; -} diff --git a/examples/Reactor/ReactorEx/test_timeout.cpp b/examples/Reactor/ReactorEx/test_timeout.cpp deleted file mode 100644 index 66656b13ac3..00000000000 --- a/examples/Reactor/ReactorEx/test_timeout.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// $Id: test_timeout.cpp - -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// test_timeout.cpp -// -// = DESCRIPTION -// This example application shows how to write ReactorEx and -// Proactor event loops that handle events for some fixed amount of -// time. -// -// = AUTHOR -// Tim Harrison -// -// ============================================================================ - -#include "ace/ReactorEx.h" -#include "ace/Proactor.h" -#include "ace/Service_Config.h" -#include "ace/OS.h" - -class Timeout_Handler : public ACE_Event_Handler -// = TITLE -// Generic timeout handler. -{ -public: - Timeout_Handler (void) : count_ (0) {;} - - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg) - // Print out when timeouts occur. - { - ACE_DEBUG ((LM_DEBUG, "%d timeout occurred for %s.\n", - ++count_, - (char *) arg)); - return 0; - } - -private: - int count_; -}; - -int -main () -{ - Timeout_Handler handler; - - // Register a 2 second timer. - ACE_Time_Value foo_tv (2); - ACE_Service_Config::reactorEx ()->schedule_timer (&handler, - (void *) "Foo", - ACE_Time_Value::zero, - foo_tv); - // Register a 3 second timer. - ACE_Time_Value bar_tv (3); - ACE_Service_Config::reactorEx ()->schedule_timer (&handler, - (void *) "Bar", - ACE_Time_Value::zero, - bar_tv); - - // Handle events for 12 seconds. - ACE_Time_Value run_time (12); - if (ACE_Service_Config::run_reactorEx_event_loop (run_time) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "main"), -1); - - return 0; -} diff --git a/examples/Reactor/WFMO_Reactor/README b/examples/Reactor/WFMO_Reactor/README deleted file mode 100644 index 17fa59edf25..00000000000 --- a/examples/Reactor/WFMO_Reactor/README +++ /dev/null @@ -1,224 +0,0 @@ -The ACE_ReactorEx encapsulates the Win32 WaitForMultipleObjects() API -within ACE. The ACE_ReactorEx is similar in spirit to the -ACE_Reactor, except that (1) it is much simpler and (2) it works for -the complete range of Win32 handles (whereas the ACE_Reactor just -works for socket handles. - -Here's the API for the ACE_ReactorEx: - -class ACE_ReactorEx -{ -public: - // = Event loop. - virtual int handle_events (ACE_Time_Value *); - - // = Handler registration management. - virtual int register_handler (ACE_Event_Handler *); - virtual int remove_handler (ACE_Event_Handler *); - - virtual int notify (void); - - // = Timer management - virtual int schedule_timer (), etc. - // ... -}; - ----------------------------------------- - -Here's how you might use it: - ----------------------------------------- - -class My_Thread_Handler : public ACE_Event_Handler -{ -public: - My_Thread_Handler (void) { - // Create a thread that will run - // for a time and then exit. - this->thread_handle_ = - ACE_OS::thr_create (run, ......); - } - - // Called back by the ACE_ReactorEx when the - // event is signaled. - virtual int handle_signal (int) - { - cout << "thread is done" << endl; - } - - virtual ACE_HANDLE get_handle (void) const - { - return this->thread_handle_; - } - -private: - ACE_HANDLE thread_handle_; - - static void *run (void *) { - // Sleep for a while and then exit. - ACE_OS::sleep (100000); - return 0; - } -}; - ----------------------------------------- - -The main program might look something like this: - ----------------------------------------- - -int main (void) -{ - // ... - ACE_ReactorEx dispatcher; - My_Thread_Handler handler; - - // Register the thread handler. - dispatcher.register_handler (&handler); - - // Block until the thread exits and the - // handle_signal() method of the My_Thread_Handler - // is called! - dispatcher.handle_events (); - - // ... -} - ----------------------------------------- - -. test_timeout -- - -This example application shows how to write ReactorEx and Proactor -event loops that handle events for some fixed amount of time. It uses -ACE_Service_Config::run_reactorEx_event_loop (run_time) to handle -events for run_time seconds. The output should be the following: - -1 timeout occurred for Foo. -2 timeout occurred for Bar. -3 timeout occurred for Foo. -4 timeout occurred for Bar. -5 timeout occurred for Foo. -6 timeout occurred for Bar. -7 timeout occurred for Foo. -8 timeout occurred for Foo. -9 timeout occurred for Bar. -10 timeout occurred for Foo. -11 timeout occurred for Bar. -12 timeout occurred for Foo. - -. test_remove_handler -- - -This application tests the ReactorEx's ability to handle simultaneous -events. If you pass anything on the command-line, then each handler -requests to be removed from the ReactorEx after each event. This has -a funky effect on the order in which handlers are serviced. So, if no -parameters are passed in, the handlers should be serviced 1 through -MAXIMUM_WAIT_OBJECTS. If handlers to request to be removed as signals -occur, they will be serviced 1, MAX, MAX-1, ..., 2. This is because -of a ReactorEx bookkeeping optimization. - -. test_reactorEx.cpp -- - -This test application tests a wide range of events that can be -demultiplexed using various ACE utilities. Events used include ^C -events, reading from STDIN, vanilla Win32 events, thread exits, -ReactorEx notifications, proactive reads, and proactive writes. - -The proactive I/O events are demultiplexed by the ACE_Proactor. The -thread exits, notications, and vanilla Win32 events are demultiplexed -by the ACE_ReactorEx. To enable a single thread to run all these -events, the Proactor is integrated with the ReactorEx. - -The test application prototypes a simple ntalk program. Two instances -of the application connect. Input from either console is displayed on -the others console also. Because of the evils of Win32 STDIN, a -separate thread is used to read from STDIN. To test the Proactor and -ReactorEx, I/O between the remote processes is performed proactively -and interactions between the STDIN thread and the main thread are -performed reactively. - -The following description of the test application is in two parts. -The participants section explains the main components involved in the -application. The collaboration section describes how the partipants -interact in response to the multiple event types which occur. - -The ReactorEx test application has the following participants: - -. ReactorEx -- The ReactorEx demultiplexes Win32 "waitable" events - using WaitForMultipleObjects. - -. Proactor -- The proactor initiates and demultiplexes overlapped I/O - operations. The Proactor registers with the ReactorEx so that a - single-thread can demultiplex all application events. - -. STDIN_Handler -- STDIN_Handler is an Active Object which reads from - STDIN and forwards the input to the Peer_Handler. This runs - in a separate thread to make the test more interesting. However, - STDIN is "waitable", so in general it can be waited on by the ACE - ReactorEx, thanks MicroSlush! - -. Peer_Handler -- The Peer_Handler connects to another instance of - test_reactorEx. It Proactively reads and writes data to the peer. - When the STDIN_Handler gives it messages, it fowards them to the - remote peer. When it receives messages from the remote peer, it - prints the output to the console. - -The collaborations of the participants are as follows: - -. Initialization - - Peer_Handler -- connects to the remote peer. It then begins - proactively reading from the remote connection. Note that it will - be notified by the Proactor when a read completes. It also - registers a new_msg_event with the ReactorEx. Note that when the - new_msg_event is signaled (by the STDIN_Handler), - Peer_Handler::handle_signal will get called. - - STDIN_Handler -- STDIN_Handler registers a signal handler for - SIGINT. This just captures the exception so that the kernel doesn't - kill our process; We want to exit gracefully. It also creates an - Exit_Hook object which registers the STDIN_Handler's thread handle - with the ReactorEx. The Exit_Hook will get called back when the - STDIN_Handler thread exits. After registering these, it blocks - reading from STDIN. - - Proactor -- is registered with the ReactorEx. - - The main thread of control waits in the ReactorEx. - -. STDIN events -- When the STDIN_Handler thread reads from STDIN, it - puts the message on Peer_Handler's message queue and signals the - new_msg_event. It then returns to reading from STDIN. - -. new_msg_events -- The ReactorEx thread wakes up and calls - Peer_Handler::handle_signal. The Peer_Handler then tries to dequeue - a message from its message queue. If it can, the message is - Proactively sent to the remote peer. Note that the Peer_Handler - will be notified with this operation is complete. The Peer_Handler - then falls back into the ReactorEx event loop. - -. Send complete event -- When a proactive send is complete, the - Proactor is notified by the ReactorEx. The Proactor, in turn, - notifies the Peer_Handler. The Peer_Handler then checks for more - messages from the message queue. If there are any, it tries to send - them. If there are not, it returns to the ReactorEx event loop. - This is ok since it is notified via new_msg_event when new message - arrive. - -. Read complete event -- When a proactive read is complete (the - Peer_Handler initiated a proactive read when it connected to the - remote peer), the Proactor is notified by the ReactorEx. The - Proactor, in turn notifies the Peer_Handler. If the read was - successful the Peer_Handler just displays the received msg to the - console and reinvokes a proactive read from the network connection. - If the read failed (i.e. the remote peer exited), the Peer_Handler - sets a flag to end the event loop and returns. This will cause the - application to exit. - -. ^C events -- When the user types ^C at the console, the - STDIN_Handler's signal handler will be called. It does nothing, but - as a result of the signal, the STDIN_Handler thread will exit. - -. STDIN_Handler thread exits -- The Exit_Hook will get called back - from the ReactorEx. Exit_Hook::handle_signal sets a flag to end the - event loop and returns. This will cause the application to exit. diff --git a/examples/Reactor/WFMO_Reactor/reactorex.mak b/examples/Reactor/WFMO_Reactor/reactorex.mak deleted file mode 100644 index 82d7ac5f464..00000000000 --- a/examples/Reactor/WFMO_Reactor/reactorex.mak +++ /dev/null @@ -1,938 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-!IF "$(CFG)" == ""
-CFG=test_exception - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to test_exception - Win32\
- Debug.
-!ENDIF
-
-!IF "$(CFG)" != "ntalk - Win32 Debug" && "$(CFG)" !=\
- "test_remove_handler - Win32 Debug" && "$(CFG)" != "test_timeout - Win32 Debug"\
- && "$(CFG)" != "test_MT - Win32 Debug" && "$(CFG)" !=\
- "test_exception - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "reactorex.mak" CFG="test_exception - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "ntalk - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_remove_handler - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "test_timeout - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "test_MT - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "test_exception - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "ntalk - Win32 Debug"
-RSC=rc.exe
-CPP=cl.exe
-
-!IF "$(CFG)" == "ntalk - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ntalk\Debug"
-# PROP BASE Intermediate_Dir "ntalk\Debug"
-# PROP BASE Target_Dir "ntalk"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "ntalk"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_reactorEx.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_reactorEx.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_reactorEx.exe"
- -@erase "$(OUTDIR)\test_reactorEx.ilk"
- -@erase "$(OUTDIR)\test_reactorEx.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/ntalk.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/ntalk.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"test_reactorEx.exe"
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_reactorEx.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_reactorEx.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_reactorEx.obj"
-
-"$(OUTDIR)\test_reactorEx.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_remove_handler - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test_remove_handler\Debug"
-# PROP BASE Intermediate_Dir "test_remove_handler\Debug"
-# PROP BASE Target_Dir "test_remove_handler"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "test_remove_handler"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_remove_handler.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_remove_handler.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_remove_handler.exe"
- -@erase "$(OUTDIR)\test_remove_handler.ilk"
- -@erase "$(OUTDIR)\test_remove_handler.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/test_remove_handler.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_remove_handler.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_remove_handler.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_remove_handler.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_remove_handler.obj"
-
-"$(OUTDIR)\test_remove_handler.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_timeout - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test_timeout\Debug"
-# PROP BASE Intermediate_Dir "test_timeout\Debug"
-# PROP BASE Target_Dir "test_timeout"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "test_timeout"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_timeout.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_timeout.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_timeout.exe"
- -@erase "$(OUTDIR)\test_timeout.ilk"
- -@erase "$(OUTDIR)\test_timeout.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/test_timeout.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_timeout.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_timeout.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_timeout.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_timeout.obj"
-
-"$(OUTDIR)\test_timeout.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_MT - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test_MT\Debug"
-# PROP BASE Intermediate_Dir "test_MT\Debug"
-# PROP BASE Target_Dir "test_MT"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "test_MT"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_MT.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_MT.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_MT.exe"
- -@erase "$(OUTDIR)\test_MT.ilk"
- -@erase "$(OUTDIR)\test_MT.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/test_MT.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_MT.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_MT.pdb" /debug /machine:I386 /out:"$(OUTDIR)/test_MT.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_MT.obj"
-
-"$(OUTDIR)\test_MT.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "test_exception - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "test_exception\Debug"
-# PROP BASE Intermediate_Dir "test_exception\Debug"
-# PROP BASE Target_Dir "test_exception"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "test_exception"
-OUTDIR=.\.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\test_exception.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\test_exceptions.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\test_exception.exe"
- -@erase "$(OUTDIR)\test_exception.ilk"
- -@erase "$(OUTDIR)\test_exception.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/test_exception.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_exception.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/test_exception.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/test_exception.exe"
-LINK32_OBJS= \
- "$(INTDIR)\test_exceptions.obj"
-
-"$(OUTDIR)\test_exception.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-CPP_OBJS=.\Debug/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-################################################################################
-# Begin Target
-
-# Name "ntalk - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_reactorEx.cpp
-DEP_CPP_TEST_=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_Acceptor.h"\
- {$(INCLUDE)}"\ace\SOCK_Acceptor.i"\
- {$(INCLUDE)}"\ace\SOCK_Connector.h"\
- {$(INCLUDE)}"\ace\SOCK_Connector.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_reactorEx.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "test_remove_handler - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_remove_handler.cpp
-DEP_CPP_TEST_R=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_remove_handler.obj" : $(SOURCE) $(DEP_CPP_TEST_R) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "test_timeout - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_timeout.cpp
-DEP_CPP_TEST_T=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_timeout.obj" : $(SOURCE) $(DEP_CPP_TEST_T) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "test_MT - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_MT.cpp
-DEP_CPP_TEST_M=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_MT.obj" : $(SOURCE) $(DEP_CPP_TEST_M) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "test_exception - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\test_exceptions.cpp
-DEP_CPP_TEST_E=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\test_exceptions.obj" : $(SOURCE) $(DEP_CPP_TEST_E) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
diff --git a/examples/Reactor/WFMO_Reactor/reactorex.mdp b/examples/Reactor/WFMO_Reactor/reactorex.mdp Binary files differdeleted file mode 100644 index a62982c81fc..00000000000 --- a/examples/Reactor/WFMO_Reactor/reactorex.mdp +++ /dev/null diff --git a/examples/Reactor/WFMO_Reactor/test_MT.cpp b/examples/Reactor/WFMO_Reactor/test_MT.cpp deleted file mode 100644 index 3d124dcb255..00000000000 --- a/examples/Reactor/WFMO_Reactor/test_MT.cpp +++ /dev/null @@ -1,232 +0,0 @@ -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// test_MT.cpp -// -// = DESCRIPTION -// This application tests multiple threads simultaneously calling -// ReactorEx->handle_events(). It also shows how different threads -// can update the state of ReactorEx by registering and removing -// Event_Handlers. -// -// = AUTHOR -// Irfan Pyarali -// -// ============================================================================ - -#include "ace/Task.h" -#include "ace/ReactorEx.h" -#include "ace/Get_Opt.h" - -static int concurrent_threads = 1; -static int number_of_handles = ACE_ReactorEx::DEFAULT_SIZE; -static int number_of_handles_to_signal = 1; -static int interval = 2; -static int iterations = 10; - -// Explain usage and exit. -static void -print_usage_and_die (void) -{ - ACE_DEBUG ((LM_DEBUG, - "usage: \n\t" - "[-t (# of threads - default 1)] \n\t" - "[-h (# of handlers) - default 62] \n\t" - "[-i (# time interval between signals) - default 2] \n\t" - "[-s (# of handles to signal) - default 1] \n\t" - "[-e (# of iterations) - default 10] \n\t")); - ACE_OS::exit (1); -} - -// Parse the command-line arguments and set options. -static void -parse_args (int argc, char **argv) -{ - ACE_Get_Opt get_opt (argc, argv, "t:h:s:i:e:"); - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 't': - concurrent_threads = atoi (get_opt.optarg); - break; - case 'e': - iterations = atoi (get_opt.optarg); - break; - case 'h': - number_of_handles = atoi (get_opt.optarg); - break; - case 'i': - interval = atoi (get_opt.optarg); - break; - case 's': - number_of_handles_to_signal = atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -class Task_Handler : public ACE_Task<ACE_NULL_SYNCH> -{ -public: - Task_Handler (size_t number_of_handles, - size_t concurrent_threads); - // Constructor. - - ~Task_Handler (void); - // Destructor. - - virtual int handle_close (ACE_HANDLE handle, - ACE_Reactor_Mask close_mask); - // Called when object is removed from the ACE_Reactor - - int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0); - // Handle events being signaled by the main thread. - - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg = 0); - // Called when timer expires. - - int svc (void); - // Task event loop. - - int signal (size_t index); - // Signal an event. - -private: - ACE_Auto_Event *events_; -}; - -// All threads do reactorEx->handle_events () -int -Task_Handler::svc (void) -{ - // Try to become the owner - ACE_Service_Config::reactorEx ()->owner (ACE_Thread::self ()); - // Run the event loop. - return ACE_Service_Config::run_reactorEx_event_loop (); -} - -Task_Handler::Task_Handler (size_t number_of_handles, - size_t concurrent_threads) -{ - ACE_NEW (this->events_, ACE_Auto_Event [number_of_handles]); - - for (size_t i = 0; i < number_of_handles; i++) - { - if (ACE_Service_Config::reactorEx ()->register_handler (this, - this->events_[i].handle ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\t cannot register handle %d with ReactorEx\n", - "Task_Handler::Task_Handler", i)); - } - // Make us an active object. - if (this->activate (THR_NEW_LWP, - concurrent_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\t cannot activate task\n", - "activate")); -} - -Task_Handler::~Task_Handler (void) -{ - delete [] this->events_; -} - - -int -Task_Handler::handle_signal (int signum, siginfo_t *siginfo, ucontext_t *) -{ - // When signaled, print message, remove self, and add self - // This will force ReactorEx to update its internal handle tables - ACE_DEBUG ((LM_DEBUG, "(%t) handle_signal() called: handle value = %d\n", - siginfo->si_handle_)); - - if (ACE_Service_Config::reactorEx ()->remove_handler (siginfo->si_handle_, - ACE_Event_Handler::DONT_CALL) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%t) %p\tTask cannot be unregistered from ReactorEx: handle value = %d\n", - "Task_Handler::handle_signal", - siginfo->si_handle_), -1); - - if (ACE_Service_Config::reactorEx ()->register_handler (this, - siginfo->si_handle_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "(%t) %p\tTask cannot be registered with ReactorEx: handle value = %d\n", - "Task_Handler::handle_signal", - siginfo->si_handle_), -1); - return 0; -} - -int -Task_Handler::handle_close (ACE_HANDLE handle, - ACE_Reactor_Mask close_mask) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handle_close() called: handle value = %d\n", - handle)); - return 0; -} - -int -Task_Handler::handle_timeout (const ACE_Time_Value &tv, - const void *arg) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) handle_timeout() called: iteration value = %d\n", - int (arg))); - return 0; -} - -int -Task_Handler::signal (size_t index) -{ - return this->events_[index].signal (); -} - -int -main (int argc, char **argv) -{ - parse_args (argc, argv); - Task_Handler task (number_of_handles, - concurrent_threads); - - ACE_OS::srand (ACE_OS::time (0L)); - - for (int i = 1; i <= iterations; i++) - { - // Sleep for a while - ACE_OS::sleep (interval); - - // Randomly generate events - ACE_DEBUG ((LM_DEBUG, "********************************************************\n")); - ACE_DEBUG ((LM_DEBUG, "(%t -- main thread) signaling %d events : iteration = %d\n", - number_of_handles_to_signal, - i)); - ACE_DEBUG ((LM_DEBUG, "********************************************************\n")); - - // Setup a timer for the task - ACE_Service_Config::reactorEx ()->schedule_timer (&task, - (void *) i, - 0); - - for (int i = 0; i < number_of_handles_to_signal; i++) - { - // Randomly select a handle to signal. - task.signal (ACE_OS::rand() % number_of_handles); - } - } - - // Sleep for a while - ACE_OS::sleep (interval); - // Close ReactorEx - ACE_Service_Config::reactorEx ()->close (); - // Wait for all threads to exit - ACE_Service_Config::thr_mgr ()->wait (); - // Delete dynamic resources - ACE_Service_Config::close_singletons (); - - return 0; -} diff --git a/examples/Reactor/WFMO_Reactor/test_exceptions.cpp b/examples/Reactor/WFMO_Reactor/test_exceptions.cpp deleted file mode 100644 index 075e35a89e5..00000000000 --- a/examples/Reactor/WFMO_Reactor/test_exceptions.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include "ace/ReactorEx.h" - -class Event_Handler : public ACE_Event_Handler -{ -public: - Event_Handler () - : event_ (1) - { - ACE_DEBUG ((LM_DEBUG, "Event_Handler created\n")); - } - ~Event_Handler () - { - ACE_DEBUG ((LM_DEBUG, "Event_Handler destroyed\n")); - } - int handle_signal (int signum, siginfo_t * = 0, ucontext_t * = 0) - { - char *cause_exception = 0; - char a = *cause_exception; - return 0; - } - ACE_HANDLE get_handle (void) const - { - return this->event_.handle (); - } -private: - ACE_Manual_Event event_; -}; - -class ACE_ReactorEx_Test -{ -public: - static void doit () - { - for (int i = 1; i <= 10; i++) - { - ACE_DEBUG ((LM_DEBUG, "Active threads in ReactorEx (before handle_events) = %d\n", - ACE_Service_Config::reactorEx ()->active_threads_)); - ACE_SEH_TRY - { - ACE_Service_Config::reactorEx ()->handle_events (); - } - ACE_SEH_EXCEPT (EXCEPTION_EXECUTE_HANDLER) - { - ACE_DEBUG ((LM_DEBUG, "Exception occurred\n")); - } - ACE_DEBUG ((LM_DEBUG, "Active threads in ReactorEx (after handle_events) = %d\n", - ACE_Service_Config::reactorEx ()->active_threads_)); - } - } -}; - -int -main () -{ - Event_Handler *handler; - ACE_NEW_RETURN (handler, Event_Handler, -1); - ACE_Service_Config::reactorEx ()->register_handler (handler); - ACE_ReactorEx_Test::doit (); - delete handler; - return 0; -} - diff --git a/examples/Reactor/WFMO_Reactor/test_reactorEx.cpp b/examples/Reactor/WFMO_Reactor/test_reactorEx.cpp deleted file mode 100644 index e2f678c4279..00000000000 --- a/examples/Reactor/WFMO_Reactor/test_reactorEx.cpp +++ /dev/null @@ -1,429 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// test_reactorEx.cpp -// -// = DESCRIPTION -// This test application tests a wide range of events that can be -// demultiplexed using various ACE utilities. Events used include ^C -// events, reading from STDIN, vanilla Win32 events, thread exits, -// ReactorEx notifications, proactive reads, and proactive writes. -// -// The proactive I/O events are demultiplexed by the ACE_Proactor. -// The thread exits, notications, and vanilla Win32 events are -// demultiplexed by the ACE_ReactorEx. To enable a single thread -// to run all these events, the Proactor is integrated with the -// ReactorEx. -// -// = AUTHOR -// Tim Harrison -// -// ============================================================================ - -#include "ace/ReactorEx.h" -#include "ace/Proactor.h" -#include "ace/SOCK_Connector.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/Get_Opt.h" -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Task.h" - -typedef ACE_Task<ACE_MT_SYNCH> MT_TASK; - -class Peer_Handler : public MT_TASK - // = TITLE - // Connect to a server. Receive messages from STDIN_Handler - // and forward them to the server using proactive I/O. -{ -public: - // = Initialization methods. - Peer_Handler (int argc, char *argv[]); - ~Peer_Handler (void); - - int open (void * =0); - // This method creates the network connection to the remote peer. - // It does blocking connects and accepts depending on whether a - // hostname was specified from the command line. - - virtual int handle_output_complete (ACE_Message_Block *msg, - long bytes_transferred); - // One of our asynchronous writes to the remote peer has completed. - // Make sure it succeeded and then delete the message. - - virtual int handle_input_complete (ACE_Message_Block *msg, - long bytes_transferred); - // The remote peer has sent us something. If it succeeded, print - // out the message and reinitiate a read. Otherwise, fail. In both - // cases, delete the message sent. - - virtual ACE_Message_Block *get_message (void); - // This is so the Proactor can get a message to read into. - - virtual ACE_HANDLE get_handle (void) const; - // This is so the Proactor can get our handle. - - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - // We've been removed from the ReactorEx. - - virtual int handle_output (ACE_HANDLE fd); - // Called when output events should start. Note that this is - // automatically invoked by the - // <ACE_ReactorEx_Notificiation_Strategy>. - -private: - ACE_SOCK_Stream stream_; - // Socket that we have connected to the server. - - ACE_ReactorEx_Notification_Strategy strategy_; - // The strategy object that the reactorEx uses to notify us when - // something is added to the queue. - - // = Remote peer info. - char *host_; - // Name of remote host. - - u_short port_; - // Port number for remote host. -}; - -class STDIN_Handler : public ACE_Task<ACE_NULL_SYNCH> - // = TITLE - // Active Object. Reads from STDIN and passes message blocks to - // the peer handler. -{ -public: - STDIN_Handler (MT_TASK &ph); - // Initialization. - - virtual int open (void * = 0); - // Activate object. - - virtual int close (u_long = 0); - // Shut down. - - int svc (void); - // Thread runs here as an active object. - -private: - static void handler (int signum); - // Handle a ^C. (Do nothing, this just illustrates how we can catch - // signals along with the other things). - - void register_thread_exit_hook (void); - // Helper function to register with the ReactorEx for thread exit. - - virtual int handle_signal (int index, siginfo_t *, ucontext_t *); - // The STDIN thread has exited. This means the user hit ^C. We can - // end the event loop. - - MT_TASK &ph_; - // Send all input to ph_. - - ACE_HANDLE thr_handle_; - // Handle of our thread. -}; - -Peer_Handler::Peer_Handler (int argc, char *argv[]) - : host_ (0), - port_ (ACE_DEFAULT_SERVER_PORT), - strategy_ (ACE_Service_Config::reactorEx (), - this, - ACE_Event_Handler::WRITE_MASK) -{ - // This code sets up the message to notify us when a new message is - // added to the queue. Actually, the queue notifies ReactorEx which - // then notifies us. - this->msg_queue ()->notification_strategy (&this->strategy_); - - ACE_Get_Opt get_opt (argc, argv, "h:p:"); - int c; - - while ((c = get_opt ()) != EOF) - { - switch (c) - { - case 'h': - host_ = get_opt.optarg; - break; - case 'p': - port_ = ACE_OS::atoi (get_opt.optarg); - break; - } - } -} - -Peer_Handler::~Peer_Handler (void) -{ -} - -// This method creates the network connection to the remote peer. It -// does blocking connects and accepts depending on whether a hostname -// was specified from the command line. - -int -Peer_Handler::open (void *) -{ - if (host_ != 0) // Connector - { - ACE_INET_Addr addr (port_, host_); - ACE_SOCK_Connector connector; - - // Establish connection with server. - if (connector.connect (stream_, addr) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), -1); - - ACE_DEBUG ((LM_DEBUG, "connected.\n")); - } - else // Acceptor - { - ACE_SOCK_Acceptor acceptor; - ACE_INET_Addr local_addr (port_); - - if ((acceptor.open (local_addr) == -1) || - (acceptor.accept (this->stream_) == -1)) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "accept failed"), -1); - - ACE_DEBUG ((LM_DEBUG, "accepted.\n")); - } - - return ACE_Service_Config::proactor ()->initiate - (this, ACE_Event_Handler::READ_MASK); -} - -// One of our asynchronous writes to the remote peer has completed. -// Make sure it succeeded and then delete the message. - -int -Peer_Handler::handle_output_complete (ACE_Message_Block *msg, - long bytes_transferred) -{ - if (bytes_transferred <= 0) - ACE_DEBUG ((LM_DEBUG, "%p bytes = %d\n", "Message failed", - bytes_transferred)); - - // This was allocated by the STDIN_Handler, queued, dequeued, - // passed to the proactor, and now passed back to us. - msg->release (); - return 0; // Do not reinvoke a send. -} - -// The remote peer has sent us something. If it succeeded, print -// out the message and reinitiate a read. Otherwise, fail. In both -// cases, delete the message sent. - -int -Peer_Handler::handle_input_complete (ACE_Message_Block *msg, - long bytes_transferred) -{ - int result = 1; // Reinvokes the recv() operation by default! - - if (bytes_transferred > 0 && msg->length () > 0) - { - msg->rd_ptr ()[bytes_transferred] = '\0'; - // Print out the message received from the server. - ACE_DEBUG ((LM_DEBUG, "%s", msg->rd_ptr ())); - } - else - { - // If a read failed, we will assume it's because the remote peer - // went away. We will end the event loop. Since we're in the - // main thread, we don't need to do a notify. - ACE_Service_Config::end_reactorEx_event_loop (); - result = -1; - } - - msg->release (); - return result; -} - -// This is so the Proactor can get a message to read into. - -ACE_Message_Block * -Peer_Handler::get_message (void) -{ - // An extra byte for NUL termination. - ACE_Message_Block *message = - new ACE_Message_Block (BUFSIZ + 1); - - message->size (BUFSIZ); - return message; -} - -// This is so the Proactor can get our handle. -ACE_HANDLE -Peer_Handler::get_handle (void) const -{ - return this->stream_.get_handle (); -} - -// We've been removed from the ReactorEx. -int -Peer_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - ACE_DEBUG ((LM_DEBUG, "Peer_Handler closing down\n")); - return 0; -} - -// New stuff added to the message queue. Try to dequeue a message. -int -Peer_Handler::handle_output (ACE_HANDLE fd) -{ - ACE_Message_Block *mb; - - ACE_Time_Value tv (ACE_Time_Value::zero); - - // Forward the message to the remote peer receiver. - if (this->getq (mb, &tv) != -1) - { - if (ACE_Service_Config::proactor ()-> - initiate (this, ACE_Event_Handler::WRITE_MASK, mb) == -1) - ACE_ERROR ((LM_ERROR, "%p Write initiate.\n", "Peer_Handler")); - } - return 0; -} - -void -STDIN_Handler::handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "signal = %S\n", signum)); -} - -STDIN_Handler::STDIN_Handler (MT_TASK &ph) - : ph_ (ph) -{ - // Register for ^C from the console. We just need to catch the - // exception so that the kernel doesn't kill our process. - // Registering this signal handler just tells the kernel that we - // know what we're doing; to leave us alone. - - ACE_OS::signal (SIGINT, ACE_SignalHandler (STDIN_Handler::handler)); -}; - -// Activate object. - -int -STDIN_Handler::open (void *) -{ - if (this->activate (THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), -1); - - return 0; -} - -// Shut down. - -int -STDIN_Handler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) thread is exiting.\n")); - return 0; -} - -// Thread runs here. - -int -STDIN_Handler::svc (void) -{ - this->register_thread_exit_hook (); - - for (;;) - { - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - - // Read from stdin into mb. - int read_result = ACE_OS::read (ACE_STDIN, - mb->rd_ptr (), - mb->size ()); - - // If read succeeds, put mb to peer handler, else end the loop. - if (read_result > 0) - { - mb->wr_ptr (read_result); - // Note that this call will first enqueue mb onto the peer - // handler's message queue, which will then turn around and - // notify the ReactorEx via the Notification_Strategy. This - // will subsequently signal the Peer_Handler, which will - // react by calling back to its handle_output() method, - // which dequeues the message and sends it to the peer - // across the network. - this->ph_.putq (mb); - } - else - break; - } - - // handle_signal will get called on the main proactor thread since - // we just exited and the main thread is waiting on our thread exit. - return 0; -} - -// Register an exit hook with the reactorEx. - -void -STDIN_Handler::register_thread_exit_hook (void) -{ - // Get a real handle to our thread. - ACE_Service_Config::thr_mgr ()->thr_self (this->thr_handle_); - - // Register ourselves to get called back when our thread exits. - - if (ACE_Service_Config::reactorEx ()-> - register_handler (this, this->thr_handle_) == -1) - ACE_ERROR ((LM_ERROR, "Exit_Hook Register failed.\n")); - - // We're in another thread, so we need to notify the ReactorEx so - // that it wakes up and waits on the new set of handles. - ACE_Service_Config::reactorEx ()->notify (); -} - -// The STDIN thread has exited. This means the user hit ^C. We can -// end the event loop and delete ourself. - -int -STDIN_Handler::handle_signal (int, siginfo_t *si, ucontext_t *) -{ - ACE_DEBUG ((LM_DEBUG, "STDIN thread has exited.\n")); - ACE_ASSERT (this->thr_handle_ == si->si_handle_); - ACE_Service_Config::end_reactorEx_event_loop (); - return 0; -} - -int -main (int argc, char *argv[]) -{ - // Open handler for remote peer communications this will run from - // the main thread. - Peer_Handler peer_handler (argc, argv); - - if (peer_handler.open () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p open failed, errno = %d.\n", - "peer_handler", errno), 0); - - // Open active object for reading from stdin. - STDIN_Handler stdin_handler (peer_handler); - - // Spawn thread. - if (stdin_handler.open () == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "%p open failed, errno = %d.\n", - "stdin_handler", errno), 0); - - // Register proactor with ReactorEx so that we can demultiplex - // "waitable" events and I/O operations from a single thread. - if (ACE_Service_Config::reactorEx ()->register_handler - (ACE_Service_Config::proactor ()) != 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p failed to register Proactor.\n", - argv[0]), -1); - - // Run main event demultiplexor. - ACE_Service_Config::run_reactorEx_event_loop (); - - return 0; -} diff --git a/examples/Reactor/WFMO_Reactor/test_remove_handler.cpp b/examples/Reactor/WFMO_Reactor/test_remove_handler.cpp deleted file mode 100644 index 521bab21cf3..00000000000 --- a/examples/Reactor/WFMO_Reactor/test_remove_handler.cpp +++ /dev/null @@ -1,101 +0,0 @@ -// ============================================================================ -// $Id$ - -// -// = LIBRARY -// examples -// -// = FILENAME -// test_remove_handler.cpp -// -// = DESCRIPTION -// Tests the ReactorEx's ability to handle simultaneous events. If -// you pass anything on the command-line, then each handler -// requests to be removed from the ReactorEx after each event. -// -// = AUTHOR -// Tim Harrison -// -// ============================================================================ - -#include "ace/ReactorEx.h" -#include "ace/Service_Config.h" -#include "ace/Synch.h" - -class Event_Handler : public ACE_Event_Handler -// = TITLE -// Generic Event Handler. -// -// = DESCRIPTION -// -// Creates event. Registers with ReactorEx. Signals event. If -// created with -close_down- it returns -1 from handle signal. -{ -public: - Event_Handler (int event_number, - int close_down) - : event_number_ (event_number), - close_down_ (close_down) - { - if (ACE_Service_Config::reactorEx ()->register_handler (this, - this->event_.handle ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\tevent handler %d cannot be added to ReactorEx\n", "", event_number_)); - this->event_.signal (); - } - - virtual int handle_signal (int index, siginfo_t *, ucontext_t *) - { - ACE_DEBUG ((LM_DEBUG, "event %d occured.\n", event_number_)); - - if (this->close_down_) - return -1; - else - return 0; - } - - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask) - { - ACE_DEBUG ((LM_DEBUG, "event handler %d closed.\n", event_number_)); - delete this; - return 0; - } - - virtual ACE_HANDLE get_handle (void) const - { - return event_.handle (); - } - -private: - int event_number_; - // Our event number. - - int close_down_; - // Shall we close down or not. - - ACE_Event event_; - // Signaled to shut down the handler. -}; - -int -main (int argc, char *argv[]) -{ - int close_down = argc > 1 ? 1 : 0; - - for (int i = 1; i <= ACE_ReactorEx::DEFAULT_SIZE; i++) - new Event_Handler (i, close_down); - - int result = 0; - ACE_Time_Value time (1); - while (1) - { - result = ACE_Service_Config::reactorEx ()->handle_events (time); - if (result == 0 && errno == ETIME) - { - ACE_DEBUG ((LM_DEBUG, "No more work left: timing out\n")); - break; - } - if (result == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "main"), -1); - } - return 0; -} diff --git a/examples/Reactor/WFMO_Reactor/test_timeout.cpp b/examples/Reactor/WFMO_Reactor/test_timeout.cpp deleted file mode 100644 index 66656b13ac3..00000000000 --- a/examples/Reactor/WFMO_Reactor/test_timeout.cpp +++ /dev/null @@ -1,71 +0,0 @@ -// $Id: test_timeout.cpp - -// ============================================================================ -// -// = LIBRARY -// examples -// -// = FILENAME -// test_timeout.cpp -// -// = DESCRIPTION -// This example application shows how to write ReactorEx and -// Proactor event loops that handle events for some fixed amount of -// time. -// -// = AUTHOR -// Tim Harrison -// -// ============================================================================ - -#include "ace/ReactorEx.h" -#include "ace/Proactor.h" -#include "ace/Service_Config.h" -#include "ace/OS.h" - -class Timeout_Handler : public ACE_Event_Handler -// = TITLE -// Generic timeout handler. -{ -public: - Timeout_Handler (void) : count_ (0) {;} - - virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg) - // Print out when timeouts occur. - { - ACE_DEBUG ((LM_DEBUG, "%d timeout occurred for %s.\n", - ++count_, - (char *) arg)); - return 0; - } - -private: - int count_; -}; - -int -main () -{ - Timeout_Handler handler; - - // Register a 2 second timer. - ACE_Time_Value foo_tv (2); - ACE_Service_Config::reactorEx ()->schedule_timer (&handler, - (void *) "Foo", - ACE_Time_Value::zero, - foo_tv); - // Register a 3 second timer. - ACE_Time_Value bar_tv (3); - ACE_Service_Config::reactorEx ()->schedule_timer (&handler, - (void *) "Bar", - ACE_Time_Value::zero, - bar_tv); - - // Handle events for 12 seconds. - ACE_Time_Value run_time (12); - if (ACE_Service_Config::run_reactorEx_event_loop (run_time) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p.\n", "main"), -1); - - return 0; -} diff --git a/examples/Registry/test_registry_iterator.cpp b/examples/Registry/test_registry_iterator.cpp deleted file mode 100644 index c54af455eea..00000000000 --- a/examples/Registry/test_registry_iterator.cpp +++ /dev/null @@ -1,134 +0,0 @@ -// This example uses the ACE_Registry class to iterator through the -// entries in the predefined registries. The host of iteration can be -// varied through argv[1]. If no host is specified the local host is -// used. This is very similar to how regedt32 starts up. -// -// This examples points the cool iterators in ACE_Registry - - -#include "ace/Registry.h" - - -// Indentation while printing names -static const u_long INDENTATION_LEVEL = 3; - -// Prototypes -static int print_naming_context (ACE_Registry::Naming_Context &naming_context, - u_long indentation); -static void print_object (const ACE_Registry::Istring &name, - u_long indentation); -static void print_context (ACE_Registry::Naming_Context &parent, - const ACE_Registry::Istring &name, - u_long indentation); -static void indent (u_long indentation); - -int -main (int argc, char *argv[]) -{ - int result; - ACE_Registry::Naming_Context naming_context; - - LPCTSTR host = 0; - if (argc == 2) - host = ACE_WIDE_STRING (argv[1]); - - // Connect to a predefined naming context - result = ACE_Predefined_Naming_Contexts::connect (naming_context, - HKEY_LOCAL_MACHINE, - // HKEY_CLASSES_ROOT, - // HKEY_USERS, - // HKEY_CURRENT_USER, - host); - - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Predefined_Naming_Contexts::connect failed"), -1); - - // Print contents of naming context - result = ::print_naming_context (naming_context, 0); - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "print_naming_context failed"), -1); - - return 0; -} - - -// Print contents of <naming_context> -static int -print_naming_context (ACE_Registry::Naming_Context &naming_context, - u_long indentation) -{ - ACE_Registry::Binding_List list; - - // Get the list of all entries - int result = naming_context.list (list); - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Registry::Naming_Context::list"), -1); - - // Iterator through all entries - for (ACE_Registry::Binding_List::iterator i = list.begin (); - i != list.end (); - i++) - { - // Yeeesss! STL rules! - ACE_Registry::Binding &binding = *i; - - if (binding.type () == ACE_Registry::OBJECT) - // If object - ::print_object (binding.name (), - indentation); - else - // If context - ::print_context (naming_context, - binding.name (), - indentation); - } - return 0; -} - - -// Print an object with <name> -static void -print_object (const ACE_Registry::Istring &name, - u_long indentation) -{ - // Set indentation - ::indent (indentation); - cout << name << endl; -} - - -// Print an context with <name> and <parent> -static void -print_context (ACE_Registry::Naming_Context &parent, - const ACE_Registry::Istring &name, - u_long indentation) -{ - // Set indentation - indent (indentation); - cout << name << endl; - - ACE_Registry::Naming_Context child_context; - // Find child context - int result = parent.resolve_context (name, - child_context, - KEY_READ); - if (result != 0) - ACE_ERROR ((LM_ERROR, "%s %s\n", "ACE_Registry::Naming_Context::resolve_context failed for:", name.c_str ())); - else - { - // Print contents of the child - result = ::print_naming_context (child_context, - indentation + INDENTATION_LEVEL); - if (result != 0) - ACE_ERROR ((LM_ERROR, "%p\n", "print_naming_context failed")); - } -} - - -// Pretty formating -static void -indent (u_long indentation) -{ - for (; indentation > 0; indentation--) - cout << " "; -} diff --git a/examples/Registry/test_registry_iterator.mak b/examples/Registry/test_registry_iterator.mak deleted file mode 100644 index a7ee7f38af3..00000000000 --- a/examples/Registry/test_registry_iterator.mak +++ /dev/null @@ -1,193 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=test_registry_iterator - Win32 Debug -!MESSAGE No configuration specified. Defaulting to test_registry_iterator -\ - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "test_registry_iterator - Win32 Release" && "$(CFG)" !=\ - "test_registry_iterator - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "test_registry_iterator.mak"\ - CFG="test_registry_iterator - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "test_registry_iterator - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "test_registry_iterator - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "test_registry_iterator - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_registry_iterator.exe" - -CLEAN : - -@erase ".\test_registry_iterator.exe" - -@erase ".\test_registry_iterator.obj" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"test_registry_iterator.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_registry_iterator.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/test_registry_iterator.pdb" /machine:I386\ - /out:"$(OUTDIR)/test_registry_iterator.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_registry_iterator.obj" - -"$(OUTDIR)\test_registry_iterator.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "test_registry_iterator - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_registry_iterator.exe" - -CLEAN : - -@erase ".\test_registry_iterator.exe" - -@erase ".\test_registry_iterator.obj" - -@erase ".\test_registry_iterator.ilk" - -@erase ".\test_registry_iterator.pdb" - -@erase ".\vc40.pdb" - -@erase ".\vc40.idb" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /Fp"test_registry_iterator.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_registry_iterator.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/test_registry_iterator.pdb" /debug /machine:I386\ - /out:"$(OUTDIR)/test_registry_iterator.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_registry_iterator.obj" - -"$(OUTDIR)\test_registry_iterator.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx.obj: - $(CPP) $(CPP_PROJ) $< - -.c.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "test_registry_iterator - Win32 Release" -# Name "test_registry_iterator - Win32 Debug" - -!IF "$(CFG)" == "test_registry_iterator - Win32 Release" - -!ELSEIF "$(CFG)" == "test_registry_iterator - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\test_registry_iterator.cpp -DEP_CPP_TEST_=\ - {$(INCLUDE)}"\ace\Registry.h"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\sys\types.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\timeb.h"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Time_Value.i"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\ACE.i"\ - -NODEP_CPP_TEST_=\ - "..\..\ace\bstring.h"\ - - -"$(INTDIR)\test_registry_iterator.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/examples/Registry/test_registry_iterator.mdp b/examples/Registry/test_registry_iterator.mdp Binary files differdeleted file mode 100644 index cb36b5b6a52..00000000000 --- a/examples/Registry/test_registry_iterator.mdp +++ /dev/null diff --git a/examples/Registry/test_registry_update.cpp b/examples/Registry/test_registry_update.cpp deleted file mode 100644 index 5ea097cdbe9..00000000000 --- a/examples/Registry/test_registry_update.cpp +++ /dev/null @@ -1,145 +0,0 @@ -// Suppose this application belonged to AcmeSoft. AcmeSoft wants to -// keep track of the number of times this application is -// executed. They want two counters: one counts the number of -// executions per machine, the other keeps track of the number of -// executions per user. -// -// This application uses the ACE_Registry class to create and update -// entries in the LOCAL_MACHINE and CURRENT_USER predefined registries -// to store the counters. -// -// Note that this application will not work with remote registries -// if used with the CURRENT_USER predefined registry. - -#include "ace/Registry.h" - - -// Name for application's naming context -static ACE_Registry::Name application_context_name; - -// Name for instance counter. -static ACE_Registry::Name counter_name; - -// Protypes -static int update_counter (HKEY predefined, - u_long ¤t_counter); -static void setup_names (); - -int -main(int argc, char *argv[]) -{ - int result; - u_long current_counter = 0; - - // initialize name - setup_names (); - - // Update counter per user - result = ::update_counter (HKEY_CURRENT_USER, - current_counter); - if (result == 0) - { - cout << "User counter: " << current_counter << endl; - - // Update counter per machine - result = ::update_counter (HKEY_LOCAL_MACHINE, - current_counter); - if (result == 0) - cout << "Machine counter: " << current_counter << endl; - } - - if (result != 0) - ACE_DEBUG ((LM_DEBUG, "test failed\n")); - else - ACE_DEBUG ((LM_DEBUG, "test succeeded\n")); - - return 0; -} - -static int -update_counter (HKEY predefined, - u_long ¤t_counter) -{ - int result; - ACE_Registry::Naming_Context parent_context; - ACE_Registry::Naming_Context application_context; - - // Connect to predefined entry - result = ACE_Predefined_Naming_Contexts::connect (parent_context, - predefined); - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Predefined_Naming_Contexts::connect failed"), -1); - - // Find application context name - result = parent_context.resolve_context (application_context_name, - application_context); - - if (result != 0) - // Failed to find: create a new context - result = parent_context.bind_new_context (application_context_name, - application_context); - - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Registry::Naming_Contexts::bind/resolve_context failed"), -1); - - // Counter - u_long counter = 0; - // Represent counter as an ACE_Registry::Object - ACE_Registry::Object object ((void *) &counter, - sizeof counter, - REG_DWORD); - // Find counter - result = application_context.resolve (counter_name, - object); - - if (result != 0) - // Failed to find: create new binding for object - { - counter = 1; - result = application_context.bind (counter_name, - object); - } - else - // Counter was found - { - // increment counter - counter++; - // Update - result = application_context.rebind (counter_name, - object); - } - - if (result != 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Registry::Naming_Contexts::bind/resolve failed"), -1); - else - current_counter = counter; - - return 0; -} - - -static void -setup_names () -{ - // Stupid implementation of STL is broken - /* - ::application_context_name.reserve (4); - ::application_context_name [0].id_ = __TEXT ("Software"); - ::application_context_name [1].id_ = __TEXT ("AcmeSoft"); - ::application_context_name [2].id_ = __TEXT ("AcmeApplication"); - ::application_context_name [3].id_ = __TEXT ("1.0"); - - ::counter_name.reserve (1); - ::counter_name [0].id_ = __TEXT ("Instance Counter"); - */ - - ACE_Registry::Name_Component component; - - component.id_ = __TEXT ("Software"), ::application_context_name.push_back (component); - component.id_ = __TEXT ("AcmeSoft"), ::application_context_name.push_back (component); - component.id_ = __TEXT ("AcmeApplication"), ::application_context_name.push_back (component); - component.id_ = __TEXT ("1.0"), ::application_context_name.push_back (component); - - component.id_ = __TEXT ("Instance Counter"), ::counter_name.push_back (component); -} - diff --git a/examples/Registry/test_registry_update.mak b/examples/Registry/test_registry_update.mak deleted file mode 100644 index 0076edd1454..00000000000 --- a/examples/Registry/test_registry_update.mak +++ /dev/null @@ -1,194 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -!IF "$(CFG)" == "" -CFG=test_registry_update - Win32 Debug -!MESSAGE No configuration specified. Defaulting to test_registry_update -\ - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "test_registry_update - Win32 Release" && "$(CFG)" !=\ - "test_registry_update - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE on this makefile -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "test_registry_update.mak"\ - CFG="test_registry_update - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "test_registry_update - Win32 Release" (based on\ - "Win32 (x86) Console Application") -!MESSAGE "test_registry_update - Win32 Debug" (based on\ - "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF -################################################################################ -# Begin Project -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "test_registry_update - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_registry_update.exe" - -CLEAN : - -@erase ".\test_registry_update.exe" - -@erase ".\test_registry_update.obj" - -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE"\ - /Fp"test_registry_update.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_registry_update.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no\ - /pdb:"$(OUTDIR)/test_registry_update.pdb" /machine:I386\ - /out:"$(OUTDIR)/test_registry_update.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_registry_update.obj" - -"$(OUTDIR)\test_registry_update.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "test_registry_update - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -OUTDIR=. -INTDIR=. - -ALL : "$(OUTDIR)\test_registry_update.exe" - -CLEAN : - -@erase ".\test_registry_update.exe" - -@erase ".\test_registry_update.obj" - -@erase ".\test_registry_update.ilk" - -@erase ".\test_registry_update.pdb" - -@erase ".\vc40.pdb" - -@erase ".\vc40.idb" - -# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c -CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\ - /Fp"test_registry_update.pch" /YX /c -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o"$(OUTDIR)/test_registry_update.bsc" -BSC32_SBRS= -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 -LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ - comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\ - odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\ - /pdb:"$(OUTDIR)/test_registry_update.pdb" /debug /machine:I386\ - /out:"$(OUTDIR)/test_registry_update.exe" -LINK32_OBJS= \ - "$(INTDIR)/test_registry_update.obj" - -"$(OUTDIR)\test_registry_update.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c.obj: - $(CPP) $(CPP_PROJ) $< - -.cpp.obj: - $(CPP) $(CPP_PROJ) $< - -.cxx.obj: - $(CPP) $(CPP_PROJ) $< - -.c.sbr: - $(CPP) $(CPP_PROJ) $< - -.cpp.sbr: - $(CPP) $(CPP_PROJ) $< - -.cxx.sbr: - $(CPP) $(CPP_PROJ) $< - -################################################################################ -# Begin Target - -# Name "test_registry_update - Win32 Release" -# Name "test_registry_update - Win32 Debug" - -!IF "$(CFG)" == "test_registry_update - Win32 Release" - -!ELSEIF "$(CFG)" == "test_registry_update - Win32 Debug" - -!ENDIF - -################################################################################ -# Begin Source File - -SOURCE=.\test_registry_update.cpp -DEP_CPP_TEST_=\ - {$(INCLUDE)}"\ace\Registry.h"\ - {$(INCLUDE)}"\ace\Log_Msg.h"\ - {$(INCLUDE)}"\ace\OS.h"\ - {$(INCLUDE)}"\bstring.h"\ - {$(INCLUDE)}"\ace\Time_Value.h"\ - {$(INCLUDE)}"\sys\types.h"\ - {$(INCLUDE)}"\sys\stat.h"\ - {$(INCLUDE)}"\sys\timeb.h"\ - {$(INCLUDE)}"\ace\Trace.h"\ - {$(INCLUDE)}"\ace\OS.i"\ - {$(INCLUDE)}"\ace\config.h"\ - {$(INCLUDE)}"\ace\Time_Value.i"\ - {$(INCLUDE)}"\ace\Log_Record.h"\ - {$(INCLUDE)}"\ace\ACE.h"\ - {$(INCLUDE)}"\ace\Log_Priority.h"\ - {$(INCLUDE)}"\ace\Log_Record.i"\ - {$(INCLUDE)}"\ace\ACE.i"\ - -NODEP_CPP_TEST_=\ - "..\..\STL\mutex.h"\ - - -"$(INTDIR)\test_registry_update.obj" : $(SOURCE) $(DEP_CPP_TEST_) "$(INTDIR)" - - -# End Source File -# End Target -# End Project -################################################################################ diff --git a/examples/Registry/test_registry_update.mdp b/examples/Registry/test_registry_update.mdp Binary files differdeleted file mode 100644 index 696f77bc597..00000000000 --- a/examples/Registry/test_registry_update.mdp +++ /dev/null diff --git a/examples/Service_Configurator/IPC-tests/Makefile b/examples/Service_Configurator/IPC-tests/Makefile deleted file mode 100644 index a90224788d8..00000000000 --- a/examples/Service_Configurator/IPC-tests/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the IPC tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = - -DIRS = client \ - server - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/examples/Service_Configurator/IPC-tests/README b/examples/Service_Configurator/IPC-tests/README deleted file mode 100644 index cb242ef616d..00000000000 --- a/examples/Service_Configurator/IPC-tests/README +++ /dev/null @@ -1,112 +0,0 @@ -This file describes how to invoke the Reactor client/server tests in -the $WRAPPER_ROOT/tests/Reactor/{client,server} directories. - -These tests exercise all of the IPC_SAP communication mechanisms, the -Reactor event demultiplexor, and the Service Configurator dynamic -service configuration framework. To gain a deeper understanding of -what is going on, you should read the IPC_SAP.ps, reactor-[1-3].ps, -and service_configurator.ps papers available for anonymous ftp from -ics.uci.edu in the ftp/gnu/C++_wrappers_doc.tar.Za[a-c] files. - -The key to running the Reactor client/server tests is to understand -the purpose of the svc.conf file located in the -$WRAPPER_ROOT/tests/Reactor/server directory. This file contains a -list of services that may be dynamically configured into a the address -space of a network daemon process. If you look at the example -svc.conf file included in the Reactor tests you'll see that most of -the entries are commented out (the comment symbol is the '#', which is -an "ignore until end-of-line comment" with the same semantics as the -UNIX C and Bourne shells). Before reading any further, take a look at -this svc.conf file with your favorite editor or file browser. - -There are several types of entries in this file. The two most -important are the lines beginning with the keywords "static" and -"dynamic". For example, the first non-commented line says: - -static ACE_Service_Manager "-d -p 3911" - -When this line is parsed at startup time by the Service Configurator -object in the ./server_test executable, it causes the pre-configured -Svc_Manager object to be initialized with an "argv" argument of "-d -p -3911." This results in TCP port 3911 being created to listen -connection requests from clients. To see how this works do the -following: - -1. Comment out all the other lines except - -static Svc_Manager "-d -p 3911" - - in the svc.conf file - -2. Start up the ./server_test executable in one window, as follows: - - % ./server_test -d - -3. Make another window on the *same* host and cd to the ../client - directory - -4. Run the ./remote_service_directory_test program as follows: - - % ./remote_service_directory_test -p 3911 -h localhost - -If everything has been compiled and initialized correctly, you should -get the following message: - - Svc_Manager 3911/tcp # lists all services in the daemon - -This message is telling you that the Svc_Manager is currently the only -service that is active within the ./server_test program. To configure -and activate another service dynamically, perform the following steps: - -1. *Without* shutting down the ./server_test program, edit the svc.conf - file. Comment out the Svc_Manager line by adding a '#' at the front, i.e.: - -# static Svc_Manager "-d -p 3911" - - and then uncomment the second line: - -dynamic Remote_Brdcast Service_Object * .obj/Handle_Broadcast.so:remote_broadcast "-p 10001" - -2. Send the SIGHUP signal to the process running the ./server_test program - (use "ps -gux" on SunOS 4.x or "ps -elf" on SunOS 5.x to find the - correct process id). This will cause the ./server_test program to - reconfigure itself based on the new contents of the svc.conf file. - After reconfiguration, you'll now have a second active service in - the address space of the ./server_test daemon. To see this, rerun - the remote_service_directory_test command, e.g.: - - % ./remote_service_directory_test -p 3911 -h localhost - - You should now see the following output: - - Svc_Manager 3911/tcp # lists all services in the daemon - Remote_Brdcast 10001/udp # tests broadcasting - - which indicates that the remote broadcast service is now active. - -3. To test the remote broadcast service, run the following program - in the ../client directory: - - % ./broadcast_client_test -p 10001 - - This should cause the window running the ./server_test to - display the following output: - - received broadcast datagram from host spare.ics.uci.edu - ---------------------------------------- - testing socket broadcast service - ---------------------------------------- - -If you want to run other tests, using other configurations, simply -uncomment the appropriate lines in the svc.conf file and experiment -with the corresponding test drivers in the ../client directory. All -the source code is available so once you get the hang of what is -happening, you might want to take a look at how it is all implemented. -I think you'll be surprised at how much of the ACE framework code is -reused for each different service. Moreover, writing a new service is -often simply a matter of copying an existing file and filling in the -behavior of some of the methods (e.g., the handle_input() method and -the init() method). - -The service_configurator.ps paper and the ACE.ps paper describe the -details of the Service Configurator framework. diff --git a/examples/Service_Configurator/IPC-tests/client/Makefile b/examples/Service_Configurator/IPC-tests/client/Makefile deleted file mode 100644 index ad581394fb9..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/Makefile +++ /dev/null @@ -1,310 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the client-side of the primary Reactor tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = local_dgram_client_test \ - local_stream_client_test \ - local_pipe_client_test \ - remote_stream_client_test \ - remote_thr_stream_client_test \ - remote_dgram_client_test \ - local_fifo_client_test \ - broadcast_client_test \ - local_spipe_client_test \ - remote_service_directory_test - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -INSTALL = - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/local_dgram_client_test.o .shobj/local_dgram_client_test.so: local_dgram_client_test.cpp \ - $(WRAPPER_ROOT)/ace/LSOCK_CODgram.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_CODgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/SOCK_CODgram.i \ - $(WRAPPER_ROOT)/ace/LSOCK_CODgram.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Dgram.i \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/local_stream_client_test.o .shobj/local_stream_client_test.so: local_stream_client_test.cpp \ - $(WRAPPER_ROOT)/ace/LSOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/local_pipe_client_test.o .shobj/local_pipe_client_test.so: local_pipe_client_test.cpp \ - $(WRAPPER_ROOT)/ace/LSOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/remote_stream_client_test.o .shobj/remote_stream_client_test.so: remote_stream_client_test.cpp \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/SOCK_CODgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_CODgram.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/remote_thr_stream_client_test.o .shobj/remote_thr_stream_client_test.so: remote_thr_stream_client_test.cpp \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/TLI_Connector.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Connector.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/remote_dgram_client_test.o .shobj/remote_dgram_client_test.so: remote_dgram_client_test.cpp \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/local_fifo_client_test.o .shobj/local_fifo_client_test.so: local_fifo_client_test.cpp \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/FIFO_Send_Msg.h \ - $(WRAPPER_ROOT)/ace/FIFO_Send.h \ - $(WRAPPER_ROOT)/ace/FIFO.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/FIFO_Send.i \ - $(WRAPPER_ROOT)/ace/FIFO_Send_Msg.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/broadcast_client_test.o .shobj/broadcast_client_test.so: broadcast_client_test.cpp \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram_Bcast.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram_Bcast.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/local_spipe_client_test.o .shobj/local_spipe_client_test.so: local_spipe_client_test.cpp \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Connector.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/remote_service_directory_test.o .shobj/remote_service_directory_test.so: remote_service_directory_test.cpp \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/SOCK_Connector.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp deleted file mode 100644 index 3fc4cde16f0..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/broadcast_client_test.cpp +++ /dev/null @@ -1,56 +0,0 @@ -/* Tests out the broadcast service of the -// $Id$ - - Internet domain IPC-SAP dgram abstraction. */ - -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram_Bcast.h" - -#include "ace/Get_Opt.h" - -/* Name of the program. */ -static char *program_name; - -/* Port number to use. */ -static unsigned short broadcast_port_number = ACE_DEFAULT_BROADCAST_PORT; - -static void -print_usage_and_die (void) -{ - ACE_OS::fprintf (stderr, "usage: %s [-p broadcast portnum]\n", - program_name); - ACE_OS::exit (1); -} - -void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "p:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'p': - broadcast_port_number = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -int -main (int argc, char *argv[]) -{ - program_name = argv[0]; - parse_args (argc, argv); - - ACE_SOCK_Dgram_Bcast sd (ACE_Addr::sap_any); - - static char buf[] = "testing socket broadcast service"; - - if (sd.send (buf, strlen (buf), broadcast_port_number) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "can't send broadcast"), -1); - - return 0; -} diff --git a/examples/Service_Configurator/IPC-tests/client/local_data b/examples/Service_Configurator/IPC-tests/client/local_data deleted file mode 100644 index 1faba1b8091..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/local_data +++ /dev/null @@ -1,22 +0,0 @@ -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal -locallocallocallocallocallocallocallocal diff --git a/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp deleted file mode 100644 index fff3de3f808..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/local_dgram_client_test.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/* Tests out the UNIX domain IPC-SAP abstraction. */ -// $Id$ - - -#include "ace/LSOCK_CODgram.h" -#include "ace/LSOCK_Dgram.h" -#include "ace/UNIX_Addr.h" - -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_MSG) && !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) -/* Name of the program. */ -static char *program_name; - -/* Number of seconds to sleep. */ -static int seconds = 3; - -/* Name of rendezvous point. */ -static char *rendezvous_codgram = "/tmp/foo_codgram"; -static char *rendezvous_dgram = "/tmp/foo_dgram"; - -/* Name of file to send. */ -static char *file_name = "local_data"; - -static void print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %s [-r rendezvous_dgram] [-c rendezvous_codgram] [-f file] [-n seconds]\n%a", - program_name, -1)); -} - -void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "c:f:n:r:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'f': - file_name = get_opt.optarg; - break; - case 'n': - seconds = atoi (get_opt.optarg); - break; - case 'r': - rendezvous_dgram = get_opt.optarg; - break; - case 'c': - rendezvous_codgram = get_opt.optarg; - break; - default: - print_usage_and_die (); - break; - } -} - -int -main (int argc, char *argv[]) -{ - program_name = argv[0]; - - parse_args (argc, argv); - - ACE_LSOCK_Dgram sd (ACE_Addr::sap_any); - ACE_LSOCK_CODgram sc; - int fd; - - if (sc.open (ACE_UNIX_Addr (rendezvous_codgram), ACE_Addr::sap_any) < 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - if ((fd = ACE_OS::open (file_name, O_RDONLY)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - /* Send the open file descriptor to the server! */ - - if (sc.send_handle (fd) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1); - - char *name = ACE_OS::cuserid (0); - - if (sd.send (name, strlen (name) + 1, ACE_UNIX_Addr (rendezvous_dgram)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1); - - if (ACE_OS::close (fd) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), -1); -} -#endif /* ACE_HAS_MSG */ diff --git a/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp deleted file mode 100644 index 577c140163e..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/local_fifo_client_test.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* Send a file through ACE_FIFO communication channel by -// $Id$ - - break it (the file) into pieces. */ - -#include "ace/Mem_Map.h" -#include "ace/FIFO_Send_Msg.h" - -#include "ace/Get_Opt.h" - -static const BUF_LEN = 256; - -// Name of the program. -static char *program_name; - -// debug state on or off -static int debug = 0; - -char *rendezvous_fifo = "/tmp/foo_fifo"; - -/* Name of file to send. */ -static char *file_name = "./local_data"; - -static void -print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %s [-d] [-f rendezvous_fifo]\n%a", - program_name, -1)); -} - -static void -parse_arguments (int argc, char *argv[]) -{ - int tracing = 1; - program_name = argv[0]; - - ACE_Get_Opt get_opt (argc, argv, "df:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'd': - debug = 1; - break; - case 'f': - rendezvous_fifo = get_opt.optarg; - break; - default: - print_usage_and_die (); - break; - } - - if (debug) - ACE_DEBUG ((LM_DEBUG, - "rendezvous_fifo = %s\n" - "trace = %s\n", - rendezvous_fifo, tracing ? "on" : "off")); -} - -int -main(int argc, char *argv[]) -{ - parse_arguments (argc, argv); - - ACE_FIFO_Send_Msg fifo; - - if (fifo.open ((const char *) rendezvous_fifo, O_WRONLY, 0666) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "Cannot open %s for requesting a new communication channel" - "in local_fifo_client_test\n", rendezvous_fifo), -1); - - - void *cp; - ACE_Mem_Map mmap (file_name); - - if (mmap (cp) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "mmap"), -1); - - /* Next, send the file's contents. */ - - ACE_Str_Buf msg (cp, int (mmap.size ())); - - if (fifo.send (msg) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1); - return 0; -} diff --git a/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp deleted file mode 100644 index fcc4c474bda..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/local_pipe_client_test.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// Another test of UNIX domain IPC-SAP abstraction. This one opens 2 -// $Id$ - -// pipes and then ships certain ends over to the server to act as a -// filter! - -#include "ace/LSOCK_Connector.h" -#include "ace/UNIX_Addr.h" - -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_MSG) && !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) -/* Name of the program. */ -static char *program_name; - -/* Name of rendezvous point. */ -static char *rendezvous = "/tmp/foo_pipe"; - -/* Name of file to send. */ -static char *file_name = "local_data"; - -static void -print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %s [-r rendezvous] [-f file]\n%a", - program_name, -1)); -} - -void -parse_args (int argc, char *argv[]) -{ - program_name = argv[0]; - - ACE_Get_Opt get_opt (argc, argv, "f:r:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'f': - file_name = get_opt.optarg; - break; - case 'r': - rendezvous = get_opt.optarg; - break; - default: - print_usage_and_die (); - break; - } -} - -int -do_client_processing (ACE_LSOCK_Stream &sc) -{ - int fd_read[2]; - int fd_write[2]; - char buf[BUFSIZ]; - int n; - int fd1; - - if (ACE_OS::pipe (fd_read) == -1 || ACE_OS::pipe (fd_write) == -1) - return -1; - - if (sc.send_handle (fd_write[0]) == -1 || sc.send_handle (fd_read[1]) == -1) - return -1; - - /* Close off the ends we aren't interested in. */ - - if (ACE_OS::close (fd_read[1]) || ACE_OS::close (fd_write[0]) == -1) - return -1; - - /* Do a silly dup just for fun... */ - - if ((fd1 = ACE_OS::open (file_name, O_RDONLY)) == -1) - return -1; - - while ((n = ACE_OS::read (fd1, buf, sizeof buf)) > 0) - { - if (ACE_OS::write (fd_write[1], buf, n) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "write"), -1); - if ((n = ACE_OS::read (fd_read[0], buf, sizeof buf)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "read"), -1); - if (ACE_OS::write (ACE_STDOUT, buf, n) == -1) - return -1; - } - - if (ACE_OS::close (fd_read[0]) == -1 - || ACE_OS::close (fd_write[1]) == -1 - || ACE_OS::close (fd1) == -1) - ACE_OS::exit (1); - - return 0; -} - -int -main (int argc, char *argv[]) -{ - parse_args (argc, argv); - - ACE_LSOCK_Stream sc; - ACE_LSOCK_Connector con; - - if (con.connect (sc, ACE_UNIX_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), -1); - - if (do_client_processing (sc) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "do_client_processing"), -1); - -#if defined (SunOS4) - ACE_OS::sleep (1); -#endif /* SunOS4 */ - - if (sc.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), -1); -} -#endif /* ACE_HAS_MSG */ diff --git a/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp deleted file mode 100644 index 268e10513db..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/local_spipe_client_test.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/* Send a file through ACE_SPIPE communication channel by -// $Id$ - - break it (the file) into pieces. */ - -#include "ace/Mem_Map.h" -#include "ace/SPIPE_Connector.h" - -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -static char *program_name; - -// debug state on or off -static int debug = 0; - -char *rendezvous_spipe = "/tmp/foo_spipe"; - -/* Name of file to send. */ -static char *file_name = "./local_data"; - -static void -print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %s [-d] [-r rendezvous_spipe]\n%a", - program_name, -1)); -} - -static void -parse_arguments (int argc, char *argv[]) -{ - program_name = argv[0]; - ACE_Get_Opt get_opt (argc, argv, "dr:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'd': - debug = 1; - break; - case 'r': - rendezvous_spipe = get_opt.optarg; - break; - default: - print_usage_and_die (); - break; - } - if (debug) - ACE_DEBUG ((LM_DEBUG, "rendezvous_spipe = %s\n", - rendezvous_spipe)); -} - -int -main(int argc, char *argv[]) -{ - parse_arguments (argc, argv); - - ACE_SPIPE_Stream spipe; - ACE_SPIPE_Connector con; - - if (con.connect (spipe, ACE_SPIPE_Addr (rendezvous_spipe)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "Cannot open %s for requesting a new communication channel" - " in local_spipe_client_test.\n", rendezvous_spipe), -1); - - ACE_Mem_Map mmap (file_name); - void *cp; - - if (mmap (cp) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "mmap"), -1); - - /* Next, send the file's contents. */ - - ACE_Str_Buf msg (cp, int (mmap.size ())); - - if (spipe.send ((ACE_Str_Buf *) 0, &msg) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1); - return 0; -} -#else -#include <stdio.h> -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "This feature is not supported\n"), -1); -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp deleted file mode 100644 index 6d01a999534..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/local_stream_client_test.cpp +++ /dev/null @@ -1,85 +0,0 @@ -/* Tests out the UNIX domain IPC-SAP abstraction. */ -// $Id$ - -#include "ace/LSOCK_Connector.h" -#include "ace/UNIX_Addr.h" - -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_MSG) && !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) -/* Name of the program. */ -static char *program_name; - -/* Name of rendezvous point. */ -static char *rendezvous = "/tmp/foo_stream"; - -/* Name of file to send. */ -static char *file_name = "local_data"; - -static void -print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %s [-r rendezvous] [-f file]%a\n", - program_name, -1)); -} - -void -parse_args (int argc, char *argv[]) -{ - program_name = argv[0]; - ACE_Get_Opt get_opt (argc, argv, "f:r:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'f': - file_name = get_opt.optarg; - break; - case 'r': - rendezvous = get_opt.optarg; - break; - default: - print_usage_and_die (); - break; - } -} - -int -main (int argc, char *argv[]) -{ - parse_args (argc, argv); - - int fd; - char buf[BUFSIZ]; - int n; - - ACE_LSOCK_Stream sc; - ACE_LSOCK_Connector con; - - if (con.connect (sc, ACE_UNIX_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), -1); - - if ((fd = ACE_OS::open (file_name, O_RDONLY)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - /* Send the open file descriptor to the server! */ - - if (sc.send_handle (fd) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send_handle"), -1); - - if ((n = sc.recv_n (buf, sizeof buf)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "recv"), -1); - else - ACE_OS::write (ACE_STDOUT, buf, n); - - if (ACE_OS::close (fd) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} -#else -int main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), -1); -} -#endif /* ACE_HAS_MSG */ diff --git a/examples/Service_Configurator/IPC-tests/client/remote_data b/examples/Service_Configurator/IPC-tests/client/remote_data deleted file mode 100644 index ae7e1fbb88e..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_data +++ /dev/null @@ -1,22 +0,0 @@ -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote -remoteremoteremoteremoteremoteremoteremoteremote diff --git a/examples/Service_Configurator/IPC-tests/client/remote_data1 b/examples/Service_Configurator/IPC-tests/client/remote_data1 deleted file mode 100644 index 6faaee46729..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_data1 +++ /dev/null @@ -1,22 +0,0 @@ -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 -remote1remote1remote1remote1remote1remote1remote1remote1 diff --git a/examples/Service_Configurator/IPC-tests/client/remote_data2 b/examples/Service_Configurator/IPC-tests/client/remote_data2 deleted file mode 100644 index ae6bf12d49f..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_data2 +++ /dev/null @@ -1,22 +0,0 @@ -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 -remote2remote2remote2remote2remote2remote2remote2remote2 diff --git a/examples/Service_Configurator/IPC-tests/client/remote_data3 b/examples/Service_Configurator/IPC-tests/client/remote_data3 deleted file mode 100644 index 7f2ec1aa81b..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_data3 +++ /dev/null @@ -1,22 +0,0 @@ -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 -remote3remote3remote3remote3remote3remote3remote3remote3 diff --git a/examples/Service_Configurator/IPC-tests/client/remote_data4 b/examples/Service_Configurator/IPC-tests/client/remote_data4 deleted file mode 100644 index 6c5a9633d56..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_data4 +++ /dev/null @@ -1,22 +0,0 @@ -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 -remote4remote4remote4remote4remote4remote4remote4remote4 diff --git a/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp deleted file mode 100644 index a193106be53..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_dgram_client_test.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/* Tests out the Internet domain IPC-SAP dgram abstraction. */ -// $Id$ - - -#include "ace/Mem_Map.h" -#include "ace/SOCK_Dgram.h" - -#include "ace/INET_Addr.h" -#include "ace/Get_Opt.h" - -/* Name of the program. */ -static char *program_name; - -/* Port number to use. */ -static unsigned short port_number = ACE_DEFAULT_SERVER_PORT; - -/* Name of remote host. */ -static char *host_name = ACE_DEFAULT_SERVER_HOST; - -/* Name of file to send. */ -static char *file_name = "./remote_data"; - -static void print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %s [-p portnum] [-h host_name] [-f file]\n%a", - program_name, -1)); -} - -void -parse_args (int argc, char *argv[]) -{ - program_name = argv[0]; - - ACE_Get_Opt get_opt (argc, argv, "f:h:p:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'f': - file_name = get_opt.optarg; - break; - case 'h': - host_name = get_opt.optarg; - break; - case 'p': - port_number = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -int -main (int argc, char *argv[]) -{ - parse_args (argc, argv); - - ACE_SOCK_Dgram sd (ACE_Addr::sap_any); - void *cp; - ACE_INET_Addr sa (port_number, host_name); - - ACE_Mem_Map mmap (file_name); - - if (mmap (cp) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "mmap"), -1); - - /* Next, send the file's contents. */ - - ssize_t cc = sd.send (cp, mmap.size (), sa); - - if (cc == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1); - else if (cc != (ssize_t) mmap.size ()) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", - "Not all the contents of mmap file are sent."), -1); - return 0; -} diff --git a/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp deleted file mode 100644 index dc99a8c0176..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_service_directory_test.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// Test program for the INET IPC-SAPs... -// $Id$ - - - -#include "ace/SOCK_Connector.h" -#include "ace/INET_Addr.h" -#include "ace/Get_Opt.h" - -// Port number to use. -static unsigned short port_number = ACE_DEFAULT_SERVICE_PORT; - -// Name of remote host. -static char *host_name = ACE_DEFAULT_SERVER_HOST; - -// Trigger a remote reconfiguration. -static int remote_reconfigure = 0; - -static void -print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %n [-p portnum] [-h host_name] [-r] [-f file]\n%a", 1)); -} - -void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "p:h:r:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'h': - host_name = get_opt.optarg; - break; - case 'p': - port_number = ACE_OS::atoi (get_opt.optarg); - break; - case 'r': - remote_reconfigure = 1; - break; - default: - print_usage_and_die (); - break; - } -} - -int -main (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - - parse_args (argc, argv); - // Default is to ask the server for ``help.'' - static char buf[BUFSIZ] = "help"; - int n; - ACE_SOCK_Stream sc; - ACE_SOCK_Connector con; - - if (con.connect (sc, ACE_INET_Addr (port_number, host_name)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n%a", "connect", 1), -1); - - if (remote_reconfigure) - // Remotely instruct the server to reconfigure itself. - ACE_OS::strcpy (buf, "reconfigure"); - - // Send the command. - - if (sc.send_n (buf, ACE_OS::strlen (buf) + 1) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n%a", "send", 1), -1); - - // Next, read the response. - - while ((n = sc.recv (buf, sizeof buf)) > 0) - if (ACE_OS::write (ACE_STDOUT, buf, n) != n) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n%a", "write", 1), -1); - - if (sc.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n%a", "close", 1), -1); - - return 0; -} diff --git a/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp deleted file mode 100644 index d439ea9ae88..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_stream_client_test.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* Test program for the INET IPC-SAPs... */ -// $Id$ - - -#include "ace/Mem_Map.h" - -#include "ace/SOCK_Connector.h" -#include "ace/SOCK_CODgram.h" -#include "ace/INET_Addr.h" -#include "ace/Get_Opt.h" - -/* Name of the program. */ -static char *program_name; - -/* Port number to use. */ -static unsigned short port_number = ACE_DEFAULT_SERVER_PORT; - -/* Name of remote host. */ -static char *host_name = ACE_DEFAULT_SERVER_HOST; - -/* Name of file to send. */ -static char *file_name = "./remote_data"; - -static void -print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %s [-p portnum] [-h host_name] [-f file]\n%a", - program_name, -1)); -} - -void -parse_args (int argc, char *argv[]) -{ - program_name = argv[0]; - ACE_Get_Opt get_opt (argc, argv, "f:h:p:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'f': - file_name = get_opt.optarg; - break; - case 'h': - host_name = get_opt.optarg; - break; - case 'p': - port_number = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -int -main (int argc, char *argv[]) -{ - parse_args (argc, argv); - ACE_INET_Addr sa (port_number, host_name); - void *cp; - char buf[BUFSIZ]; - int n; - ACE_SOCK_CODgram dc; - - if (dc.open (sa, ACE_Addr::sap_any) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - /* First send the name of the file as a datagram. */ - - iovec iov[2]; - - iov[0].iov_base = "filename: "; - iov[0].iov_len = 11; - iov[1].iov_base = file_name; - iov[1].iov_len = ACE_OS::strlen (file_name); - - if (dc.send (iov, 2) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), -1); - - ACE_SOCK_Stream sc; - ACE_SOCK_Connector con; - - if (con.connect (sc, sa) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "connect"), -1); - - ACE_Mem_Map mmap (file_name); - - if (mmap (cp) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "mmap"), -1); - - /* Next, send the file's contents. */ - - if (sc.send_n (cp, mmap.size ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send_urg"), -1); - - if (sc.close_writer () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close_writer"), -1); - - if ((n = sc.recv_n (buf, sizeof buf)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "recv"), -1); - else - ACE_OS::write (ACE_STDOUT, buf, n); - - return 0; -} diff --git a/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp b/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp deleted file mode 100644 index c9abb6dc2b9..00000000000 --- a/examples/Service_Configurator/IPC-tests/client/remote_thr_stream_client_test.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* Test program for the INET ACE_TLI-SAPs... */ -// $Id$ - - -#include "ace/Mem_Map.h" -#include "ace/TLI_Connector.h" -#include "ace/INET_Addr.h" - - -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_TLI) - -/* Name of the program. */ -static char *program_name; - -/* Port number to use. */ -static unsigned short port_number = ACE_DEFAULT_THR_PORT; - -/* Name of remote host. */ -static char *host_name = ACE_DEFAULT_SERVER_HOST; - -/* Name of file to send. */ -static char *file_name = "./remote_data"; - -static void print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %s [-p portnum] [-h host_name] [-f file]\n%a", - program_name, -1)); -} - -void -parse_args (int argc, char *argv[]) -{ - program_name = argv[0]; - ACE_Get_Opt get_opt (argc, argv, "f:h:p:"); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'f': - file_name = get_opt.optarg; - break; - case 'h': - host_name = get_opt.optarg; - break; - case 'p': - port_number = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -int -main (int argc, char *argv[]) -{ - parse_args (argc, argv); - void *cp; - char buf[BUFSIZ]; - ACE_TLI_Stream sc; - ACE_TLI_Connector con; - - if (con.connect (sc, ACE_INET_Addr (port_number, host_name)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - ACE_Mem_Map mmap (file_name, PROT_READ); - - if (mmap (cp) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "mmap"), -1); - - /* Next, send the file's contents. */ - - if (sc.send_n (cp, mmap.size ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send_n"), -1); - - if (sc.sndrel () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close_writer"), -1); - - for (int n; (n = sc.recv (buf, sizeof buf)) > 0; ) - if (ACE_OS::write (ACE_STDOUT, buf, n) != n) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "write"), -1); - - if (sc.close () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1); - - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "you must have TLI to run this test\n"), 1); -} -#endif /* ACE_HAS_TLI */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.cpp deleted file mode 100644 index af490402337..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "Handle_Broadcast.h" -// $Id$ - - -#if defined (SunOS4) -extern "C" -{ - int init (void); - int fini (void); - void __sti__Handle_Broadcast_C_init_(); - void __std__Handle_Broadcast_C_init_(); -} - -int -init (void) -{ - __sti__Handle_Broadcast_C_init_(); - return 0; -} - -int -fini (void) -{ - __std__Handle_Broadcast_C_init_(); - return 0; -} -#endif /* SunOS4 */ - -unsigned short Handle_Broadcast::DEFAULT_PORT = ACE_DEFAULT_BROADCAST_PORT; - -#if !defined (__ACE_INLINE__) -#include "Handle_Broadcast.i" -#endif /* __ACE_INLINE__ */ - -Handle_Broadcast remote_broadcast; -ACE_Service_Object_Type rb (&remote_broadcast, "Remote_Brdcast"); diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.h b/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.h deleted file mode 100644 index 03dec504656..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Handles INET broadcast datagram messages from remote hosts on the local subnet. */ - -#if !defined (_HANDLE_BROADCAST_H) -#define _HANDLE_BROADCAST_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram.h" - -class Handle_Broadcast : public ACE_Service_Object, public ACE_SOCK_Dgram -{ -public: - Handle_Broadcast (void); - ~Handle_Broadcast (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - int open (const ACE_INET_Addr &r, int async = 0); - virtual int get_handle (void) const; - virtual int handle_input (int fd); - virtual int handle_close (int fd, ACE_Reactor_Mask); - - static unsigned short DEFAULT_PORT; -}; - -extern ACE_Service_Object_Type rb; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_Broadcast.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#endif /* _HANDLE_BROADCAST_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.i b/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.i deleted file mode 100644 index 306222534d7..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Broadcast.i +++ /dev/null @@ -1,110 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_Broadcast::~Handle_Broadcast (void) -{ -} - -ACE_INLINE -Handle_Broadcast::Handle_Broadcast (void) -{ -} - -ACE_INLINE int -Handle_Broadcast::open (const ACE_INET_Addr &r, int async) -{ - if (this->ACE_SOCK_Dgram::open (r) == -1) - return -1; - else if (async && ACE_SOCK_Dgram::enable (SIGIO) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_Broadcast::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_INET_Addr sa; - - if (this->get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%d/%s %s", sa.get_port_number (), "udp", "# tests broadcasting\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_Broadcast::init (int argc, char *argv[]) -{ - ACE_INET_Addr sba (Handle_Broadcast::DEFAULT_PORT); - ACE_Get_Opt get_opt (argc, argv, "p:", 0); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'p': - sba.set (ACE_OS::atoi (get_opt.optarg)); - break; - default: - break; - } - - if (this->open (sba) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_Broadcast::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE int -Handle_Broadcast::get_handle (void) const -{ - return this->ACE_SOCK_Dgram::get_handle (); -} - -ACE_INLINE int -Handle_Broadcast::handle_input (int) -{ - ACE_INET_Addr sa; - char buf[0x2000]; /* 8 k buffer */ - int n; - - if ((n = this->recv (buf, sizeof buf, sa)) == -1) - return -1; - else - ACE_DEBUG ((LM_INFO, "received broadcast datagram from host %s\n", sa.get_host_name ())); - - ACE_OS::puts ("----------------------------------------"); - ACE_OS::write (ACE_STDOUT, buf, n); - - if (buf[n - 1] != '\n') - putchar ('\n'); - - ACE_OS::puts ("----------------------------------------"); - - return 0; -} - -ACE_INLINE int -Handle_Broadcast::handle_close (int, ACE_Reactor_Mask) -{ - return this->ACE_SOCK_Dgram::close (); -} diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.cpp deleted file mode 100644 index c9224635829..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "Handle_L_CODgram.h" -// $Id$ - - -#if defined (SunOS4) -extern "C" -{ - int init (void); - int fini (void); - void __sti__Handle_L_CODgram_C_init_(); - void __std__Handle_L_CODgram_C_init_(); -} - -int -init (void) -{ - __sti__Handle_L_CODgram_C_init_(); - return 0; -} - -int -fini (void) -{ - __std__Handle_L_CODgram_C_init_(); - return 0; -} -#endif /* SunOS4 */ - -const char *Handle_L_CODgram::DEFAULT_RENDEZVOUS = "/tmp/foo_codgram"; - -#if !defined (__ACE_INLINE__) -#include "Handle_L_CODgram.i" -#endif /* __ACE_INLINE__ */ - -Handle_L_CODgram local_codgram; -ACE_Service_Object_Type lc (&local_codgram, "Local_CODgram"); diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.h deleted file mode 100644 index ce0da0d7a5b..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Handles UNIX datagram messages from local host. */ - -#if !defined (_HANDLE_L_CODGRAM_H) -#define _HANDLE_L_CODGRAM_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/LSOCK_CODgram.h" -#include "ace/UNIX_Addr.h" - -class Handle_L_CODgram : public ACE_Service_Object, public ACE_LSOCK_CODgram -{ -public: - Handle_L_CODgram (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -public: - int open (const ACE_UNIX_Addr &suad, int async = 0); - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE); - virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask); - - char rendezvous[MAXPATHLEN + 1]; - static const char *DEFAULT_RENDEZVOUS; -}; - -extern ACE_Service_Object_Type lc; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_L_CODgram.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#endif /* _HANDLE_L_CODGRAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.i deleted file mode 100644 index 7ebf45ba2f3..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_CODgram.i +++ /dev/null @@ -1,120 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_L_CODgram::Handle_L_CODgram (void) -{ -} - -ACE_INLINE int -Handle_L_CODgram::open (const ACE_UNIX_Addr &suad, int async) -{ - if (this->ACE_LSOCK_CODgram::open (ACE_Addr::sap_any, suad) == -1) - return -1; - else if (async && this->ACE_LSOCK_CODgram::enable (SIGIO) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_L_CODgram::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_UNIX_Addr sa; - - if (ACE_LSOCK_CODgram::get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s %s", sa.get_path_name (), - "# tests local connected datagram\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_L_CODgram::init (int argc, char *argv[]) -{ - ACE_UNIX_Addr sucd; - ACE_Get_Opt get_opt (argc, argv, "r:", 0); - const char *r = Handle_L_CODgram::DEFAULT_RENDEZVOUS; - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'r': - r = get_opt.optarg; - break; - default: - break; - } - - ACE_OS::strncpy (this->rendezvous, r, MAXPATHLEN); - ACE_OS::unlink (this->rendezvous); - sucd.set (this->rendezvous); - if (this->open (sucd) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_L_CODgram::fini(void) -{ - return ACE_Service_Config::reactor ()->remove_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE ACE_HANDLE -Handle_L_CODgram::get_handle (void) const -{ - return ACE_LSOCK_CODgram::get_handle (); -} - -ACE_INLINE int -Handle_L_CODgram::handle_input (ACE_HANDLE) -{ - ACE_HANDLE handle = ACE_INVALID_HANDLE; - char buf[BUFSIZ]; - - if (this->recv_handle (handle) == -1) - return -1; - else - ACE_DEBUG ((LM_INFO, "received handle (%d)\n", handle)); - - ACE_OS::puts ("----------------------------------------"); - - for (;;) - { - ssize_t n = ACE_OS::read (handle, buf, sizeof buf); - - if (n <= 0) - break; - - ACE_OS::write (ACE_STDOUT, buf, n); - } - - ACE_OS::puts ("----------------------------------------"); - - if (ACE_OS::close (handle) == -1) - return -1; - - return 0; -} - -ACE_INLINE int -Handle_L_CODgram::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - this->ACE_LSOCK_CODgram::close (); - return ACE_OS::unlink (this->rendezvous); -} diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.cpp deleted file mode 100644 index 007630279f2..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "Handle_L_Dgram.h" -// $Id$ - - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -const char *Handle_L_Dgram::DEFAULT_RENDEZVOUS = "/tmp/foo_dgram"; - -#if !defined (__ACE_INLINE__) -#include "Handle_L_Dgram.i" -#endif /* __ACE_INLINE__ */ - -Handle_L_Dgram local_dgram; -ACE_Service_Object_Type ld (&local_dgram, "Local_Dgram"); -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.h deleted file mode 100644 index bfae70269ea..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// Handles UNIX datagram messages from local host. - -#if !defined (_HANDLE_L_DGRAM_H) -#define _HANDLE_L_DGRAM_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/LSOCK_Dgram.h" -#include "ace/UNIX_Addr.h" - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -class Handle_L_Dgram : public ACE_Service_Object, public ACE_LSOCK_Dgram -{ -public: - Handle_L_Dgram (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - int open (const ACE_UNIX_Addr &suad, int async = 0); - virtual int get_handle (void) const; - virtual int handle_input (int fd); - virtual int handle_close (int fd, ACE_Reactor_Mask); - - char rendezvous[MAXPATHLEN + 1]; - static const char *DEFAULT_RENDEZVOUS; -}; - -extern ACE_Service_Object_Type ld; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_L_Dgram.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ -#endif /* _HANDLE_L_DGRAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.i deleted file mode 100644 index 8946947f4fd..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Dgram.i +++ /dev/null @@ -1,109 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_L_Dgram::Handle_L_Dgram (void) -{ -} - -ACE_INLINE int -Handle_L_Dgram::open (const ACE_UNIX_Addr &suad, int async) -{ - if (this->ACE_LSOCK_Dgram::open (suad) == -1) - return -1; - else if (async && this->ACE_LSOCK_Dgram::enable (SIGIO) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_L_Dgram::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_UNIX_Addr sa; - - if (this->ACE_LSOCK_Dgram::get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s %s", sa.get_path_name (), "# tests local datagram\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_L_Dgram::init (int argc, char *argv[]) -{ - ACE_UNIX_Addr sudg; - ACE_Get_Opt get_opt (argc, argv, "r:", 0); - const char *r = Handle_L_Dgram::DEFAULT_RENDEZVOUS; - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'r': - r = get_opt.optarg; - break; - default: - break; - } - - ACE_OS::strncpy (this->rendezvous, r, MAXPATHLEN); - ACE_OS::unlink (this->rendezvous); - sudg.set (this->rendezvous); - if (this->open (sudg) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler (this, - ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_L_Dgram::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE int -Handle_L_Dgram::get_handle (void) const -{ - return this->ACE_LSOCK_Dgram::get_handle (); -} - -ACE_INLINE int -Handle_L_Dgram::handle_input (int) -{ - ACE_UNIX_Addr sa; - char buf[8 * 1024]; /* 8 k buffer */ - int n; - - if ((n = this->recv (buf, sizeof buf, sa)) == -1) - return -1; - else - ACE_DEBUG ((LM_INFO, "received datagram from %s\n", sa.get_path_name ())); - - ACE_OS::puts ("----------------------------------------"); - ACE_OS::write (ACE_STDOUT, buf, n); - - if (buf[n - 1] != '\n') - putchar ('\n'); - - ACE_OS::puts ("----------------------------------------"); - - return 0; -} - -ACE_INLINE int -Handle_L_Dgram::handle_close (int, ACE_Reactor_Mask) -{ - this->ACE_LSOCK_Dgram::close (); - return ACE_OS::unlink (this->rendezvous); -} diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.cpp deleted file mode 100644 index 06d8c724040..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "Handle_L_FIFO.h" -// $Id$ - - -#if defined (SunOS4) -extern "C" -{ - int init (void); - int fini (void); - void __sti__Handle_L_FIFO_C_init_(); - void __std__Handle_L_FIFO_C_init_(); -} - -int -init (void) -{ - __sti__Handle_L_FIFO_C_init_(); - return 0; -} - -int -fini (void) -{ - __std__Handle_L_FIFO_C_init_(); - return 0; -} -#endif /* SunOS4 */ - -const char *Handle_L_FIFO::DEFAULT_RENDEZVOUS = "/tmp/foo_fifo"; - -#if !defined (__ACE_INLINE__) -#include "Handle_L_FIFO.i" -#endif /* __ACE_INLINE__ */ - -Handle_L_FIFO local_fifo; -ACE_Service_Object_Type lf (&local_fifo, "Local_FIFO"); diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.h deleted file mode 100644 index 03f613ebdf0..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Handle connections from local UNIX ACE_FIFO */ -/* Read from a well known ACE_FIFO and write to stdout. */ - -#if !defined (_HANDLE_L_FIFO_H) -#define _HANDLE_L_FIFO_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/FIFO_Recv_Msg.h" - -class Handle_L_FIFO : public ACE_Service_Object, public ACE_FIFO_Recv_Msg -{ -public: - Handle_L_FIFO (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - int open (const char *rendezvous_fifo); - virtual int get_handle (void) const; - virtual int handle_input (int fd); - virtual int handle_close (int fd, ACE_Reactor_Mask); - - static const char *DEFAULT_RENDEZVOUS; -}; - -extern ACE_Service_Object_Type lf; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_L_FIFO.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#endif /* _HANDLE_L_FIFO_H */ - - diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.i deleted file mode 100644 index 8b667cb6681..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_FIFO.i +++ /dev/null @@ -1,94 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_L_FIFO::Handle_L_FIFO (void) -{ -} - -ACE_INLINE int -Handle_L_FIFO::open (const char *rendezvous_fifo) -{ - if (this->ACE_FIFO_Recv_Msg::open (rendezvous_fifo) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_L_FIFO::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - const char *rendezvous_fifo; - - this->get_local_addr (rendezvous_fifo); - - ACE_OS::sprintf (buf, "%s %s", rendezvous_fifo, "# tests local ACE_FIFO\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_L_FIFO::init (int argc, char *argv[]) -{ - const char *rendezvous_fifo = Handle_L_FIFO::DEFAULT_RENDEZVOUS; - ACE_Get_Opt get_opt (argc, argv, "r:", 0); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'r': - rendezvous_fifo = get_opt.optarg; - break; - default: - break; - } - - ACE_OS::unlink (rendezvous_fifo); - if (this->open (rendezvous_fifo) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler (this, - ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_L_FIFO::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE int -Handle_L_FIFO::get_handle (void) const -{ - return this->ACE_FIFO::get_handle (); -} - -ACE_INLINE int -Handle_L_FIFO::handle_input (int) -{ - char buf[PIPE_BUF]; - ACE_Str_Buf msg (buf, 0, sizeof buf); - - /* Accept communication requests */ - if (this->recv (msg) == -1) - return -1; - else - - ACE_OS::write (ACE_STDOUT, (const char *) msg.buf, (int) msg.len); - return 0; -} - -ACE_INLINE int -Handle_L_FIFO::handle_close (int, ACE_Reactor_Mask) -{ - return this->ACE_FIFO::remove (); -} diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp deleted file mode 100644 index c216e03cecb..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "Handle_L_Pipe.h" -// $Id$ - - -#if defined (SunOS4) -extern "C" -{ - int init (void); - int fini (void); - void __sti__Handle_L_Pipe_C_recv_n_(); - void __std__Handle_L_Pipe_C_recv_n_(); -} - -int -init (void) -{ - __sti__Handle_L_Pipe_C_recv_n_(); - return 0; -} - -int -fini (void) -{ - __std__Handle_L_Pipe_C_recv_n_(); - return 0; -} -#endif /* SunOS4 */ - -const char *Handle_L_Pipe::DEFAULT_RENDEZVOUS = "/tmp/foo_pipe"; - -#if !defined (__ACE_INLINE__) -#include "Handle_L_Pipe.i" -#endif /* __ACE_INLINE__ */ - -Handle_L_Pipe local_pipe; -ACE_Service_Object_Type lp (&local_pipe, "Local_Pipe"); diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.h deleted file mode 100644 index 0d4f26d6d2b..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Handle connections from local UNIX domain sockets that are sending - end-points from a pipe! */ - -#if !defined (_HANDLE_L_PIPE_H) -#define _HANDLE_L_PIPE_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/UNIX_Addr.h" -#include "ace/LSOCK_Acceptor.h" - -class Handle_L_Pipe : public ACE_Service_Object, public ACE_LSOCK_Acceptor -{ -public: - Handle_L_Pipe (void); - ~Handle_L_Pipe (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - int open (const ACE_UNIX_Addr &suap, int async = 0); - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE fd); - virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask); - - char rendezvous[MAXPATHLEN + 1]; - static const char *DEFAULT_RENDEZVOUS; -}; - -extern ACE_Service_Object_Type lp; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_L_Pipe.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#endif /* _HANDLE_L_PIPE_H */ - diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.i deleted file mode 100644 index 048f66cbcff..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Pipe.i +++ /dev/null @@ -1,135 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_L_Pipe::~Handle_L_Pipe (void) -{ -} - -/* Uppercase N bytes of S. */ - -static char * -upper_case (char s[], int n) -{ - while (--n >= 0) - if (islower (s[n])) - s[n] = toupper (s[n]); - - return s; -} - -ACE_INLINE -Handle_L_Pipe::Handle_L_Pipe (void) -{ -} - -ACE_INLINE int -Handle_L_Pipe::open (const ACE_UNIX_Addr &suap, int async) -{ - if (this->ACE_LSOCK_Acceptor::open (suap) == -1) - return -1; - else if (async && this->ACE_LSOCK_Acceptor::enable (SIGIO) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_L_Pipe::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_UNIX_Addr sa; - - if (ACE_LSOCK_Acceptor::get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s %s", sa.get_path_name (), "# tests local pipe\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_L_Pipe::init (int argc, char *argv[]) -{ - ACE_UNIX_Addr sup; - const char *r = Handle_L_Pipe::DEFAULT_RENDEZVOUS; - ACE_Get_Opt get_opt (argc, argv, "r:", 0); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'r': - r = get_opt.optarg; - break; - default: - break; - } - - ACE_OS::strncpy (this->rendezvous, r, MAXPATHLEN); - ACE_OS::unlink (this->rendezvous); - sup.set (this->rendezvous); - if (this->open (sup) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_L_Pipe::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE int -Handle_L_Pipe::get_handle (void) const -{ - return ACE_LSOCK_Acceptor::get_handle (); -} - -ACE_INLINE int -Handle_L_Pipe::handle_input (ACE_HANDLE) -{ - ACE_LSOCK_Stream new_local_stream; - int n; - ACE_HANDLE fd1 = ACE_INVALID_HANDLE; - ACE_HANDLE fd2 = ACE_INVALID_HANDLE; - char buf[BUFSIZ]; - - if (this->accept (new_local_stream) == -1) - return -1; - - if (new_local_stream.recv_handle (fd1) == -1 - || new_local_stream.recv_handle (fd2) == -1) - return -1; - else - ACE_DEBUG ((LM_INFO, "received file descriptors %d and %d\n", fd1, fd2)); - - if ((n = ACE_OS::read (fd1, buf, sizeof buf)) == -1) - return -1; - else if (ACE_OS::write (fd2, upper_case (buf, n), n) == -1) - return -1; - if (ACE_OS::close (fd1) == -1 - || ACE_OS::close (fd2) == -1) - return -1; - if (new_local_stream.close () == -1) - return -1; - - return 0; -} - -ACE_INLINE int -Handle_L_Pipe::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - this->ACE_LSOCK_Acceptor::close (); - return ACE_OS::unlink (this->rendezvous); -} diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.cpp deleted file mode 100644 index d2ccc95b439..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "Handle_L_SPIPE.h" -// $Id$ - - -#if !defined (__ACE_INLINE__) -#include "Handle_L_SPIPE.i" -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_HAS_STREAM_PIPES) - -const char *Handle_L_SPIPE::DEFAULT_RENDEZVOUS = "/tmp/foo_spipe"; - -Handle_L_SPIPE local_spipe; -ACE_Service_Object_Type lsp (&local_spipe, "Local_SPIPE"); - -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h deleted file mode 100644 index e81353600ea..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Handle connections from local UNIX ACE_SPIPE */ -/* Read from a well known ACE_SPIPE and write to stdout. */ - -#if !defined (_HANDLE_L_SPIPE_H) -#define _HANDLE_L_SPIPE_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/SPIPE_Acceptor.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -class Handle_L_SPIPE : public ACE_Service_Object, public ACE_SPIPE_Acceptor -{ -public: - Handle_L_SPIPE (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - int open (const ACE_SPIPE_Addr &rendezvous_spipe); - virtual int get_handle (void) const; - virtual int handle_input (int fd); - virtual int handle_close (int fd, ACE_Reactor_Mask); - - static const char *DEFAULT_RENDEZVOUS; -}; - -extern ACE_Service_Object_Type lsp; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_L_SPIPE.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#endif /* _HANDLE_L_SPIPE_H */ - - -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i deleted file mode 100644 index e129c26521c..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_SPIPE.i +++ /dev/null @@ -1,119 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -#include "ace/SPIPE_Stream.h" -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -ACE_INLINE -Handle_L_SPIPE::Handle_L_SPIPE (void) -{ -} - -ACE_INLINE int -Handle_L_SPIPE::open (const ACE_SPIPE_Addr &rendezvous_spipe) -{ - if (this->ACE_SPIPE_Acceptor::open (rendezvous_spipe) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_L_SPIPE::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_SPIPE_Addr sa; - - if (ACE_SPIPE_Acceptor::get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s %s", sa.get_path_name (), "# tests local STREAM pipe\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_L_SPIPE::init (int argc, char *argv[]) -{ - ACE_SPIPE_Addr susp; - const char *rendezvous = Handle_L_SPIPE::DEFAULT_RENDEZVOUS; - ACE_Get_Opt get_opt (argc, argv, "r:", 0); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'r': - rendezvous = get_opt.optarg; - break; - default: - break; - } - - ACE_OS::unlink (rendezvous); - susp.set (rendezvous); - if (this->open (susp) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_L_SPIPE::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE int -Handle_L_SPIPE::get_handle (void) const -{ - return ACE_SPIPE::get_handle(); -} - -ACE_INLINE int -Handle_L_SPIPE::handle_input (int) -{ - ACE_SPIPE_Stream new_spipe; - char buf[PIPE_BUF]; - ACE_Str_Buf msg (buf, 0, sizeof buf); - int flags = 0; - - /* Accept communication requests */ - if (this->ACE_SPIPE_Acceptor::accept (new_spipe) == -1) - return -1; - else - { - ACE_SPIPE_Addr sa; - - new_spipe.get_remote_addr (sa); - - ACE_DEBUG ((LM_INFO, "accepted request from %s (gid = %d, uid = %d)\n", - sa.get_path_name (), sa.group_id (), sa.user_id ())); - } - - while (new_spipe.recv ((ACE_Str_Buf *) 0, &msg, &flags) >= 0) - if (msg.len != 0) - ACE_OS::write (ACE_STDOUT, (const char *) msg.buf, (int) msg.len); - else - break; - - if (new_spipe.close () == -1) - return -1; - return 0; -} - -ACE_INLINE int -Handle_L_SPIPE::handle_close (int, ACE_Reactor_Mask) -{ - return this->ACE_SPIPE_Acceptor::remove (); -} -#endif /* ACE_HAS_STREAM_PIPES */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.cpp deleted file mode 100644 index d7f84013629..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) -// $Id$ - -#include "Handle_L_Stream.h" - -/* Static variables. */ - -const char *Handle_L_Stream::DEFAULT_RENDEZVOUS = "/tmp/foo_stream"; -char *Handle_L_Stream::login_name = 0; - -#if !defined (__ACE_INLINE__) -#include "Handle_L_Stream.i" -#endif /* __ACE_INLINE__ */ - -Handle_L_Stream local_stream; -ACE_Service_Object_Type ls (&local_stream, "Local_Stream"); -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.h b/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.h deleted file mode 100644 index 5b64fa2d8a2..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -/* Handle connections from local UNIX domain sockets. */ - -#if !defined (_HANDLE_L_STREAM_H) -#define _HANDLE_L_STREAM_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/UNIX_Addr.h" -#include "ace/LSOCK_Acceptor.h" - -#if !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS) - -class Handle_L_Stream : public ACE_Service_Object, public ACE_LSOCK_Acceptor -{ -public: - Handle_L_Stream (void); - ~Handle_L_Stream (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - int open (const ACE_UNIX_Addr &suas, int async = 0); - virtual ACE_HANDLE get_handle (void) const; - virtual int handle_input (ACE_HANDLE fd); - virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask); - - char rendezvous[MAXPATHLEN + 1]; - static char *login_name; - static const char *DEFAULT_RENDEZVOUS; -}; - -extern ACE_Service_Object_Type ls; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_L_Stream.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ -#endif /* ACE_LACKS_UNIX_DOMAIN_SOCKETS */ -#endif /* _HANDLE_L_STREAM_H */ - - diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.i b/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.i deleted file mode 100644 index 3fd2c09e2a7..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_L_Stream.i +++ /dev/null @@ -1,146 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_L_Stream::~Handle_L_Stream (void) -{ -} - -ACE_INLINE -Handle_L_Stream::Handle_L_Stream (void) -{ - if (Handle_L_Stream::login_name == 0) - Handle_L_Stream::login_name = ACE_OS::cuserid (0); -} - -ACE_INLINE int -Handle_L_Stream::open (const ACE_UNIX_Addr &suas, - int async) -{ - if (this->ACE_LSOCK_Acceptor::open (suas) == -1) - return -1; - else if (async && this->ACE_LSOCK_Acceptor::enable (SIGIO) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_L_Stream::info (char **strp, - size_t length) const -{ - char buf[BUFSIZ]; - ACE_UNIX_Addr sa; - - if (this->get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%s %s", sa.get_path_name (), - "# tests local ACE_Stream\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_L_Stream::init (int argc, char *argv[]) -{ - ACE_UNIX_Addr sus; - const char *r = Handle_L_Stream::DEFAULT_RENDEZVOUS; - ACE_Get_Opt get_opt (argc, argv, "r:", 0); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'r': - r = get_opt.optarg; - break; - default: - break; - } - - ACE_OS::strncpy (this->rendezvous, r, MAXPATHLEN); - ACE_OS::unlink (this->rendezvous); - sus.set (this->rendezvous); - - if (this->open (sus) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, - "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_L_Stream::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE ACE_HANDLE -Handle_L_Stream::get_handle (void) const -{ - return ACE_LSOCK_Acceptor::get_handle (); -} - -ACE_INLINE int -Handle_L_Stream::handle_input (ACE_HANDLE) -{ - ACE_LSOCK_Stream new_local_stream; - ACE_UNIX_Addr sa; - ACE_HANDLE handle = ACE_INVALID_HANDLE; - char buf[BUFSIZ]; - - if (this->accept (new_local_stream, &sa) == -1) - return -1; - else if (new_local_stream.recv_handle (handle) == -1) - return -1; - else - ACE_DEBUG ((LM_INFO, - "received file descriptor %d on ACE_Stream %s\n", - handle, sa.get_path_name ())); - - ACE_OS::puts ("----------------------------------------"); - - for (;;) - { - ssize_t n = ACE_OS::read (handle, buf, sizeof buf); - - if (n <= 0) - break; - - ACE_OS::write (ACE_STDOUT, buf, n); - } - - ACE_OS::puts ("----------------------------------------"); - - time_t t = ACE_OS::time (0L); - char *cs = ACE_OS::ctime (&t); - - if (new_local_stream.send (4, - Handle_L_Stream::login_name, - ACE_OS::strlen (Handle_L_Stream::login_name), - cs, - ACE_OS::strlen (cs)) == -1) - return -1; - else if (ACE_OS::close (handle) == -1) - return -1; - else if (new_local_stream.close () == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_L_Stream::handle_close (ACE_HANDLE, ACE_Reactor_Mask) -{ - this->ACE_LSOCK_Acceptor::close (); - return ACE_OS::unlink (this->rendezvous); -} diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.cpp deleted file mode 100644 index a2f8db96fb5..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "Handle_R_Dgram.h" -// $Id$ - - -#if defined (SunOS4) -extern "C" -{ - int init (void); - int fini (void); - void __sti__Handle_R_Dgram_C_init_(); - void __std__Handle_R_Dgram_C_init_(); -} - -int -init (void) -{ - __sti__Handle_R_Dgram_C_init_(); - return 0; -} - -int -fini (void) -{ - __std__Handle_R_Dgram_C_init_(); - return 0; -} -#endif /* SunOS4 */ - -unsigned short Handle_R_Dgram::DEFAULT_PORT = ACE_DEFAULT_SERVER_PORT; - -#if !defined (__ACE_INLINE__) -#include "Handle_R_Dgram.i" -#endif /* __ACE_INLINE__ */ - -Handle_R_Dgram remote_dgram; -ACE_Service_Object_Type rd (&remote_dgram, "Remote_Dgram"); diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.h b/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.h deleted file mode 100644 index ca446200f48..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Handles INET datagram messages from remote hosts. */ - -#if !defined (_HANDLE_R_DGRAM_H) -#define _HANDLE_R_DGRAM_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/INET_Addr.h" -#include "ace/SOCK_Dgram.h" - -class Handle_R_Dgram : public ACE_Service_Object, public ACE_SOCK_Dgram -{ -public: - Handle_R_Dgram (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - int open (const ACE_INET_Addr &r, int async = 0); - virtual int get_handle (void) const; - virtual int handle_input (int fd); - virtual int handle_close (int fd, ACE_Reactor_Mask); - - static unsigned short DEFAULT_PORT; -}; - -extern ACE_Service_Object_Type rd; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_R_Dgram.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#endif /* _HANDLE_R_DGRAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.i b/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.i deleted file mode 100644 index aaf11ceacb0..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Dgram.i +++ /dev/null @@ -1,106 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_R_Dgram::Handle_R_Dgram (void) -{ -} - -ACE_INLINE int -Handle_R_Dgram::open (const ACE_INET_Addr &r, int async) -{ - if (this->ACE_SOCK_Dgram::open (r) == -1) - return -1; - else if (async && this->ACE_SOCK_Dgram::enable (SIGIO) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_R_Dgram::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_INET_Addr sa; - - if (this->get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%d/%s %s", sa.get_port_number (), "udp", "# tests remote dgram\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_R_Dgram::init (int argc, char *argv[]) -{ - ACE_INET_Addr sidg (Handle_R_Dgram::DEFAULT_PORT); - ACE_Get_Opt get_opt (argc, argv, "p:", 0); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'p': - sidg.set (ACE_OS::atoi (get_opt.optarg)); - break; - default: - break; - } - - if (this->open (sidg) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_R_Dgram::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE int -Handle_R_Dgram::get_handle (void) const -{ - return ACE_SOCK_Dgram::get_handle (); -} - -ACE_INLINE int -Handle_R_Dgram::handle_input (int) -{ - ACE_INET_Addr sa; - char buf[0x2000]; /* 8 k buffer */ - int n; - - if ((n = this->recv (buf, sizeof buf, sa)) == -1) - return -1; - else - ACE_DEBUG ((LM_INFO, "received datagram from host %s on port %d\n", - sa.get_host_name (), sa.get_port_number ())); - - ACE_OS::puts ("----------------------------------------"); - ACE_OS::write (ACE_STDOUT, buf, n); - - if (buf[n - 1] != '\n') - putchar ('\n'); - - ACE_OS::puts ("----------------------------------------"); - - return 0; -} - -ACE_INLINE int -Handle_R_Dgram::handle_close (int, ACE_Reactor_Mask) -{ - return this->ACE_SOCK_Dgram::close (); -} diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp deleted file mode 100644 index 294386ec53d..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "Handle_R_Stream.h" -// $Id$ - - -#if defined (SunOS4) -extern "C" -{ - int init (void); - int fini (void); - void __sti__Handle_R_Stream_C_recv_n_(); - void __std__Handle_R_Stream_C_recv_n_(); -} - -int -init (void) -{ - __sti__Handle_R_Stream_C_recv_n_(); - return 0; -} - -int -fini (void) -{ - __std__Handle_R_Stream_C_recv_n_(); - return 0; -} -#endif /* SunOS4 */ - -/* Static variables. */ - -unsigned short Handle_R_Stream::DEFAULT_PORT = ACE_DEFAULT_SERVER_PORT; -char *Handle_R_Stream::login_name = 0; - -#if !defined (__ACE_INLINE__) -#include "Handle_R_Stream.i" -#endif /* __ACE_INLINE__ */ - -Handle_R_Stream remote_stream; -ACE_Service_Object_Type rs (&remote_stream, "Remote_Stream"); diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h deleted file mode 100644 index 79ae975d786..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Handle connections from remote INET connections. */ - -#if !defined (_HANDLE_R_STREAM_H) -#define _HANDLE_R_STREAM_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" -#include "ace/SOCK_Stream.h" -#include "ace/SOCK_Acceptor.h" -#include "ace/INET_Addr.h" - -class Handle_R_Stream : public ACE_Service_Object, public ACE_SOCK_Acceptor -{ -public: - Handle_R_Stream (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - int open (const ACE_INET_Addr &sia, int async = 0); - virtual int get_handle (void) const; - virtual int handle_input (int fd); - virtual int handle_close (int fd, ACE_Reactor_Mask); - - ACE_SOCK_Stream new_remote_stream; - static u_short DEFAULT_PORT; - static char *login_name; -}; - -extern ACE_Service_Object_Type rs; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_R_Stream.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#endif /* _HANDLE_R_STREAM_H */ - - - diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i b/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i deleted file mode 100644 index aa17b7ca160..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_R_Stream.i +++ /dev/null @@ -1,125 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_R_Stream::Handle_R_Stream (void) -{ - if (Handle_R_Stream::login_name == 0) - Handle_R_Stream::login_name = ACE_OS::cuserid (0); -} - -ACE_INLINE int -Handle_R_Stream::open (const ACE_INET_Addr &sia, int async) -{ - if (this->ACE_SOCK_Acceptor::open (sia) == -1) - return -1; - else if (async && this->ACE_SOCK_Acceptor::enable (SIGIO) == -1) - return -1; - else - return 0; -} - -ACE_INLINE int -Handle_R_Stream::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - ACE_INET_Addr sa; - - if (this->get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%d/%s %s", sa.get_port_number (), "tcp", "# tests remote stream\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_R_Stream::init (int argc, char *argv[]) -{ - ACE_INET_Addr sis (Handle_R_Stream::DEFAULT_PORT); - ACE_Get_Opt get_opt (argc, argv, "p:", 0); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'p': - sis.set (ACE_OS::atoi (get_opt.optarg)); - break; - default: - break; - } - - if (this->open (sis) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else if (ACE_Service_Config::reactor ()->register_handler - (this, ACE_Event_Handler::ACCEPT_MASK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "registering service with ACE_Reactor\n"), -1); - return 0; -} - -ACE_INLINE int -Handle_R_Stream::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -ACE_INLINE int -Handle_R_Stream::get_handle (void) const -{ - return ACE_SOCK_Acceptor::get_handle (); -} - -ACE_INLINE int -Handle_R_Stream::handle_input (int) -{ - char buf[BUFSIZ]; - int bytes; - - if (this->accept (this->new_remote_stream) == -1) - return -1; - else - ACE_DEBUG ((LM_INFO, "new_remote_stream fd = %d\n", - this->new_remote_stream.get_handle ())); - - ACE_INET_Addr sa; - - if (this->new_remote_stream.get_remote_addr (sa) == -1) - return -1; - - ACE_DEBUG ((LM_INFO, "accepted from host %s at port %d\n", - sa.get_host_name (), sa.get_port_number ())); - - ACE_OS::puts ("----------------------------------------"); - - while ((bytes = this->new_remote_stream.recv (buf, sizeof buf)) > 0) - ACE_OS::write (ACE_STDOUT, buf, bytes); - - ACE_OS::puts ("----------------------------------------"); - - time_t t = ACE_OS::time (0L); - char *cs = ACE_OS::ctime (&t); - - if (this->new_remote_stream.send (4, - Handle_R_Stream::login_name, ACE_OS::strlen (Handle_R_Stream::login_name), - cs, ACE_OS::strlen (cs)) == -1) - return -1; - - if (this->new_remote_stream.close () == -1) - return -1; - - return 0; -} - -ACE_INLINE int -Handle_R_Stream::handle_close (int, ACE_Reactor_Mask) -{ - return this->ACE_SOCK_Acceptor::close (); -} diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp deleted file mode 100644 index 7d6b088ba3b..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.cpp +++ /dev/null @@ -1,203 +0,0 @@ -// $Id$ - -#if !defined (ACE_HANDLE_THR_STREAM_C) -#define ACE_HANDLE_THR_STREAM_C - -#include "ace/Get_Opt.h" -#include "ace/INET_Addr.h" -#include "Handle_Thr_Stream.h" - -#if defined (ACE_HAS_THREADS) - -#if !defined (__ACE_INLINE__) -#include "Handle_Thr_Stream.i" -#endif /* __ACE_INLINE__ */ - -// Shorthand names. -#define SH SVC_HANDLER -#define PR_AC_1 ACE_PEER_ACCEPTOR_1 -#define PR_AC_2 ACE_PEER_ACCEPTOR_2 -#define PR_ST_1 ACE_PEER_STREAM_1 -#define PR_ST_2 ACE_PEER_STREAM_2 - -template <class SH, PR_AC_1> -Handle_Thr_Acceptor<SH, PR_AC_2>::~Handle_Thr_Acceptor (void) -{ -} - -template <class SH, PR_AC_1> -Handle_Thr_Acceptor<SH, PR_AC_2>::Handle_Thr_Acceptor (void) - : thr_flags_ (THR_DETACHED | THR_NEW_LWP) -{ -} - -template <class SH, PR_AC_1> int -Handle_Thr_Acceptor<SH, PR_AC_2>::info (char **strp, - size_t length) const -{ - char buf[BUFSIZ]; - ACE_INET_Addr sa; - - if (this->acceptor ().get_local_addr (sa) == -1) - return -1; - - ACE_OS::sprintf (buf, "%d/%s %s", sa.get_port_number (), "tcp", - "# tests threaded remote stream\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -template <class SH, PR_AC_1> int -Handle_Thr_Acceptor<SH, PR_AC_2>::init (int argc, char *argv[]) -{ - ACE_INET_Addr local_addr (inherited::DEFAULT_PORT_); - int n_threads = ACE_DEFAULT_THREADS; - - ACE_Get_Opt get_opt (argc, argv, "p:t:", 0); - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'p': - local_addr.set (ACE_OS::atoi (get_opt.optarg)); - break; - case 't': - n_threads = ACE_OS::atoi (get_opt.optarg); - break; - default: - break; - } - - // Initialize the threading strategy. - if (this->thr_strategy_.open (&this->thr_mgr_, - this->thr_flags_, - n_threads) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - - // Initialize the Acceptor base class, passing in the desired - // concurrency strategy. - else if (this->open (local_addr, ACE_Service_Config::reactor (), - 0, 0, &this->thr_strategy_) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); - else - return 0; -} - -template <class SH, PR_AC_1> int -Handle_Thr_Acceptor<SH, PR_AC_2>::fini (void) -{ - return ACE_Service_Config::reactor ()->remove_handler - (this, ACE_Event_Handler::ACCEPT_MASK); -} - -template <PR_ST_1> -CLI_Stream<PR_ST_2>::CLI_Stream (ACE_Thread_Manager *thr_mgr) - : inherited (thr_mgr) -{ -} - -template <PR_ST_1> int -CLI_Stream<PR_ST_2>::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) client stream object closing down\n")); - this->peer ().close (); - - // Must be allocated dynamically! - delete this; - return 0; -} - -template <PR_ST_1> int -CLI_Stream<PR_ST_2>::open (void *) -{ - ACE_INET_Addr sa; - - ACE_DEBUG ((LM_DEBUG, "(%t) client handle = %d\n", - this->peer ().get_handle ())); - - if (this->peer ().get_remote_addr (sa) == -1) - return -1; - - ACE_DEBUG ((LM_DEBUG, "(%t) accepted at port %d\n", - sa.get_port_number ())); - return 0; -} - -template <PR_ST_1> int -CLI_Stream<PR_ST_2>::svc (void) -{ - char buf[BUFSIZ]; - char login_name[L_cuserid]; - int bytes; - - ACE_OS::puts ("----------------------------------------"); - - while ((bytes = this->peer ().recv (buf, sizeof buf)) > 0) - ACE_OS::write (ACE_STDOUT, buf, bytes); - - ACE_OS::puts ("----------------------------------------"); - ACE_OS::fflush (stdout); - - long t = ACE_OS::time (0L); - ACE_OS::cuserid (login_name); - ACE_OS::sprintf (buf, "user %s %s", login_name, ACE_OS::ctime (&t)); - - if (this->peer ().send_n (buf, ACE_OS::strlen (buf) + 1) == -1) - return -1; - - ACE_DEBUG ((LM_DEBUG, "(%t) sent reply %s", buf)); - return 0; -} - -#undef SH -#undef PR_AC_1 -#undef PR_AC_2 -#undef PR_ST_1 -#undef PR_ST_2 - -//---------------------------------------- - -#if defined (ACE_HAS_TLI) -#include "ace/TLI_Stream.h" -#include "ace/TLI_Acceptor.h" -#define THR_STREAM ACE_TLI_STREAM -#define THR_ACCEPTOR ACE_TLI_ACCEPTOR -#else -#include "ace/SOCK_Stream.h" -#include "ace/SOCK_Acceptor.h" -#define THR_STREAM ACE_SOCK_STREAM -#define THR_ACCEPTOR ACE_SOCK_ACCEPTOR -#endif /* ACE_HAS_TLI */ -#include "ace/INET_Addr.h" - -typedef CLI_Stream <THR_STREAM> CLI_STREAM; -typedef Handle_Thr_Acceptor<CLI_STREAM, THR_ACCEPTOR> HANDLE_THR_ACCEPTOR; - -// Static class variables. - -u_short HANDLE_THR_ACCEPTOR::DEFAULT_PORT_ = ACE_DEFAULT_THR_PORT; - -// Service object. -HANDLE_THR_ACCEPTOR remote_thr_stream; -ACE_Service_Object_Type rts (&remote_thr_stream, "Remote_Thr_Stream"); - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Acceptor<CLI_STREAM, ACE_TLI_ACCEPTOR>; -template class ACE_Accept_Strategy<CLI_STREAM, ACE_TLI_ACCEPTOR>; -template class ACE_Concurrency_Strategy<CLI_STREAM>; -template class ACE_Creation_Strategy<CLI_STREAM>; -template class ACE_Scheduling_Strategy<CLI_STREAM>; -template class ACE_Strategy_Acceptor<CLI_STREAM, ACE_TLI_ACCEPTOR>; -template class ACE_Svc_Handler<ACE_TLI_STREAM, ACE_MT_SYNCH>; -template class ACE_TSS<ACE_Dynamic>; -template class ACE_Thread_Strategy<CLI_STREAM>; -template class CLI_Stream <THR_STREAM>; -template class Handle_Thr_Acceptor<CLI_STREAM, THR_ACCEPTOR>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#endif /* ACE_HAS_THREADS */ -#endif /* ACE_HANDLE_THR_STREAM_C */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h deleted file mode 100644 index be17d2d0338..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// Handle connections from remote INET connections. - -#if !defined (_HANDLE_THR_STREAM_H) -#define _HANDLE_THR_STREAM_H - -#include "ace/Acceptor.h" -#include "ace/Service_Record.h" - -#if defined (ACE_HAS_THREADS) - -template <class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> -class Handle_Thr_Acceptor : public ACE_Strategy_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> -{ -public: - // = Initialization and termination. - Handle_Thr_Acceptor (void); - ~Handle_Thr_Acceptor (void); - - // = Dynamic linking hooks. - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - typedef Handle_Thr_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2> inherited; - - static u_short DEFAULT_PORT_; - - ACE_Thread_Manager thr_mgr_; - // Thread manager. - - ACE_Thread_Strategy<SVC_HANDLER> thr_strategy_; - // Threading strategy. - - int thr_flags_; - // Threading flags. -}; - -// This class interacts with the client, running in a separate -// thread... -template <ACE_PEER_STREAM_1> -class CLI_Stream : public ACE_Svc_Handler<ACE_PEER_STREAM_2, ACE_MT_SYNCH> -{ -public: - CLI_Stream (ACE_Thread_Manager * = 0); - - virtual int open (void *); - // Open the service. - - virtual int close (u_long); - // Close down the service. - - virtual int svc (void); - // Execute the service. - -protected: - typedef ACE_Svc_Handler<ACE_PEER_STREAM_2, ACE_MT_SYNCH> inherited; -}; - -extern ACE_Service_Object_Type rts; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_Thr_Stream.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) -#include "Handle_Thr_Stream.cpp" -#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ -#endif /* ACE_HAS_THREADS */ -#endif /* _HANDLE_THR_STREAM_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.i b/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.i deleted file mode 100644 index 5f43e47c7ec..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Thr_Stream.i +++ /dev/null @@ -1 +0,0 @@ -/* -*- C++ -*- */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp deleted file mode 100644 index ffe00503856..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "Handle_Timeout.h" -// $Id$ - - -#if defined (SunOS4) -extern "C" -{ - int init (void); - int fini (void); - void __sti__Handle_Timeout_C_init_(); - void __std__Handle_Timeout_C_init_(); -} - -int -init (void) -{ - __sti__Handle_Timeout_C_init_(); - return 0; -} - -int -fini (void) -{ - __std__Handle_Timeout_C_init_(); - return 0; -} -#endif /* SunOS4 */ - -#if !defined (__ACE_INLINE__) -#include "Handle_Timeout.i" -#endif /* __ACE_INLINE__ */ - -Handle_Timeout timer_1; -ACE_Service_Object_Type t1 (&timer_1, "Timer_1"); diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h deleted file mode 100644 index 84c96c044d3..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -/* Handles timeouts. */ - -#if !defined (_HANDLE_TIMEOUT_H) -#define _HANDLE_TIMEOUT_H - -#include "ace/Service_Config.h" -#include "ace/Service_Record.h" - -class Handle_Timeout : public ACE_Service_Object -{ -public: - Handle_Timeout (void); - virtual int init (int argc, char *argv[]); - virtual int info (char **, size_t) const; - virtual int fini (void); - -private: - virtual int get_handle (void) const; - virtual int handle_timeout (const ACE_Time_Value &tv, const void *arg); - - int count; -}; - -extern ACE_Service_Object_Type t1; - -#if defined (__ACE_INLINE__) -#define ACE_INLINE inline -#include "Handle_Timeout.i" -#else -#define ACE_INLINE -#endif /* __ACE_INLINE__ */ - -#endif /* _HANDLE_TIMEOUT_H */ diff --git a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i b/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i deleted file mode 100644 index 50cd399cae2..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Handle_Timeout.i +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -#include "ace/Service_Config.h" -#include "ace/Get_Opt.h" - -ACE_INLINE -Handle_Timeout::Handle_Timeout (void): count (0) -{ -} - -ACE_INLINE int -Handle_Timeout::info (char **strp, size_t length) const -{ - char buf[BUFSIZ]; - - ACE_OS::sprintf (buf, "%s", "# tests timeout facility\n"); - - if (*strp == 0 && (*strp = ACE_OS::strdup (buf)) == 0) - return -1; - else - ACE_OS::strncpy (*strp, buf, length); - return ACE_OS::strlen (buf); -} - -ACE_INLINE int -Handle_Timeout::init (int argc, char *argv[]) -{ - ACE_Time_Value delta (10); - ACE_Time_Value interval (1); - ACE_Get_Opt get_opt (argc, argv, "a:d:i:", 0); - int arg = 0; - - for (int c; (c = get_opt ()) != -1; ) - switch (c) - { - case 'd': - delta.sec (ACE_OS::atoi (get_opt.optarg)); - break; - case 'i': - interval.sec (ACE_OS::atoi (get_opt.optarg)); - break; - case 'a': - arg = atoi (get_opt.optarg); - break; - default: - break; - } - - return ACE_Service_Config::reactor ()->schedule_timer (this, (void *) arg, delta, interval); -} - -ACE_INLINE int -Handle_Timeout::fini (void) -{ - return 0; -} - -ACE_INLINE int -Handle_Timeout::get_handle (void) const -{ - return -1; -} - -ACE_INLINE int -Handle_Timeout::handle_timeout (const ACE_Time_Value &tv, const void *arg) -{ - if (this->count++ >= 10) - return -1; /* Automatically cancel periodic timer... */ - ACE_DEBUG ((LM_INFO, "time for this(%u) expired at (%d, %d) with arg = %d\n", - this, tv.sec (), tv.usec (), int (arg))); - return 0; -} diff --git a/examples/Service_Configurator/IPC-tests/server/Makefile b/examples/Service_Configurator/IPC-tests/server/Makefile deleted file mode 100644 index 3549d56e673..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/Makefile +++ /dev/null @@ -1,842 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the server-side of the primary Reactor tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = server_test -LIB = libServer.a -SHLIB = libServer.so - -FILES = Handle_L_Dgram \ - Handle_L_CODgram \ - Handle_L_FIFO \ - Handle_L_Pipe \ - Handle_L_Stream \ - Handle_R_Dgram \ - Handle_R_Stream \ - Handle_Timeout \ - Handle_Broadcast \ - Handle_L_SPIPE \ - Handle_Thr_Stream - -SRC = $(addsuffix .cpp,$(BIN)) -OBJ = $(SRC:%.cpp=$(VDIR)%.o) - -LSRC = $(addsuffix .cpp,$(FILES)) -LIBS = -lACE - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VLIB) $(VSHLIB) $(SHLIBA) $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -LDFLAGS += -L./ - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Handle_L_Dgram.o .shobj/Handle_L_Dgram.so: Handle_L_Dgram.cpp Handle_L_Dgram.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/LSOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Dgram.i \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - Handle_L_Dgram.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_L_CODgram.o .shobj/Handle_L_CODgram.so: Handle_L_CODgram.cpp Handle_L_CODgram.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/LSOCK_CODgram.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_CODgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_CODgram.i \ - $(WRAPPER_ROOT)/ace/LSOCK_CODgram.i \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - Handle_L_CODgram.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_L_FIFO.o .shobj/Handle_L_FIFO.so: Handle_L_FIFO.cpp Handle_L_FIFO.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/FIFO_Recv_Msg.h \ - $(WRAPPER_ROOT)/ace/FIFO_Recv.h \ - $(WRAPPER_ROOT)/ace/FIFO.h \ - $(WRAPPER_ROOT)/ace/FIFO_Recv.i \ - $(WRAPPER_ROOT)/ace/FIFO_Recv_Msg.i \ - Handle_L_FIFO.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_L_Pipe.o .shobj/Handle_L_Pipe.so: Handle_L_Pipe.cpp Handle_L_Pipe.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/LSOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.i \ - Handle_L_Pipe.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_L_Stream.o .shobj/Handle_L_Stream.so: Handle_L_Stream.cpp Handle_L_Stream.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/UNIX_Addr.h \ - $(WRAPPER_ROOT)/ace/LSOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/LSOCK.h \ - $(WRAPPER_ROOT)/ace/LSOCK.i \ - $(WRAPPER_ROOT)/ace/LSOCK_Stream.i \ - Handle_L_Stream.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_R_Dgram.o .shobj/Handle_R_Dgram.so: Handle_R_Dgram.cpp Handle_R_Dgram.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i \ - Handle_R_Dgram.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_R_Stream.o .shobj/Handle_R_Stream.so: Handle_R_Stream.cpp Handle_R_Stream.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/SOCK_Acceptor.h \ - Handle_R_Stream.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_Timeout.o .shobj/Handle_Timeout.so: Handle_Timeout.cpp Handle_Timeout.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - Handle_Timeout.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_Broadcast.o .shobj/Handle_Broadcast.so: Handle_Broadcast.cpp Handle_Broadcast.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.h \ - $(WRAPPER_ROOT)/ace/SOCK_Dgram.i \ - Handle_Broadcast.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_L_SPIPE.o .shobj/Handle_L_SPIPE.so: Handle_L_SPIPE.cpp Handle_L_SPIPE.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Acceptor.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.h \ - $(WRAPPER_ROOT)/ace/SPIPE.h \ - $(WRAPPER_ROOT)/ace/SPIPE_Addr.h \ - $(WRAPPER_ROOT)/ace/SPIPE.i \ - $(WRAPPER_ROOT)/ace/SPIPE_Stream.i \ - Handle_L_SPIPE.i \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/Handle_Thr_Stream.o .shobj/Handle_Thr_Stream.so: Handle_Thr_Stream.cpp \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - Handle_Thr_Stream.h \ - $(WRAPPER_ROOT)/ace/Acceptor.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Svc_Handler.h \ - $(WRAPPER_ROOT)/ace/Synch_Options.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Acceptor.i \ - $(WRAPPER_ROOT)/ace/Service_Record.h \ - $(WRAPPER_ROOT)/ace/Stream.h \ - $(WRAPPER_ROOT)/ace/Module.h \ - Handle_Thr_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Stream.h \ - $(WRAPPER_ROOT)/ace/TLI.h \ - $(WRAPPER_ROOT)/ace/TLI.i \ - $(WRAPPER_ROOT)/ace/TLI_Stream.i \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.h \ - $(WRAPPER_ROOT)/ace/TLI_Acceptor.i -.obj/server_test.o .shobj/server_test.so: server_test.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Service_Configurator/IPC-tests/server/server_test.cpp b/examples/Service_Configurator/IPC-tests/server/server_test.cpp deleted file mode 100644 index 8e375021959..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/server_test.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// $Id$ - -// The main test driver for the dynamically configured server. - -#include "ace/Service_Config.h" - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config server_test; - - if (server_test.open (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "server_test.open"), -1); - - // Create an adapter to end the event loop. - ACE_Sig_Adapter sa ((ACE_Sig_Handler_Ex) ACE_Service_Config::end_reactor_event_loop); - - // Register a signal handler. - ACE_Service_Config::reactor ()->register_handler (SIGINT, &sa); - - // Run forever, performing the configured services until we are shut - // down by a SIGINT/SIGQUIT signal. - - while (server_test.reactor_event_loop_done () == 0) - server_test.run_reactor_event_loop (); - - return 0; -} diff --git a/examples/Service_Configurator/IPC-tests/server/svc.conf b/examples/Service_Configurator/IPC-tests/server/svc.conf deleted file mode 100644 index bdf1afe504b..00000000000 --- a/examples/Service_Configurator/IPC-tests/server/svc.conf +++ /dev/null @@ -1,19 +0,0 @@ -# To configure different services, simply uncomment the appropriate lines in this file! -#static ACE_Service_Manager "-d -p 3911" -dynamic Remote_Brdcast Service_Object * .shobj/Handle_Broadcast:remote_broadcast "-p 10001" -dynamic Remote_Stream Service_Object * .shobj/Handle_R_Stream:remote_stream "-p 20002" -dynamic Remote_Dgram Service_Object * .shobj/Handle_R_Dgram:remote_dgram "-p 15001" -dynamic Timer_1 Service_Object * .shobj/Handle_Timeout:timer_1 "-d 5 -i 1 -a 100" -dynamic Local_Stream Service_Object * .shobj/Handle_L_Stream:local_stream "-r /tmp/foo_stream" -dynamic Local_Pipe Service_Object * .shobj/Handle_L_Pipe:local_pipe "-r /tmp/foo_pipe" -dynamic Local_Fifo Service_Object * .shobj/Handle_L_FIFO:local_fifo "-r /tmp/foo_fifo" -dynamic Local_Dgram Service_Object * .shobj/Handle_L_Dgram:local_dgram "-r /tmp/foo_dgram" -dynamic Local_CODgram Service_Object * .shobj/Handle_L_CODgram:local_codgram "-r /tmp/foo_codgram" -dynamic Local_Spipe Service_Object * .shobj/Handle_L_SPIPE:local_spipe "-r /tmp/foo_spipe" -dynamic Remote_Thr_Stream Service_Object * .shobj/Handle_Thr_Stream:remote_thr_stream "-p 10001" -#suspend Remote_Stream -#resume Local_SPIPE -#resume Remote_Stream -#remove Remote_Stream -#remove Local_Stream - diff --git a/examples/Service_Configurator/Makefile b/examples/Service_Configurator/Makefile deleted file mode 100644 index 86ad57b73ef..00000000000 --- a/examples/Service_Configurator/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the Service Configurator tests -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -DIRS = IPC-tests \ - Misc - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU diff --git a/examples/Service_Configurator/Misc/Makefile b/examples/Service_Configurator/Misc/Makefile deleted file mode 100644 index 5bbd263e16b..00000000000 --- a/examples/Service_Configurator/Misc/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for a test of the miscellaneous Service_Config examples -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = main - -FILES = Timer_Service - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LDLIBS = $(addprefix .shobj/,$(SHOBJ)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Timer_Service.o .shobj/Timer_Service.so: Timer_Service.cpp Timer_Service.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Service_Configurator/Misc/Timer_Service.cpp b/examples/Service_Configurator/Misc/Timer_Service.cpp deleted file mode 100644 index 8852df4b78c..00000000000 --- a/examples/Service_Configurator/Misc/Timer_Service.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "Timer_Service.h" -// $Id$ - -int -Timer_Service::init (int argc, char *argv[]) -{ - int interval = argc > 1 ? ACE_OS::atoi (argv[1]) : 4; - - if (argc > 2) - ACE_Trace::start_tracing (); - else - ACE_Trace::stop_tracing (); - - ACE_DEBUG ((LM_DEBUG, - "in Timer_Service::init, argv[0] = %s, argc == %d\n", - argv[0], argc)); - - ACE_Service_Config::reactor ()->schedule_timer - (this, 0, ACE_Time_Value (1), ACE_Time_Value (interval)); - return 0; -} - -int -Timer_Service::handle_timeout (const ACE_Time_Value &tv, - const void *) -{ - ACE_DEBUG ((LM_DEBUG, - "in Timer_Service::handle_timeout sec = %d, usec = %d\n", - tv.sec (), tv.usec ())); - return 0; -} - -// Define the factory function. -ACE_SVC_FACTORY_DEFINE (Timer_Service) - -// Define the object that describes the service. -ACE_STATIC_SVC_DEFINE (Timer_Service, - "Timer_Service", ACE_SVC_OBJ_T, &ACE_SVC_NAME (Timer_Service), - ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ, 0) - diff --git a/examples/Service_Configurator/Misc/Timer_Service.h b/examples/Service_Configurator/Misc/Timer_Service.h deleted file mode 100644 index 506b4634a71..00000000000 --- a/examples/Service_Configurator/Misc/Timer_Service.h +++ /dev/null @@ -1,16 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/Service_Config.h" - -class Timer_Service : public ACE_Service_Object -{ -public: - virtual int init (int argc, char *argv[]); - - virtual int handle_timeout (const ACE_Time_Value &, - const void *); -}; - -ACE_STATIC_SVC_DECLARE (Timer_Service) - diff --git a/examples/Service_Configurator/Misc/main.cpp b/examples/Service_Configurator/Misc/main.cpp deleted file mode 100644 index 03957234a35..00000000000 --- a/examples/Service_Configurator/Misc/main.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "ace/Service_Config.h" -// $Id$ - -#include "Timer_Service.h" - -// Create an object that will insert the Timer_Service into the list -// of statically linked services that the ACE_Service_Config will -// process at run-time. -ACE_STATIC_SVC_REQUIRE(Timer_Service) - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - if (daemon.open (argc, argv) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1); - - // Run forever, performing the configured services until we receive - // a SIGINT. - - daemon.run_reactor_event_loop (); - return 0; -} diff --git a/examples/Service_Configurator/Misc/svc.conf b/examples/Service_Configurator/Misc/svc.conf deleted file mode 100644 index c3eb2fc6cea..00000000000 --- a/examples/Service_Configurator/Misc/svc.conf +++ /dev/null @@ -1 +0,0 @@ -static Timer_Service "timer $TIME $TRACE" diff --git a/examples/Shared_Malloc/Makefile b/examples/Shared_Malloc/Makefile deleted file mode 100644 index 4f893dbc952..00000000000 --- a/examples/Shared_Malloc/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for tests of the Shared_Malloc wrappers -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_malloc \ - test_persistence \ - test_multiple_mallocs - -FILES = Malloc \ - Options - -LSRC = $(addsuffix .cpp,$(FILES)) -LOBJ = $(addsuffix .o,$(FILES)) -SHOBJ = $(addsuffix .so,$(FILES)) - -LDLIBS = $(addprefix .shobj/,$(SHOBJ)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.lib.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Malloc.o .shobj/Malloc.so: Malloc.cpp Options.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - Malloc.h $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h -.obj/Options.o .shobj/Options.so: Options.cpp \ - $(WRAPPER_ROOT)/ace/Get_Opt.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i Options.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Shared_Malloc/Malloc.cpp b/examples/Shared_Malloc/Malloc.cpp deleted file mode 100644 index c0ddc352df5..00000000000 --- a/examples/Shared_Malloc/Malloc.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include "Options.h" -// $Id$ - -#include "Malloc.h" - -// Determine the type of dynamic memory manager. -#if defined (ACE_HAS_THREADS) -typedef ACE_Thread_Mutex THREAD_MUTEX; -#else -typedef ACE_Null_Mutex THREAD_MUTEX; -#endif /* ACE_HAS_THREADS */ - -// Strategic typedefs for memory allocation. - -typedef ACE_Malloc <ACE_LOCAL_MEMORY_POOL, THREAD_MUTEX> L_ALLOCATOR; -typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> M_ALLOCATOR; - -#if defined (ACE_LACKS_SYSV_SHMEM) -typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, THREAD_MUTEX> SP_ALLOCATOR; -typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, THREAD_MUTEX> ST_ALLOCATOR; -#else -typedef ACE_Malloc <ACE_SHARED_MEMORY_POOL, ACE_Process_Mutex> SP_ALLOCATOR; -typedef ACE_Malloc <ACE_SHARED_MEMORY_POOL, THREAD_MUTEX> ST_ALLOCATOR; -#endif /* ACE_LACKS_SYSV_SHMEM */ - -#if defined (ACE_LACKS_SBRK) -typedef ACE_Malloc <ACE_LOCAL_MEMORY_POOL, THREAD_MUTEX> SB_ALLOCATOR; -#else -typedef ACE_Malloc <ACE_SBRK_MEMORY_POOL, THREAD_MUTEX> SB_ALLOCATOR; -#endif /* ACE_LACKS_SBRK */ - -// Singleton -ACE_Allocator *Malloc::instance_ = 0; - -// This is a factory that decides what type of allocator to create. - -ACE_Allocator * -Malloc::instance (void) -{ - if (Malloc::instance_ == 0) - { - if (Options::instance ()->child ()) - Malloc::instance_ = new ACE_Allocator_Adapter<M_ALLOCATOR>; - else if (Options::instance ()->spawn_threads ()) - { - if (Options::instance ()->use_sbrk ()) - Malloc::instance_ = new ACE_Allocator_Adapter<SB_ALLOCATOR>; - else if (Options::instance ()->use_shmem ()) - Malloc::instance_ = new ACE_Allocator_Adapter<ST_ALLOCATOR>; - else - Malloc::instance_ = new ACE_Allocator_Adapter<L_ALLOCATOR>; - } - else if (Options::instance ()->use_mmap ()) - Malloc::instance_ = new ACE_Allocator_Adapter<M_ALLOCATOR>; - else // Use Shared_Memory_Pool. - Malloc::instance_ = new ACE_Allocator_Adapter<SP_ALLOCATOR>; - } - - return Malloc::instance_; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Allocator_Adapter<L_ALLOCATOR>; -template class ACE_Allocator_Adapter<M_ALLOCATOR>; -template class ACE_Allocator_Adapter<SB_ALLOCATOR>; -template class ACE_Allocator_Adapter<SP_ALLOCATOR>; -template class ACE_Allocator_Adapter<ST_ALLOCATOR>; -template class ACE_Guard<ACE_Process_Mutex>; -template class ACE_Malloc <ACE_LOCAL_MEMORY_POOL, THREAD_MUTEX>; -template class ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex>; -template class ACE_Read_Guard<ACE_Process_Mutex>; -template class ACE_Read_Guard<THREAD_MUTEX>; -template class ACE_Write_Guard<ACE_Process_Mutex>; -template class ACE_Write_Guard<THREAD_MUTEX>; - -#if defined (ACE_LACKS_SYSV_SHMEM) -template class ACE_Malloc <ACE_MMAP_MEMORY_POOL, THREAD_MUTEX>; -#else -template class ACE_Malloc <ACE_SHARED_MEMORY_POOL, ACE_Process_Mutex>; -template class ACE_Malloc <ACE_SHARED_MEMORY_POOL, THREAD_MUTEX>; -#endif /* ACE_LACKS_SYSV_SHMEM */ - -#if defined (ACE_LACKS_SBRK) -template class ACE_Malloc <ACE_LOCAL_MEMORY_POOL, THREAD_MUTEX>; -#else -template class ACE_Malloc <ACE_SBRK_MEMORY_POOL, THREAD_MUTEX>; -#endif /* ACE_LACKS_SBRK */ -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Shared_Malloc/Malloc.h b/examples/Shared_Malloc/Malloc.h deleted file mode 100644 index 57a1eecd1f2..00000000000 --- a/examples/Shared_Malloc/Malloc.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (MY_MALLOC_H) -#define MY_MALLOC_H - -#include "ace/Malloc.h" - -class Malloc - // = TITLE - // Allocator Singleton. -{ -public: - static ACE_Allocator *instance (void); - // Returns static instance. - -private: - Malloc (void); - // Ensure Singleton. - - static ACE_Allocator *instance_; - // Malloc Singleton. -}; - -#endif /* MY_MALLOC_H */ diff --git a/examples/Shared_Malloc/Options.cpp b/examples/Shared_Malloc/Options.cpp deleted file mode 100644 index bded6518699..00000000000 --- a/examples/Shared_Malloc/Options.cpp +++ /dev/null @@ -1,186 +0,0 @@ -#include "ace/Get_Opt.h" -// $Id$ - - -#include "Options.h" - -// Static Singleton instance. -Options *Options::instance_ = 0; - -Options * -Options::instance (void) -{ - if (Options::instance_ == 0) - Options::instance_ = new Options (); - - return Options::instance_; -} - -char * -Options::program_name (void) -{ - return this->program_name_; -} - -const char * -Options::slave_name (void) -{ - return this->slave_name_; -} - -int -Options::debug (void) -{ - return this->debug_; -} - -int -Options::exec_slave (void) -{ - return this->exec_slave_; -} - -size_t -Options::iteration_count (void) -{ - return this->iteration_count_; -} - -int -Options::use_sbrk (void) -{ - return this->use_sbrk_; -} - -size_t -Options::max_msg_size (void) -{ - return this->max_msg_size_; -} - -size_t -Options::spawn_count (void) -{ - return this->spawn_count_; -} - -int -Options::spawn_threads (void) -{ - return this->spawn_threads_; -} - -int -Options::use_mmap (void) -{ - return this->use_mmap_; -} - -int -Options::use_shmem (void) -{ - return this->use_shmem_; -} - -int -Options::child (void) -{ - return this->child_; -} - -// Explain usage and exit. - -void -Options::print_usage_and_die (void) -{ - ACE_ERROR ((LM_ERROR, "usage: %n" - "\n[-d] (run in debugging mode)\n" - "[-e] (use exec(2) in addition to fork(2))\n" - "[-l] (use C++ new operator rather than sbrk(2)\n" - "[-L max_msg_size]\n" - "[-m] (use mmap rather than SysV shared memory)\n" - "[-p] (use processes rather than threads)\n" - "[-s] (use SysV shared memory rather than mmap)\n" - "[-t number of threads or processes to spawn]\n" - "[-n iteration_count]\n%a", -1)); - /* NOTREACHED */ -} - -Options::Options (void) - : slave_name_ ("slave"), - debug_ (0), - exec_slave_ (0), - iteration_count_ (100), - use_sbrk_ (0), - use_shmem_ (0), - max_msg_size_ (127), - spawn_count_ (1), - spawn_threads_ (1), - use_mmap_ (0), - child_ (0) -{ -} - -void -Options::parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "dehlL:mn:pst:"); - - this->program_name_ = argv[0]; - ACE_LOG_MSG->open (this->program_name_); - - // Put in a special-case check for child process. - if (ACE_OS::strcmp (this->program_name_, slave_name_) == 0) - { - this->child_ = 1; - this->use_mmap_ = 1; - } - - int c; - - while ((c = get_opt ()) != -1) - { - switch (c) - { - case 'd': - this->debug_ = 1; - break; - case 'e': - this->exec_slave_ = 1; - break; - case 'h': - this->print_usage_and_die (); - /* NOTREACHED */ - break; - case 'l': - this->use_sbrk_ = 0; - break; - case 'L': - this->max_msg_size_ = ACE_OS::atoi (get_opt.optarg); - break; - case 'm': - this->use_mmap_ = 1; - break; - case 'n': - this->iteration_count_ = ACE_OS::atoi (get_opt.optarg); - break; - case 'p': // Spawn processes rather than threads - this->spawn_threads_ = 0; - break; - case 's': - // Use System V shared memory... - this->use_shmem_ = 1; - break; - case 't': - this->spawn_count_ = ACE_OS::atoi (get_opt.optarg); - break; - default: - this->print_usage_and_die (); - /* NOTREACHED */ - break; - } - } - // Switch to using MMAP when the -p and -e options are enabled. - if (this->exec_slave_ == 1 && this->spawn_threads_ == 0) - this->use_mmap_ = 1; -} diff --git a/examples/Shared_Malloc/Options.h b/examples/Shared_Malloc/Options.h deleted file mode 100644 index 931f7411673..00000000000 --- a/examples/Shared_Malloc/Options.h +++ /dev/null @@ -1,81 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#if !defined (_OPTIONS) -#define _OPTIONS - -#include "ace/OS.h" - -class Options - // = TITLE - // Options Singleton. -{ -public: - static Options *instance (void); - // Return Singleton. - - void parse_args (int argc, char *argv[]); - // Parse the arguments. - - // = Accessor methods. - char *program_name (void); - const char *slave_name (void); - int debug (void); - int exec_slave (void); - size_t iteration_count (void); - int use_sbrk (void); - int use_shmem (void); - size_t max_msg_size (void); - size_t spawn_count (void); - int spawn_threads (void); - int use_mmap (void); - int child (void); - -private: - Options (void); - // Ensure Singleton. - - static Options *instance_; - // Singleton. - - void print_usage_and_die (void); - // Explain usage and exit. - - char *program_name_; - // Name of the program. - - const char *slave_name_; - // Name of slave process. - - int debug_; - // Flag to indicate if we are debugging. - - int exec_slave_; - // Flag to indicate if we should exec after forking. - - size_t iteration_count_; - // Number of iterations to call malloc_recurse(). - - int use_sbrk_; - // Should we use sbrk(2)? - - int use_shmem_; - // Should we use Shared Memory? - - size_t max_msg_size_; - // Maximum number of bytes to malloc. - - size_t spawn_count_; - // Number of threads. - - int spawn_threads_; - // Spawn threads vs. processes. - - int use_mmap_; - // Use mmap() as the backing store. - - int child_; - // We're a child process. -}; - -#endif /* _OPTIONS */ diff --git a/examples/Shared_Malloc/test_malloc.cpp b/examples/Shared_Malloc/test_malloc.cpp deleted file mode 100644 index 41646d0105b..00000000000 --- a/examples/Shared_Malloc/test_malloc.cpp +++ /dev/null @@ -1,192 +0,0 @@ -// $Id$ - -// This program tests out all the various ACE_Malloc combinations and -// the ACE_Allocator_Adapter. - -#include "ace/Thread.h" -#include "ace/Thread_Manager.h" -#include "Malloc.h" -#include "Options.h" - -// Global thread manager. -static ACE_Thread_Manager thread_manager; - -static int -gen_size (void) -{ -#if defined (ACE_HAS_THREADS) - ACE_RANDR_TYPE seed = ACE_RANDR_TYPE (&seed); - return (ACE_OS::rand_r (ACE_RANDR_TYPE (seed)) % Options::instance ()->max_msg_size ()) + 1; -#else - return (ACE_OS::rand () % Options::instance ()->max_msg_size ()) + 1; -#endif /* ACE_HAS_THREADS */ -} - -// Recursively allocate and deallocate dynamic memory. - -static int -malloc_recurse (int count) -{ - static char default_char = 0; - - if (count <= 0) - { - if (Options::instance ()->debug ()) - AMS (Malloc::instance ()->print_stats ()); - } - else - { - int alloc_size = gen_size (); - void *ptr = Malloc::instance ()->malloc (alloc_size); - - if (ptr == 0) - ACE_ERROR ((LM_ERROR, "(%P|%t) *** malloc of size %d failed, %p\n%a", - "malloc", alloc_size)); - else - { - ACE_OS::memset (ptr, default_char++, alloc_size); - - if (Options::instance ()->debug ()) - ACE_DEBUG ((LM_INFO, "(%P|%t) %u (alloc), size = %d\n", ptr, alloc_size)); - - // Call ourselves recursively - malloc_recurse (count - 1); - - if (Options::instance ()->debug ()) - ACE_DEBUG ((LM_INFO, "(%P|%t) %u (free), size = %d\n", ptr, alloc_size)); - - Malloc::instance ()->free (ptr); - } - } - return 0; -} - -static void * -worker (void *arg) -{ - // Allocate a thread control object, which automatically removes the - // thread from the thread manager on exit. - ACE_Thread_Control tc (&thread_manager); - - malloc_recurse (int (arg)); - return 0; -} - -// Create the appropriate type of process/thread. - -static void -spawn (void) -{ - if (Options::instance ()->spawn_threads ()) - { -#if defined (ACE_HAS_THREADS) - if (thread_manager.spawn (ACE_THR_FUNC (worker), - (void *) Options::instance ()->iteration_count (), - THR_BOUND) == -1) - ACE_ERROR ((LM_ERROR, "%p\n%a", "thread create failed")); -#else - if (Options::instance ()->spawn_count () > 1) - ACE_ERROR ((LM_ERROR, "only one thread may be run in a process on this platform\n%a", 1)); -#endif /* ACE_HAS_THREADS */ - } -#if !defined (ACE_WIN32) - else if (ACE_OS::fork (Options::instance ()->program_name ()) == 0) - { - if (Options::instance ()->exec_slave ()) - { - char iterations[20]; - char msg_size[20]; - - ACE_OS::sprintf (iterations, "%d", Options::instance ()->iteration_count ()); - ACE_OS::sprintf (msg_size, "%d", Options::instance ()->max_msg_size ()); - - char *argv[8]; - argv[0] = (char *) Options::instance ()->slave_name (); - argv[1] = "-p"; - argv[2] = "-n"; - argv[3] = iterations; - argv[4] = "-L"; - argv[5] = msg_size; - argv[6] = Options::instance ()->debug () ? "-d" : ""; - argv[7] = (char *) 0; - - if (ACE_OS::execv (Options::instance ()->program_name (), argv) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "exec failed")); - ACE_OS::_exit (1); - } - else - { - ACE_DEBUG ((LM_INFO, - "(%P|%t) about to recurse with iteration count = %d\n", - Options::instance ()->iteration_count ())); - - malloc_recurse (Options::instance ()->iteration_count ()); - ACE_OS::exit (0); - } - } -#endif /* ACE_WIN32 */ -} - -// Wait for all the child processes/threads to exit. - -static void -wait_for_children (void) -{ - if (Options::instance ()->spawn_threads ()) - { -#if defined (ACE_HAS_THREADS) - // Wait for the threads to terminate. - thread_manager.wait (); -#else - malloc_recurse (Options::instance ()->iteration_count ()); -#endif /* ACE_HAS_THREADS */ - } -#if !defined (ACE_WIN32) - else - { - pid_t pid; - - while ((pid = ACE_OS::wait (0)) != -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) reaped pid = %d\n", pid)); - } -#endif /* ACE_WIN32 */ -} - -extern "C" void -handler (int) -{ - Malloc::instance ()->remove (); - ACE_ERROR ((LM_ERROR, "(%P|%t) removed handler\n%a", 0)); -} - -int -main (int argc, char *argv[]) -{ - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - ACE_UNUSED_ARG (sa); - - Options::instance ()->parse_args (argc, argv); - -#if !defined (ACE_WIN32) - if (Options::instance ()->child ()) - { - ACE_DEBUG ((LM_INFO, - "(%P|%t) about to recurse with iteration count = %d, debug = %d\n", - Options::instance ()->iteration_count ())); - - // We've been forked... - malloc_recurse (Options::instance ()->iteration_count ()); - } - else -#endif /* ACE_WIN32 */ - { - for (size_t i = 0; i < Options::instance ()->spawn_count (); i++) - spawn (); - - wait_for_children (); - Malloc::instance ()->remove (); - } - return 0; -} - diff --git a/examples/Shared_Malloc/test_multiple_mallocs.cpp b/examples/Shared_Malloc/test_multiple_mallocs.cpp deleted file mode 100644 index e4d769a93e6..00000000000 --- a/examples/Shared_Malloc/test_multiple_mallocs.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// $Id$ - -// Test the capabilities of the ACE shared memory manager in terms of -// its ability to handle multiple mallocs rooted at different base -// addresses. - -#include "ace/Malloc.h" -#include "ace/Synch.h" - -typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Process_Mutex> MALLOC; - -// Default address for shared memory mapped files and SYSV shared -// memory (defaults to 64 M). -void *REQUEST_BASE_ADDR = ((void *) (64 * 1024 * 1024)); -const char *REQUEST_STRING = "hello from request repository"; - -// Default address for shared memory mapped files and SYSV shared -// memory (defaults to 64 M). -void *RESPONSE_BASE_ADDR = ((void *) (128 * 1024 * 1024)); -const char *RESPONSE_STRING = "hello from response repository"; - -int -main (void) -{ - ACE_MMAP_Memory_Pool_Options request_options (REQUEST_BASE_ADDR); - - // Create an adapter version of an allocator. - ACE_Allocator_Adapter<MALLOC> *shmem_request = - new ACE_Allocator_Adapter<MALLOC> ("request_file", "RequestLock", &request_options); - - ACE_MMAP_Memory_Pool_Options response_options (RESPONSE_BASE_ADDR); - - // Create a non-adapter version of an allocator. - MALLOC *shmem_response = - new MALLOC ("response_file","ResponseLock", &response_options); - - void *data = 0; - - if (shmem_request->find ("foo", data) == 0) - cout << (char *) data << endl; - else - { - data = shmem_request->malloc (ACE_OS::strlen (REQUEST_STRING) + 1); - ACE_OS::strcpy ((char *) data, REQUEST_STRING); - shmem_request->bind ("foo", data); - } - data = 0; - - if (shmem_response->find ("foo", data) == 0) - cout << (char *) data << endl; - else - { - data = shmem_response->malloc (ACE_OS::strlen (RESPONSE_STRING) + 1); - ACE_OS::strcpy ((char *) data, RESPONSE_STRING); - shmem_response->bind ("foo", data); - } - - return 0; -} diff --git a/examples/Shared_Malloc/test_persistence.cpp b/examples/Shared_Malloc/test_persistence.cpp deleted file mode 100644 index 1afef0a4a60..00000000000 --- a/examples/Shared_Malloc/test_persistence.cpp +++ /dev/null @@ -1,246 +0,0 @@ -// Test the persistence capabilities of the ACE shared memory manager. -// $Id$ - - - -#include "ace/Malloc.h" - -typedef ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> MALLOC; -typedef ACE_Malloc_Iterator <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex> MALLOC_ITERATOR; - -// Shared memory manager. -static MALLOC *shmem_manager = 0; - -// Backing store name. -static char *backing_store = ACE_DEFAULT_BACKING_STORE; - -class Employee -{ -public: - Employee (void): name_ (0), id_ (0) {} - - Employee (char* name, u_long id) : id_ (id) - { - this->name_ = (char*) shmem_manager->malloc (ACE_OS::strlen (name) + 1); - ACE_OS::strcpy (this->name_, name ); - } - - ~Employee (void) { shmem_manager->free (this->name_); } - - char *name (void) const { return this->name_; } - - void name (char* name) - { - if (this->name_) - shmem_manager->free (this->name_); - this->name_ = (char*) shmem_manager->malloc (ACE_OS::strlen (name) + 1); - ACE_OS::strcpy (this->name_, name); - } - - u_long id (void) const { return id_; } - - void id (u_long id) { id_ = id; } - - friend ostream &operator<<(ostream &stream, const Employee &employee) - { - stream << endl; - stream << "Employee name: " << employee.name() << endl; - stream << "Employee id: " << employee.id() << endl; - stream << endl; - - return stream; - } - - void *operator new (size_t) - { - return shmem_manager->malloc (sizeof (Employee)); - } - - void operator delete (void *pointer) { shmem_manager->free (pointer); } - -private: - char *name_; - // Employee name. - - u_long id_; - // Employee ID. -}; - -class GUI_Handler -{ -public: - GUI_Handler (void) { menu(); } - - ~GUI_Handler (void) - { - MALLOC::MEMORY_POOL &pool = shmem_manager->memory_pool(); - pool.sync (); - } - - int service(void) - { - char option[BUFSIZ]; - char buf1[BUFSIZ]; - char buf2[BUFSIZ]; - - if (::scanf ("%s", option) <= 0) - { - ACE_ERROR ((LM_ERROR, "try again\n")); - return 0; - } - - int result = 0; - switch (option[0]) - { - case 'I' : - case 'i' : - if (::scanf ("%s %s", buf1, buf2) <= 0) - break; - result = insert_employee (buf1, ACE_OS::atoi (buf2)); - break; - case 'F' : - case 'f' : - if (::scanf ("%s", buf1) <= 0) - break; - result = find_employee (buf1); - break; - case 'D' : - case 'd' : - if (::scanf ("%s", buf1) <= 0) - break; - result = delete_employee (buf1); - break; - case 'L' : - case 'l' : - result = list_employees (); - break; - case 'Q' : - case 'q' : - return -1; - break; - default : - cout << "unrecognized command" << endl; - } - if (result == 0) - cout << "Last operation was successful!!" << endl; - else - cout << "Last operation failed!! " << endl; - - menu (); - - return 0; - } - - void menu(void) - { - cout << endl; - cout << "\t************************** " << endl; - cout << "\tThe employee database menu " << endl; - cout << endl; - cout << "\t<I> Insert <name> <id> " << endl; - cout << "\t<D> Delete <name> " << endl; - cout << "\t<F> Find <name> " << endl; - cout << endl; - cout << "\t<L> List all employees " << endl; - cout << endl; - cout << "\t<Q> Quit " << endl; - cout << "\t************************** " << endl; - } - -private: - int insert_employee (char* name, u_long id) - { - if (find_employee (name) == 0) - ACE_ERROR_RETURN ((LM_ERROR, "Employee already exists\n"), -1); - - Employee* new_employee = new Employee (name, id); - shmem_manager->bind (name, new_employee); - return 0; - } - - int find_employee (char* name) - { - void *temp; - if (shmem_manager->find (name, temp) == 0) - { - Employee *employee = (Employee *) temp; - - ACE_DEBUG ((LM_DEBUG, "The following employee was found.......\n\n")); - ACE_DEBUG ((LM_DEBUG, "Employee name: %s\nEmployee id: %d\n", - employee->name (), employee->id ())); - return 0; - } - - return -1; - } - - int list_employees (void) - { - MALLOC_ITERATOR iterator (*shmem_manager); - - ACE_DEBUG ((LM_DEBUG, "The following employees were found.......\n\n")); - - for (void* temp = 0; - iterator.next (temp) != 0; - iterator.advance ()) - { - Employee *employee = (Employee *) temp; - ACE_DEBUG ((LM_DEBUG, "Employee name: %s\nEmployee id: %d\n", - employee->name (), employee->id ())); - } - return 0; - } - - int delete_employee (char* name) - { - void *temp; - - if (shmem_manager->unbind (name, temp) == 0) - { - Employee *employee = (Employee *) temp; - - ACE_DEBUG ((LM_DEBUG, - "The following employee was found and deleted.......\n\n")); - - ACE_DEBUG ((LM_DEBUG, "Employee name: %s\nEmployee id: %d\n", - employee->name (), employee->id ())); - - delete employee; - return 0; - } - - ACE_DEBUG ((LM_DEBUG, "There is no employee with name %s", name)); - return -1; - } -}; - -void -parse_args (int argc, char *argv[]) -{ - if (argc > 1); - backing_store = argv[1]; -} - -int -main (int argc, char *argv[]) -{ - parse_args (argc, argv); - - shmem_manager = new MALLOC (backing_store); - - GUI_Handler handler; - - for(;;) - if (handler.service() == -1) - { - ACE_DEBUG ((LM_DEBUG, "closing down ....\n")); - break; - } - - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Malloc <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>; -template class ACE_Malloc_Iterator <ACE_MMAP_MEMORY_POOL, ACE_Null_Mutex>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/Shared_Memory/Makefile b/examples/Shared_Memory/Makefile deleted file mode 100644 index f5b474b27bc..00000000000 --- a/examples/Shared_Memory/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for tests of the Shared_Malloc wrappers -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = test_MM \ - test_SV - -LSRC = test_MM.cpp \ - test_SV.cpp - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -INSTALL = - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/test_MM.o .shobj/test_MM.so: test_MM.cpp \ - $(WRAPPER_ROOT)/ace/Shared_Memory_MM.h \ - $(WRAPPER_ROOT)/ace/Shared_Memory.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Mem_Map.h -.obj/test_SV.o .shobj/test_SV.so: test_SV.cpp \ - $(WRAPPER_ROOT)/ace/Shared_Memory_SV.h \ - $(WRAPPER_ROOT)/ace/Shared_Memory.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Shared_Memory.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Shared_Memory/test_MM.cpp b/examples/Shared_Memory/test_MM.cpp deleted file mode 100644 index b165ab9fb8a..00000000000 --- a/examples/Shared_Memory/test_MM.cpp +++ /dev/null @@ -1,64 +0,0 @@ - -// $Id$ - -#include "ace/Shared_Memory_MM.h" - -#define SHMSZ 27 -char shm_key[] = "/tmp/fooXXXXXX"; - -static void -client (void) -{ - ACE_Shared_Memory *shm_client = new ACE_Shared_Memory_MM (shm_key); - char *shm = (char *) shm_client->malloc (); - - for (char *s = shm; *s != '\0'; s++) - putchar (*s); - - putchar ('\n'); - *shm = '*'; -} - -static void -server (void) -{ - ACE_Shared_Memory *shm_server = new ACE_Shared_Memory_MM (shm_key, SHMSZ); - char *shm = (char *) shm_server->malloc (); - char *s = shm; - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - // Perform a busy wait (ugh) - while (*shm != '*') - ACE_OS::sleep (1); - - if (shm_server->remove () < 0) - ACE_ERROR ((LM_ERROR, "%p\n", "remove")); - ACE_OS::unlink (shm_key); -} - -int -main (int, char *[]) -{ - if (ACE_OS::mktemp (shm_key) == 0 || (ACE_OS::unlink (shm_key) == -1 && errno == EPERM)) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", shm_key), 1); - - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "fork"), 1); - case 0: - // Make sure the server starts up first. - ACE_OS::sleep (1); - client (); - break; - default: - server (); - break; - } - return 0; -} - diff --git a/examples/Shared_Memory/test_SV.cpp b/examples/Shared_Memory/test_SV.cpp deleted file mode 100644 index 0fe2fbfa7af..00000000000 --- a/examples/Shared_Memory/test_SV.cpp +++ /dev/null @@ -1,61 +0,0 @@ - -// $Id$ - -#include "ace/Shared_Memory_SV.h" - -#define SHMSZ 27 -#define SHM_KEY 5678 - -static void -client (void) -{ - ACE_Shared_Memory_SV shm_client (SHM_KEY, SHMSZ); - char *shm = (char *) shm_client.malloc (); - - for (char *s = shm; *s != '\0'; s++) - putchar (*s); - - putchar ('\n'); - *shm = '*'; -} - -static void -server (void) -{ - ACE_Shared_Memory_SV shm_server (SHM_KEY, SHMSZ, - ACE_Shared_Memory_SV::ACE_CREATE); - char *shm = (char *) shm_server.malloc (); - char *s = shm; - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - while (*shm != '*') - ACE_OS::sleep (1); - - if (shm_server.remove () < 0) - ACE_ERROR ((LM_ERROR, "%p\n", "remove")); -} - -int -main (int, char *[]) -{ - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "fork"), 1); - case 0: - // Make sure the server starts up first. - ACE_OS::sleep (1); - client (); - break; - default: - server (); - break; - } - - return 0; -} - diff --git a/examples/System_V_IPC/Makefile b/examples/System_V_IPC/Makefile deleted file mode 100644 index f799c16b5dc..00000000000 --- a/examples/System_V_IPC/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for the System V IPC directory -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -INFO = README - -DIRS = SV_Message_Queues \ - SV_Semaphores \ - SV_Shared_Memory - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nolocal.GNU - diff --git a/examples/System_V_IPC/README b/examples/System_V_IPC/README deleted file mode 100644 index c5ebde21a60..00000000000 --- a/examples/System_V_IPC/README +++ /dev/null @@ -1,13 +0,0 @@ -This directory contains a number of examples that illustrate how to -use the following ACE library components: - - . SV_Message_Queues - Illustrates the ACE wrappers for System V Message - Queues. - - . SV_Semaphores - Illustrates the ACE wrappers for System V Semaphores. - - . SV_Shared_Memory - Illustrates the ACE wrappers for System V Shared Memory. - diff --git a/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp b/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp deleted file mode 100644 index 7845fef37f8..00000000000 --- a/examples/System_V_IPC/SV_Message_Queues/MQ_Client.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "ace/SV_Message_Queue.h" -// $Id$ - -#include "test.h" - -int -main (void) -{ - long pid = long (ACE_OS::getpid ()); - ACE_SV_Message_Queue msgque (SRV_KEY); - ACE_Message_Block send_msg (SRV_ID, pid, ACE_OS::cuserid (0), "did you get this?"); - ACE_Message_Block recv_msg (pid); - - if (msgque.send (send_msg, send_msg.length ()) < 0) - ACE_OS::perror ("msgque.send"), ACE_OS::exit (1); - - if (msgque.recv (recv_msg, sizeof (Message_Data), recv_msg.type ()) < 0) - ACE_OS::perror ("msgrcv"), ACE_OS::exit (1); - - cout << "a message of length " - << recv_msg.length () - << " received from server " - << recv_msg.pid () - << " (user " - << recv_msg.user () << "): " - << recv_msg.text () << "\n"; - - return 0; -} diff --git a/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp b/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp deleted file mode 100644 index 15e213c9c50..00000000000 --- a/examples/System_V_IPC/SV_Message_Queues/MQ_Server.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// $Id$ - -#include "ace/Signal.h" -#include "ace/SV_Message_Queue.h" -#include "test.h" - -// Must be global for signal Message... -static ACE_SV_Message_Queue msgque (SRV_KEY, ACE_SV_Message_Queue::ACE_CREATE); - -extern "C" void -handler (int) -{ - if (msgque.remove () < 0) - ACE_OS::perror ("msgque.close"), ACE_OS::exit (1); - ACE_OS::exit (0); -} - -int -main (void) -{ - long pid = long (ACE_OS::getpid ()); - ACE_Message_Block recv_msg (SRV_ID); - ACE_Message_Block send_msg (0, pid, ACE_OS::cuserid (0), - "I received your message."); - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - ACE_UNUSED_ARG (sa); - - for (;;) - { - if (msgque.recv (recv_msg, sizeof (Message_Data), recv_msg.type ()) == -1) - ::perror ("msgque.recv"), ACE_OS::exit (1); - - cout << "a msg of length " - << recv_msg.length () - << " sent from client " - << recv_msg.pid () - << " (user " - << recv_msg.user () << "): " - << recv_msg.text () << "\n"; - cout.flush (); - - send_msg.type (recv_msg.pid ()); - - if (msgque.send (send_msg, send_msg.length ()) < 0) - ACE_OS::perror ("msgque.send"), ACE_OS::exit (1); - } - - /* NOTREACHED */ - return 0; -} - diff --git a/examples/System_V_IPC/SV_Message_Queues/Makefile b/examples/System_V_IPC/SV_Message_Queues/Makefile deleted file mode 100644 index d33fb574695..00000000000 --- a/examples/System_V_IPC/SV_Message_Queues/Makefile +++ /dev/null @@ -1,129 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for testing the typed and untyped Message Queue abstraction -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = MQ_Server \ - MQ_Client \ - TMQ_Server \ - TMQ_Client - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/MQ_Server.o .shobj/MQ_Server.so: MQ_Server.cpp \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/SV_Message_Queue.h \ - $(WRAPPER_ROOT)/ace/SV_Message.h \ - $(WRAPPER_ROOT)/ace/SV_Message_Queue.i \ - test.h -.obj/MQ_Client.o .shobj/MQ_Client.so: MQ_Client.cpp \ - $(WRAPPER_ROOT)/ace/SV_Message_Queue.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Message.h \ - $(WRAPPER_ROOT)/ace/SV_Message_Queue.i \ - test.h -.obj/TMQ_Server.o .shobj/TMQ_Server.so: TMQ_Server.cpp \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Typed_SV_Message_Queue.h \ - $(WRAPPER_ROOT)/ace/SV_Message_Queue.h \ - $(WRAPPER_ROOT)/ace/SV_Message.h \ - $(WRAPPER_ROOT)/ace/SV_Message_Queue.i \ - $(WRAPPER_ROOT)/ace/Typed_SV_Message.h \ - test.h -.obj/TMQ_Client.o .shobj/TMQ_Client.so: TMQ_Client.cpp \ - $(WRAPPER_ROOT)/ace/Typed_SV_Message_Queue.h \ - $(WRAPPER_ROOT)/ace/SV_Message_Queue.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Message.h \ - $(WRAPPER_ROOT)/ace/SV_Message_Queue.i \ - $(WRAPPER_ROOT)/ace/Typed_SV_Message.h \ - test.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/System_V_IPC/SV_Message_Queues/TMQ_Client.cpp b/examples/System_V_IPC/SV_Message_Queues/TMQ_Client.cpp deleted file mode 100644 index 8b1b4e74a0a..00000000000 --- a/examples/System_V_IPC/SV_Message_Queues/TMQ_Client.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "ace/Typed_SV_Message_Queue.h" -// $Id$ - - -#include "test.h" - -int -main (void) -{ - long pid = long (ACE_OS::getpid ()); - - ACE_Typed_SV_Message_Queue<Message_Data> msgque (key_t (SRV_KEY)); - - Message_Data msg_data (pid, ACE_OS::cuserid (0), "did you get this?"); - - ACE_Typed_SV_Message<Message_Data> send_msg (msg_data, - SRV_ID, - msg_data.length ()), - recv_msg (pid); - - if (msgque.send (send_msg) < 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "msgque.send"), 1); - - if (msgque.recv (recv_msg) < 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "msgque.recv"), 1); - - Message_Data &recv_msg_data = recv_msg.data (); - - cout << "a message of length " - << recv_msg_data.length () - << " received from server " - << recv_msg_data.pid () - << " (user " - << recv_msg_data.user () << "): " - << recv_msg_data.text () << "\n"; - - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Typed_SV_Message_Queue<Message_Data>; -template class ACE_Typed_SV_Message<Message_Data>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp b/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp deleted file mode 100644 index 59fd705b33a..00000000000 --- a/examples/System_V_IPC/SV_Message_Queues/TMQ_Server.cpp +++ /dev/null @@ -1,61 +0,0 @@ -// $Id$ - -#include "ace/Signal.h" -#include "ace/Typed_SV_Message_Queue.h" - -#include "test.h" - -// Must be global for signal Message... -static ACE_Typed_SV_Message_Queue<Message_Data> msgque - (SRV_KEY, ACE_Typed_SV_Message_Queue<Message_Data>::ACE_CREATE); - -extern "C" void -handler (int) -{ - if (msgque.remove () < 0) - ACE_ERROR ((LM_ERROR, "%p\n%a", "msgque.recv", 1)); - ACE_OS::exit (0); -} - -int -main (void) -{ - char *username = ACE_OS::cuserid (0); - Message_Data msg_data ((int) ACE_OS::getpid (), username, "I received your message."); - ACE_Typed_SV_Message<Message_Data> send_msg (msg_data, 0, msg_data.length ()); - ACE_Typed_SV_Message<Message_Data> recv_msg (SRV_ID); - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - ACE_UNUSED_ARG (sa); - - for (;;) - { - if (msgque.recv (recv_msg) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "msgque.recv"), 1); - - Message_Data &recv_msg_data = recv_msg.data (); - - cout << "a msg of length " - << recv_msg_data.length () - << " sent from client " - << recv_msg_data.pid () - << " (user " - << recv_msg_data.user () << "): " - << recv_msg_data.text () << "\n"; - cout.flush (); - - send_msg.type (recv_msg_data.pid ()); - - if (msgque.send (send_msg) < 0) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "msgque.send"), 1); - } - - /* NOTREACHED */ - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Typed_SV_Message_Queue<Message_Data>; -template class ACE_Typed_SV_Message<Message_Data>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/System_V_IPC/SV_Message_Queues/test.h b/examples/System_V_IPC/SV_Message_Queues/test.h deleted file mode 100644 index 775a27c4423..00000000000 --- a/examples/System_V_IPC/SV_Message_Queues/test.h +++ /dev/null @@ -1,42 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/OS.h" -#include "ace/SV_Message.h" - -#define MSGSZ 128 -#define SRV_KEY ACE_DEFAULT_SHM_KEY -#define SRV_ID 1 - -class Message_Data -{ -public: - Message_Data (long p = -1, const char user[] = "", char text[] = ""): pid_ (p) - { - ::strncpy (this->username_, user, 9); - ::strncpy (this->mtext_, text, MSGSZ); - } - - long pid (void) { return this->pid_; } - void pid (long p) { this->pid_ = p; } - char *user (void) { return this->username_; } - void user (char user[]) { ::strncpy (this->username_, user, 9); } - char *text (void) { return this->mtext_; } - void text (char text[]) { ::strncpy (this->mtext_, text, MSGSZ); } - int length (void) { return sizeof *this - sizeof this->mtext_ + ::strlen (this->mtext_) + 1; } - -protected: - long pid_; - char username_[9]; - char mtext_[MSGSZ]; -}; - -/* Note, this may not be 100 percent portable on all C++ compilers... */ -class ACE_Message_Block : public ACE_SV_Message, public Message_Data -{ -public: - ACE_Message_Block (long t, long p = 0, char login[] = "", char message[] = "") - : ACE_SV_Message (t), Message_Data (p, login, message) - {} -}; - diff --git a/examples/System_V_IPC/SV_Semaphores/Makefile b/examples/System_V_IPC/SV_Semaphores/Makefile deleted file mode 100644 index b961ebb9384..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Makefile +++ /dev/null @@ -1,92 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for Semaphore wrapper class examples -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = Semaphores_1 \ - Semaphores_2 - -LSRC = $(addsuffix .cpp,$(BIN)) - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/Semaphores_1.o .shobj/Semaphores_1.so: Semaphores_1.cpp \ - $(WRAPPER_ROOT)/ace/SV_Shared_Memory.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h -.obj/Semaphores_2.o .shobj/Semaphores_2.so: Semaphores_2.cpp \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphore_Client.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphore_Client.cpp deleted file mode 100644 index b7fe34725e7..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphore_Client.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "Semaphore_Test.h" -// $Id$ - -#include "ace/SV_Shared_Memory.h" -#include "ace/SV_Semaphore_Simple.h" - -int -main (void) -{ - ACE_SV_Shared_Memory shm_client (SHM_KEY, - SHMSZ, - ACE_SV_Shared_Memory::ACE_OPEN); - ACE_SV_Semaphore_Simple sem (SEM_KEY_1, - ACE_SV_Semaphore_Simple::ACE_OPEN, 0, 2); - - char *s = (char *) shm_client.get_segment_ptr (); - - if (sem.acquire (0) < 0) - ACE_OS::perror ("client sem.acquire"), ACE_OS::exit (1); - - while (*s != '\0') - putchar (*s++); - - putchar ('\n'); - - if (sem.release (1) < 0) - ACE_OS::perror ("client sem.release"), ACE_OS::exit (1); - - return 0; -} - diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphore_Server.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphore_Server.cpp deleted file mode 100644 index f9931705c26..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphore_Server.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// $Id$ - - -#include "ace/SV_Shared_Memory.h" -#include "ace/SV_Semaphore_Simple.h" -#include "ace/Signal.h" -#include "Semaphore_Test.h" - -static ACE_SV_Shared_Memory shm_server (SHM_KEY, SHMSZ, ACE_SV_Shared_Memory::ACE_CREATE); -static ACE_SV_Semaphore_Simple sem (SEM_KEY_1, ACE_SV_Semaphore_Simple::ACE_CREATE, 0, 2); - -extern "C" void -cleanup (int) -{ - if (shm_server.remove () < 0 || sem.remove () < 0) - ACE_ERROR ((LM_ERROR, "%p\n%a", "remove", 1)); - ACE_OS::exit (0); -} - -int -main (void) -{ - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) cleanup, SIGINT); - - char *s = (char *) shm_server.get_segment_ptr (); - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - if (sem.release (0) < 0) - ESD ("server sem.release", done); - - if (sem.acquire (1) < 0) - ESD ("server sem.acquire", done); - -done: - cleanup (); - return 0; -} diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphore_Test.h b/examples/System_V_IPC/SV_Semaphores/Semaphore_Test.h deleted file mode 100644 index 72aab815ff8..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphore_Test.h +++ /dev/null @@ -1,11 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/Log_Msg.h" - -#define SHMSZ 27 -#define SEM_KEY_1 2345 -#define SEM_KEY_2 4321 -#define SHM_KEY 5678 - -#define ESD(MSG,LABEL) do { ACE_ERROR ((LM_ERROR, MSG)); goto LABEL; } while (0) diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphores.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphores.cpp deleted file mode 100644 index b98c664883b..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphores.cpp +++ /dev/null @@ -1,94 +0,0 @@ -// Illustrates the use of the Semaphore_Complex class. Note that it -// $Id$ - -// doesn't matter whether the parent or the child creates the -// semaphore since Semaphore_Complex will correctly serialize the -// intialization of the mutex and synch objects. -#include "ace/Malloc.h" -#include "ace/SV_Semaphore_Complex.h" -#include "Semaphore_Test.h" - -ACE_Malloc<ACE_Shared_Memory_Pool, ACE_SV_Semaphore_Simple> allocator; -ACE_SV_Semaphore_Complex *mutex = 0; -ACE_SV_Semaphore_Complex *synch = 0; - -/* Pointer to memory shared by both the client and server. */ -static char *shm; - -static int -do_parent (void) -{ - char *s = shm; - - mutex = new ACE_SV_Semaphore_Complex (SEM_KEY_1, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - synch = new ACE_SV_Semaphore_Complex (SEM_KEY_2, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - if (mutex->release () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "server mutex.release"), 1); - - if (synch->acquire () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p", "server synch.acquire"), 1); - return 0; -} - -static int -do_child (void) -{ - mutex = new ACE_SV_Semaphore_Complex (SEM_KEY_1, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - synch = new ACE_SV_Semaphore_Complex (SEM_KEY_2, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - - while (mutex->tryacquire () == -1) - if (errno == EAGAIN) - ACE_DEBUG ((LM_DEBUG, "spinning in client!\n")); - else - ACE_ERROR_RETURN ((LM_ERROR, "client mutex.tryacquire"), 1); - - for (char *s = (char *) shm; *s != '\0'; s++) - putchar (*s); - - putchar ('\n'); - - if (synch->release () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "client synch.release"), 1); - return 0; -} - -int -main (void) -{ - shm = (char *) allocator.malloc (27); - - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "fork failed\n"), -1); - /* NOTREACHED */ - case 0: - return do_child (); - default: - { - int result = do_parent (); - - if (wait (0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "wait"), -1); - - allocator.remove (); - - if (mutex->remove () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "mutex.remove"), -1); - else if (synch->remove () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "synch.remove"), -1); - return result; - } - } -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Malloc<ACE_Shared_Memory_Pool, ACE_SV_Semaphore_Simple>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp deleted file mode 100644 index 6830b49052d..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphores_1.cpp +++ /dev/null @@ -1,92 +0,0 @@ -// $Id$ - -#include "ace/SV_Shared_Memory.h" -#include "ace/SV_Semaphore_Simple.h" -#include "ace/Malloc.h" - -#if defined (ACE_HAS_SYSV_IPC) - -// Shared memory allocator (note that this chews up the -// ACE_DEFAULT_SEM_KEY). -static ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple> allocator; - -const int SEM_KEY = ACE_DEFAULT_SEM_KEY + 1; -const int SHMSZ = 27; - -static int -parent (char *shm) -{ - char *s = shm; - - ACE_SV_Semaphore_Complex sem (SEM_KEY, ACE_SV_Semaphore_Complex::ACE_CREATE, 0, 2); - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - if (sem.release (0) == -1) - ACE_ERROR ((LM_ERROR, "%p", "parent sem.release(0)")); - else if (sem.acquire (1) == -1) - ACE_ERROR ((LM_ERROR, "%p", "parent sem.acquire(1)")); - - if (allocator.remove () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "allocator.remove")); - if (sem.remove () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "sem.remove")); - return 0; -} - -static int -child (char *shm) -{ - ACE_SV_Semaphore_Complex sem (SEM_KEY, ACE_SV_Semaphore_Complex::ACE_CREATE, 0, 2); - - while (sem.tryacquire (0) == -1) - if (errno == EAGAIN) - ACE_DEBUG ((LM_DEBUG, "spinning in client!\n")); - else - ACE_ERROR_RETURN ((LM_ERROR, "client mutex.tryacquire(0)"), 1); - - for (char *s = (char *) shm; *s != '\0'; s++) - ACE_DEBUG ((LM_DEBUG, "%c", *s)); - - ACE_DEBUG ((LM_DEBUG, "\n")); - - if (sem.release (1) < 0) - ACE_ERROR ((LM_ERROR, "client sem.release(1)")); - return 0; -} - -int -main (void) -{ - char *shm = (char *) allocator.malloc (27); - - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "fork failed\n"), -1); - /* NOTREACHED */ - case 0: - // Child. - return child (shm); - default: - return parent (shm); - } -} -#else -int main (void) -{ - ACE_ERROR ((LM_ERROR, - "SYSV IPC is not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_SYSV_IPC */ - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Guard<ACE_SV_Semaphore_Simple>; -template class ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple>; -template class ACE_Read_Guard<ACE_SV_Semaphore_Simple>; -template class ACE_Write_Guard<ACE_SV_Semaphore_Simple>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp b/examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp deleted file mode 100644 index d361bd5dd5e..00000000000 --- a/examples/System_V_IPC/SV_Semaphores/Semaphores_2.cpp +++ /dev/null @@ -1,103 +0,0 @@ -// $Id$ - -// Illustrates the use of the ACE_SV_Semaphore_Complex class and the -// ACE_Malloc class using the ACE_Shared_Memory_Pool (which uses -// System V shared memory). Note that it doesn't matter whether the -// parent or the child creates the semaphore since Semaphore_Complex -// will correctly serialize the intialization of the mutex and synch -// objects. - -#include "ace/Malloc.h" -#include "ace/SV_Semaphore_Complex.h" - -#if defined (ACE_HAS_SYSV_IPC) - -// Shared memory allocator (note that this chews up the -// ACE_DEFAULT_SEM_KEY). -static ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple> allocator; - -const int SEM_KEY_1 = ACE_DEFAULT_SEM_KEY + 1; -const int SEM_KEY_2 = ACE_DEFAULT_SEM_KEY + 2; -const int SHMSZ = 27; - -static int -parent (char *shm) -{ - char *s = shm; - - ACE_SV_Semaphore_Complex mutex (SEM_KEY_1, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - ACE_SV_Semaphore_Complex synch (SEM_KEY_2, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - if (mutex.release () == -1) - ACE_ERROR ((LM_ERROR, "%p", "parent mutex.release")); - else if (synch.acquire () == -1) - ACE_ERROR ((LM_ERROR, "%p", "parent synch.acquire")); - - if (allocator.remove () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "allocator.remove")); - if (mutex.remove () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "mutex.remove")); - if (synch.remove () == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "synch.remove")); - return 0; -} - -static int -child (char *shm) -{ - ACE_SV_Semaphore_Complex mutex (SEM_KEY_1, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - ACE_SV_Semaphore_Complex synch (SEM_KEY_2, ACE_SV_Semaphore_Complex::ACE_CREATE, 0); - - while (mutex.tryacquire () == -1) - if (errno == EAGAIN) - ACE_DEBUG ((LM_DEBUG, "spinning in child!\n")); - else - ACE_ERROR_RETURN ((LM_ERROR, "child mutex.tryacquire"), 1); - - for (char *s = (char *) shm; *s != '\0'; s++) - ACE_DEBUG ((LM_DEBUG, "%c", *s)); - - ACE_DEBUG ((LM_DEBUG, "\n")); - - if (synch.release () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "child synch.release"), 1); - return 0; -} - -int -main (void) -{ - char *shm = (char *) allocator.malloc (27); - - switch (ACE_OS::fork ()) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "fork failed\n"), -1); - /* NOTREACHED */ - case 0: - // Child. - return child (shm); - default: - return parent (shm); - } -} -#else -int main (void) -{ - ACE_ERROR ((LM_ERROR, - "SYSV IPC is not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_SYSV_IPC */ - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Guard<ACE_SV_Semaphore_Simple>; -template class ACE_Malloc<ACE_SHARED_MEMORY_POOL, ACE_SV_Semaphore_Simple>; -template class ACE_Read_Guard<ACE_SV_Semaphore_Simple>; -template class ACE_Write_Guard<ACE_SV_Semaphore_Simple>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ diff --git a/examples/System_V_IPC/SV_Shared_Memory/Makefile b/examples/System_V_IPC/SV_Shared_Memory/Makefile deleted file mode 100644 index ffe694c3421..00000000000 --- a/examples/System_V_IPC/SV_Shared_Memory/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for tests of the SV_Shared_Memory wrapper -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = SV_Shared_Memory_Test - -LSRC = $(addsuffix .cpp,$(BIN)) - -LDLIBS = - -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -INSTALL = - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/SV_Shared_Memory_Test.o .shobj/SV_Shared_Memory_Test.so: SV_Shared_Memory_Test.cpp \ - $(WRAPPER_ROOT)/ace/SV_Shared_Memory.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - SV_Shared_Memory_Test.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.cpp b/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.cpp deleted file mode 100644 index d980ae1b62c..00000000000 --- a/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "ace/SV_Shared_Memory.h" -// $Id$ - -#include "SV_Shared_Memory_Test.h" - -static void -client (void) -{ - ACE_SV_Shared_Memory shm_client; - - if (shm_client.open_and_attach (SHM_KEY, SHMSZ) == -1) - ACE_OS::perror ("open"), ACE_OS::exit (1); - - for (char *s = (char *) shm_client.get_segment_ptr (); *s != '\0'; s++) - putchar (*s); - - putchar ('\n'); - *(char *) shm_client.get_segment_ptr () = '*'; - ACE_OS::exit (0); -} - -static void -server (void) -{ - ACE_SV_Shared_Memory shm_server; - - if (shm_server.open_and_attach (SHM_KEY, SHMSZ, ACE_SV_Shared_Memory::ACE_CREATE) == -1) - ACE_OS::perror ("open"), ACE_OS::exit (1); - - char *s = (char *) shm_server.get_segment_ptr (); - - for (char c = 'a'; c <= 'z'; c++) - *s++ = c; - - *s = '\0'; - - for (s = (char *) shm_server.get_segment_ptr (); *s != '*'; ) - ACE_OS::sleep (1); - - if (shm_server.remove () < 0) - ACE_OS::perror ("remove"), ACE_OS::exit (1); - ACE_OS::exit (0); -} - -int -main (int, char *argv[]) -{ - switch (ACE_OS::fork ()) - { - case -1: - ACE_OS::perror (argv[0]), ACE_OS::exit (1); - case 0: - ACE_OS::sleep (1); - client (); - default: - server (); - } - return 0; -} - diff --git a/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.h b/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.h deleted file mode 100644 index 7712e016a09..00000000000 --- a/examples/System_V_IPC/SV_Shared_Memory/SV_Shared_Memory_Test.h +++ /dev/null @@ -1,7 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -#include "ace/OS.h" -#define SHMSZ 27 -#define SEM_KEY 1234 -#define SHM_KEY 5678 diff --git a/examples/Threads/Makefile b/examples/Threads/Makefile deleted file mode 100644 index 0911f9d7c0c..00000000000 --- a/examples/Threads/Makefile +++ /dev/null @@ -1,1065 +0,0 @@ -#---------------------------------------------------------------------------- -# @(#)Makefile 1.1 10/18/96 -# -# Makefile for tests of the ACE thread wrappers -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Local macros -#---------------------------------------------------------------------------- - -BIN = auto_event \ - barrier1 \ - barrier2 \ - future1 \ - future2 \ - manual_event \ - process_manager \ - process_mutex \ - process_semaphore \ - reader_writer \ - recursive_mutex \ - task_one \ - task_two \ - task_three \ - task_four \ - thread_manager \ - thread_pool \ - thread_specific \ - tss1 \ - tss2 \ - token - -LSRC = $(addsuffix .cpp,$(BIN)) -VLDLIBS = $(LDLIBS:%=%$(VAR)) - -BUILD = $(VBIN) - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(WRAPPER_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/macros.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.common.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.nonested.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.bin.GNU -include $(WRAPPER_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets -#---------------------------------------------------------------------------- - -#---------------------------------------------------------------------------- -# Dependencies -#---------------------------------------------------------------------------- - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/auto_event.o .shobj/auto_event.so: auto_event.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Singleton.h -.obj/barrier1.o .shobj/barrier1.so: barrier1.cpp \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/barrier2.o .shobj/barrier2.so: barrier2.cpp $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/future1.o .shobj/future1.so: future1.cpp $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Future.h \ - $(WRAPPER_ROOT)/ace/Method_Object.h \ - $(WRAPPER_ROOT)/ace/Activation_Queue.h \ - $(WRAPPER_ROOT)/ace/Auto_Ptr.h -.obj/future2.o .shobj/future2.so: future2.cpp $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Future.h \ - $(WRAPPER_ROOT)/ace/Method_Object.h \ - $(WRAPPER_ROOT)/ace/Activation_Queue.h \ - $(WRAPPER_ROOT)/ace/Auto_Ptr.h -.obj/manual_event.o .shobj/manual_event.so: manual_event.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/process_mutex.o .shobj/process_mutex.so: process_mutex.cpp \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h -.obj/process_semaphore.o .shobj/process_semaphore.so: process_semaphore.cpp \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h -.obj/reader_writer.o .shobj/reader_writer.so: reader_writer.cpp \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/recursive_mutex.o .shobj/recursive_mutex.so: recursive_mutex.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Get_Opt.h -.obj/task_one.o .shobj/task_one.so: task_one.cpp $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/task_two.o .shobj/task_two.so: task_two.cpp $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/task_three.o .shobj/task_three.so: task_three.cpp \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h -.obj/task_four.o .shobj/task_four.so: task_four.cpp \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/thread_manager.o .shobj/thread_manager.so: thread_manager.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/thread_pool.o .shobj/thread_pool.so: thread_pool.cpp \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/thread_specific.o .shobj/thread_specific.so: thread_specific.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/tss1.o .shobj/tss1.so: tss1.cpp \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Task_T.h -.obj/tss2.o .shobj/tss2.so: tss2.cpp $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h -.obj/token.o .shobj/token.so: token.cpp $(WRAPPER_ROOT)/ace/Token.h \ - $(WRAPPER_ROOT)/ace/Synch.h \ - $(WRAPPER_ROOT)/ace/ACE.h \ - $(WRAPPER_ROOT)/ace/OS.h \ - $(WRAPPER_ROOT)/ace/config.h \ - $(WRAPPER_ROOT)/ace/stdcpp.h \ - $(WRAPPER_ROOT)/ace/Trace.h \ - $(WRAPPER_ROOT)/ace/Log_Msg.h \ - $(WRAPPER_ROOT)/ace/Log_Record.h \ - $(WRAPPER_ROOT)/ace/Log_Priority.h \ - $(WRAPPER_ROOT)/ace/Log_Record.i \ - $(WRAPPER_ROOT)/ace/ACE.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.h \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Simple.i \ - $(WRAPPER_ROOT)/ace/SV_Semaphore_Complex.i \ - $(WRAPPER_ROOT)/ace/Synch_T.h \ - $(WRAPPER_ROOT)/ace/Event_Handler.h \ - $(WRAPPER_ROOT)/ace/Task.h \ - $(WRAPPER_ROOT)/ace/Service_Object.h \ - $(WRAPPER_ROOT)/ace/Shared_Object.h \ - $(WRAPPER_ROOT)/ace/Thread_Manager.h \ - $(WRAPPER_ROOT)/ace/Thread.h \ - $(WRAPPER_ROOT)/ace/Task_T.h \ - $(WRAPPER_ROOT)/ace/Message_Queue.h \ - $(WRAPPER_ROOT)/ace/Message_Block.h \ - $(WRAPPER_ROOT)/ace/Malloc.h \ - $(WRAPPER_ROOT)/ace/Malloc_T.h \ - $(WRAPPER_ROOT)/ace/Memory_Pool.h \ - $(WRAPPER_ROOT)/ace/Signal.h \ - $(WRAPPER_ROOT)/ace/Set.h \ - $(WRAPPER_ROOT)/ace/Mem_Map.h \ - $(WRAPPER_ROOT)/ace/IO_Cntl_Msg.h \ - $(WRAPPER_ROOT)/ace/Strategies.h \ - $(WRAPPER_ROOT)/ace/Strategies_T.h \ - $(WRAPPER_ROOT)/ace/Service_Config.h \ - $(WRAPPER_ROOT)/ace/Reactor.h \ - $(WRAPPER_ROOT)/ace/Handle_Set.h \ - $(WRAPPER_ROOT)/ace/Timer_Queue.h \ - $(WRAPPER_ROOT)/ace/Time_Value.h \ - $(WRAPPER_ROOT)/ace/Pipe.h \ - $(WRAPPER_ROOT)/ace/Pipe.i \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.h \ - $(WRAPPER_ROOT)/ace/SOCK_IO.h \ - $(WRAPPER_ROOT)/ace/SOCK.h \ - $(WRAPPER_ROOT)/ace/Addr.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.h \ - $(WRAPPER_ROOT)/ace/IPC_SAP.i \ - $(WRAPPER_ROOT)/ace/SOCK.i \ - $(WRAPPER_ROOT)/ace/SOCK_IO.i \ - $(WRAPPER_ROOT)/ace/INET_Addr.h \ - $(WRAPPER_ROOT)/ace/SOCK_Stream.i \ - $(WRAPPER_ROOT)/ace/Proactor.h \ - $(WRAPPER_ROOT)/ace/ReactorEx.h \ - $(WRAPPER_ROOT)/ace/Svc_Conf_Tokens.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/examples/Threads/auto_event.cpp b/examples/Threads/auto_event.cpp deleted file mode 100644 index 77f3cf82ace..00000000000 --- a/examples/Threads/auto_event.cpp +++ /dev/null @@ -1,119 +0,0 @@ -// $Id$ - -// This test shows the use of an ACE_Auto_Event as a signaling -// mechanism. Two threads are created (one a reader, the other a -// writer). The reader waits till the writer has completed -// calculations. Upon waking up the reader prints the data calculated -// by the writer. The writer thread calculates the value and signals -// the reader when the calculation completes. - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Singleton.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) -// Shared event between reader and writer. The ACE_Thread_Mutex is -// necessary to make sure that only one ACE_Auto_Event is created. -// The default constructor for ACE_Auto_Event sets it initially into -// the non-signaled state. - -typedef ACE_Singleton <ACE_Auto_Event, ACE_Thread_Mutex> EVENT; - -// work time for writer -static int work_time; - -// Reader thread. -static void * -reader (void *arg) -{ - // Shared data via a reference. - int& data = *(int *) arg; - - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - // Wait for writer to complete. - - ACE_DEBUG ((LM_DEBUG, "(%t) reader: waiting...... \n")); - - if (EVENT::instance ()->wait () == -1) - { - ACE_ERROR ((LM_ERROR, "thread wait failed")); - ACE_OS::exit (0); - } - - // Read shared data. - ACE_DEBUG ((LM_DEBUG, "(%t) reader: value of data is: %d \n", data)); - - return 0; -} - -// Writer thread. -static void * -writer (void *arg) -{ - int& data = *(int *) arg; - - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - // Calculate (work). - ACE_DEBUG ((LM_DEBUG, "(%t) writer: working for %d secs\n", work_time)); - ACE_OS::sleep (work_time); - - // Write shared data. - data = 42; - - // Wake up reader. - ACE_DEBUG ((LM_DEBUG, "(%t) writer: calculation complete, waking reader\n")); - - if (EVENT::instance ()->signal () == -1) - { - ACE_ERROR ((LM_ERROR, "thread wait failed")); - ACE_OS::exit (0); - } - - return 0; -} - -int -main (int argc, char **argv) -{ - // Shared data: set by writer, read by reader. - int data; - - // Work time for writer. - work_time = argc == 2 ? atoi (argv[1]) : 5; - - // threads manager - ACE_Thread_Manager& tm = *ACE_Service_Config::thr_mgr (); - - // Create reader thread. - if (tm.spawn (reader, (void *) &data) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread create for reader failed"), -1); - - // Create writer thread. - if (tm.spawn (writer, (void *) &data) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread create for writer failed"), -1); - - // Wait for both. - if (tm.wait () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread wait failed"), -1); - else - ACE_DEBUG ((LM_ERROR, "graceful exit\n")); - - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Singleton<ACE_Auto_Event, ACE_Thread_Mutex>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ - diff --git a/examples/Threads/barrier1.cpp b/examples/Threads/barrier1.cpp deleted file mode 100644 index 6b213819ca0..00000000000 --- a/examples/Threads/barrier1.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// This test program illustrates how the ACE barrier synchronization -// $Id$ - -// mechanisms work. - - -#include "ace/Synch.h" -#include "ace/Thread_Manager.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_THREADS) - -struct Tester_Args - // = TITLE - // These arguments are passed into each test thread. -{ - Tester_Args (ACE_Barrier &tb, int i) - : tester_barrier_ (tb), - n_iterations_ (i) {} - - ACE_Barrier &tester_barrier_; - // Reference to the tester barrier. This controls each miteration of - // the tester function running in every thread. - - int n_iterations_; - // Number of iterations to run. -}; - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -static void * -tester (Tester_Args *args) -{ - // Keeps track of thread exit. - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - for (int iterations = 1; - iterations <= args->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations)); - - // Block until all other threads have waited, then continue. - args->tester_barrier_.wait (); - } - - return 0; -} - -// Default number of threads to spawn. -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Barrier tester_barrier (n_threads); - - Tester_Args args (tester_barrier, n_iterations); - - if (ACE_Service_Config::thr_mgr ()->spawn_n - (n_threads, ACE_THR_FUNC (tester), - (void *) &args, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - - // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/barrier2.cpp b/examples/Threads/barrier2.cpp deleted file mode 100644 index 1fe7b2175ac..00000000000 --- a/examples/Threads/barrier2.cpp +++ /dev/null @@ -1,274 +0,0 @@ -// $Id$ - -// generic_worker_task.cpp -// -// This test program illustrates how the ACE task workers/barrier -// synchronization mechanisms work in conjunction with the ACE_Task -// and the ACE_Thread_Manager. The manual flag not set simulates -// user input, if set input comes from stdin until RETURN only is -// entered which stops all workers via a message block of length -// 0. This is an alernative shutdown of workers compared to queue -// deactivate. The delay_put flag simulates a delay between the -// shutdown puts. All should work with this flag disabled! The -// BARRIER_TYPE is supposed to enable/disable barrier sync on each svc -// a worker has done. - -#include <iostream.h> -#include "ace/Task.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_THREADS) - -#define BARRIER_TYPE ACE_Null_Barrier -//#define BARRIER_TYPE ACE_Barrier -//#ifdef delay_put -//#define manual - -template <class BARRIER> -class Worker_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - - Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int inp_serialize = 1); - - virtual int Producer (void); - // produce input for workers - - virtual int input (ACE_Message_Block *mb); - // Fill one message block via a certain input strategy. - - virtual int output (ACE_Message_Block *mb); - // Forward one message block via a certain output strategy to the - // next task if any. - - virtual int service (ACE_Message_Block *mb, int iter); - // Perform one message block dependant service. - -private: - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv=0); - - virtual int svc (void); - // Iterate <n_iterations> time printing off a message and "waiting" - // for all other threads to complete this iteration. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) {ACE_DEBUG ((LM_DEBUG,"(%t) in close of worker\n")); return 0; } - - int nt_; - // Number of worker threads to run. - int inp_serialize_; - - BARRIER barrier_; -}; - -template <class BARRIER> -Worker_Task<BARRIER>::Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int inp_serialize) - : ACE_Task<ACE_MT_SYNCH> (thr_mgr), - barrier_ (n_threads) -{ - nt_ = n_threads; - // Create worker threads. - inp_serialize_ = inp_serialize; - - // Use the task's message queue for serialization (default) or run - // service in the context of the caller thread. - - if (nt_ > 0 && inp_serialize == 1) - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Simply enqueue the Message_Block into the end of the queue. - -template <class BARRIER> int -Worker_Task<BARRIER>::put (ACE_Message_Block *mb, ACE_Time_Value *tv) -{ - int result; - if (this->inp_serialize_) - result = this->putq (mb, tv); - else - { - static int iter = 0; - result = this->service (mb, iter++); - - if (this->output (mb) < 0) - ACE_DEBUG ((LM_DEBUG, "(%t) output not connected!\n")); - - mb->release (); - } - return result; -} - -template <class BARRIER> int -Worker_Task<BARRIER>::service (ACE_Message_Block *mb, int iter) -{ - int length = mb->length (); - - if (length > 0) - { - ACE_DEBUG ((LM_DEBUG,"(%t) in iteration %d len=%d text got:\n",iter,length)); - ACE_OS::write (ACE_STDOUT, mb->rd_ptr (), length); - ACE_DEBUG ((LM_DEBUG,"\n")); - } - return 0; -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -template <class BARRIER> int -Worker_Task<BARRIER>::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us - // to the Thread_Manager when the thread begins. - - // Keep looping, reading a message out of the queue, until we get a - // message with a length == 0, which signals us to quit. - - for (int iter = 1; ;iter++) - { - ACE_Message_Block *mb = 0; - - int result = this->getq (mb); - - if (result == -1) - { - ACE_ERROR ((LM_ERROR, - "(%t) in iteration %d\n", "error waiting for message in iteration", iter)); - break; - } - - int length = mb->length (); - this->service (mb,iter); - - if (length == 0) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d got quit, exit!\n", iter)); - mb->release (); - break; - } - - this->barrier_.wait (); - this->output (mb); - - mb->release (); - } - - // Note that the ACE_Task::svc_run () method automatically removes - // us from the Thread_Manager when the thread exits. - - return 0; -} - -template <class BARRIER> int -Worker_Task<BARRIER>::Producer (void) -{ - // Keep reading stdin, until we reach EOF. - - for (;;) - { - // Allocate a new message. - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - - if (this->input (mb) == -1) - return -1; - } - - return 0; -} - -template <class BARRIER>int -Worker_Task<BARRIER>::output (ACE_Message_Block *mb) -{ - return this->put_next (mb); -} - -template <class BARRIER>int -Worker_Task<BARRIER>::input (ACE_Message_Block *mb) -{ - ACE_Message_Block *mb1; - -#ifndef manual - static int l= 0; - char str[]="kalle"; - strcpy (mb->rd_ptr (),str); - int n=strlen (str); - if (l==1000) - n=1; - l++; - if (l==0 || (l%100 == 0)) ACE_OS::sleep (5); - if (n <= 1) -#else - ACE_DEBUG ((LM_DEBUG,"(%t) press chars and enter to put a new message into task queue ...\n")); - if ((n = read (0, mb->rd_ptr (), mb->size ())) <= 1) -#endif // manual - { - // Send a shutdown message to the waiting threads and exit. - // cout << "\nvor loop, dump of task msg queue:\n" << endl; - // this->msg_queue ()->dump (); - for (int i=0;i<nt_;i++) - { - ACE_DEBUG ((LM_DEBUG,"(%t) eof, sending block for thread=%d\n",i+1)); - mb1 = new ACE_Message_Block (2); - mb1->length (0); - if (this->put (mb1) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put")); -#ifdef delay_put - ACE_OS::sleep (1); // this sleep helps to shutdown correctly -> was an error! -#endif /* delay_put */ - } - // cout << "\nnach loop, dump of task msg queue:\n" << endl; - // this->msg_queue ()->dump (); - return (-1); - } - else - { - // Send a normal message to the waiting threads and continue producing. - mb->wr_ptr (n); - if (this->put (mb) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put")); - } - return 0; -} - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - - ACE_DEBUG ((LM_DEBUG,"(%t) worker threads running=%d\n",n_threads)); - - - Worker_Task<BARRIER_TYPE> *worker_task = - new Worker_Task<BARRIER_TYPE> (ACE_Service_Config::thr_mgr (), - /*n_threads*/ 0,0); - - worker_task->Producer (); - - // Wait for all the threads to reach their exit point. - ACE_DEBUG ((LM_DEBUG,"(%t) waiting with thread manager ...\n")); - ACE_Service_Config::thr_mgr ()->wait (); - ACE_DEBUG ((LM_DEBUG,"(%t) delete worker task ...\n")); - - delete worker_task; - ACE_DEBUG ((LM_DEBUG,"(%t) done correct!\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class Worker_Task<ACE_Null_Barrier>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/cancel.cpp b/examples/Threads/cancel.cpp deleted file mode 100644 index a9d12bea579..00000000000 --- a/examples/Threads/cancel.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// Test out the cooperative thread cancellation mechanisms provided by -// $Id$ - -// the ACE_Thread_Manager. - -#include "ace/Service_Config.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) - -static void * -worker (int iterations) -{ - for (int i = 0; i < iterations; i++) - { - if ((i % 10) == 0 - && (ACE_Service_Config::thr_mgr ()->testcancel (ACE_Thread::self ()) != 0)) - { - ACE_DEBUG ((LM_DEBUG, "(%t) has been cancelled before iteration!\n", i)); - break; - } - } - - return 0; -} - -static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; -static const int DEFAULT_ITERATIONS = 100000; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - daemon.open (argv[0]); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - - int grp_id = thr_mgr->spawn_n (n_threads, ACE_THR_FUNC (worker), - (void *) n_iterations, - THR_NEW_LWP | THR_DETACHED); - - // Wait for 2 seconds and then suspend every thread in the group. - ACE_OS::sleep (2); - thr_mgr->suspend_grp (grp_id); - - // Wait for 2 more seconds and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (2)); - thr_mgr->resume_grp (grp_id); - - // Wait for 2 more seconds and then send a SIGINT to every thread in - // the group. - ACE_OS::sleep (ACE_Time_Value (2)); - thr_mgr->kill_grp (grp_id, SIGINT); - - // Wait for 2 more seconds and then exit (which should kill all the - // threads)! - ACE_OS::sleep (ACE_Time_Value (2)); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/future1.cpp b/examples/Threads/future1.cpp deleted file mode 100644 index 6c594fdd31b..00000000000 --- a/examples/Threads/future1.cpp +++ /dev/null @@ -1,406 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Test_Future.cpp -// -// = DESCRIPTION -// This example tests the ACE Future. -// -// = AUTHOR -// Andres Kruse <Andres.Kruse@cern.ch> and Douglas C. Schmidt -// <schmidt@cs.wustl.edu> -// -// ============================================================================ - -#include "ace/ACE.h" -#include "ace/Task.h" -#include "ace/Synch.h" -#include "ace/Message_Queue.h" -#include "ace/Future.h" -#include "ace/Method_Object.h" -#include "ace/Activation_Queue.h" -#include "ace/Auto_Ptr.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> ATOMIC_INT; - -// a counter for the tasks.. -static ATOMIC_INT task_count (0); - -// a counter for the futures.. -static ATOMIC_INT future_count (0); -static ATOMIC_INT future_no (0); - -// a counter for the capsules.. -static ATOMIC_INT capsule_count (0); -static ATOMIC_INT capsule_no (0); - -// a counter for the method objects... -static ATOMIC_INT methodobject_count (0); -static ATOMIC_INT methodobject_no (0); - -class Scheduler : public ACE_Task<ACE_MT_SYNCH> - // = TITLE - // Active Object Scheduler. -{ - friend class Method_ObjectWork; -public: - Scheduler (const char *, Scheduler * = 0); - virtual ~Scheduler (void); - - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int svc (void); - - ACE_Future<u_long> work (u_long param, int count = 1); - ACE_Future<const char*> name (void); - void end (void); - - u_long work_i (u_long, int); - const char *name_i (void); - -private: - char *name_; - ACE_Activation_Queue activation_queue_; - Scheduler *scheduler_; -}; - -class Method_Object_work : public ACE_Method_Object - // = TITLE - // Reification of the <work> method. -{ -public: - Method_Object_work (Scheduler *, u_long, int, ACE_Future<u_long> &); - virtual ~Method_Object_work (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - u_long param_; - int count_; - ACE_Future<u_long> future_result_; -}; - -Method_Object_work::Method_Object_work (Scheduler* new_Scheduler, - u_long new_param, - int new_count, - ACE_Future<u_long> &new_result) - : scheduler_ (new_Scheduler), - param_ (new_param), - count_ (new_count), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_work created\n")); -} - -Method_Object_work::~Method_Object_work (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Method_Object_work will be deleted.\n")); -} - - -int -Method_Object_work::call (void) -{ - return this->future_result_.set (this->scheduler_->work_i (this->param_, this->count_)); -} - -class Method_Object_name : public ACE_Method_Object - // = TITLE - // Reification of the <name> method. -{ -public: - Method_Object_name (Scheduler *, ACE_Future<const char*> &); - virtual ~Method_Object_name (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - ACE_Future<const char *> future_result_; -}; - -Method_Object_name::Method_Object_name (Scheduler *new_scheduler, - ACE_Future<const char *> &new_result) - : scheduler_ (new_scheduler), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_name created\n")); -}; - -Method_Object_name::~Method_Object_name (void) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_name will be deleted.\n")); -} - -int -Method_Object_name::call (void) -{ - return future_result_.set (scheduler_->name_i ()); -} - -class Method_Object_end : public ACE_Method_Object - // = TITLE - // Reification of the <end> method. -{ -public: - Method_Object_end (Scheduler *new_scheduler): scheduler_ (new_scheduler) {} - virtual ~Method_Object_end (void) {} - virtual int call (void) { this->scheduler_->close (); return -1; } - -private: - Scheduler *scheduler_; -}; - -// Constructor. -Scheduler::Scheduler (const char *newname, - Scheduler *new_scheduler) -{ - ACE_NEW (this->name_, char[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy (this->name_, newname); - this->scheduler_ = new_scheduler; - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s created\n", this->name_)); -} - -// Destructor -Scheduler::~Scheduler (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s will be destroyed\n", this->name_)); - delete [] this->name_; -} - -// open -int -Scheduler::open (void *) -{ - task_count++; - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s open\n", this->name_)); - return this->activate (THR_BOUND); -} - -// close -int -Scheduler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s close\n", this->name_)); - task_count--; - return 0; -} - -// service.. -int -Scheduler::svc (void) -{ - for (;;) - { - // Dequeue the next method object (we use an auto pointer in - // case an exception is thrown in the <call>). - auto_ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); - - ACE_DEBUG ((LM_DEBUG, "(%t) calling method object\n")); - // Call it. - if (mo->call () == -1) - break; - // Destructor automatically deletes it. - } - - /* NOTREACHED */ - return 0; -} - -void -Scheduler::end (void) -{ - this->activation_queue_.enqueue (new Method_Object_end (this)); -} - - -// Here's where the Work takes place. -u_long -Scheduler::work_i (u_long param, - int count) -{ - ACE_UNUSED_ARG (count); - - return ACE::is_prime (param, 2, param / 2); -} - -const char * -Scheduler::name_i (void) -{ - char *the_name; - - ACE_NEW_RETURN (the_name, char[ACE_OS::strlen (this->name_) + 1], 0); - ACE_OS::strcpy (the_name, this->name_); - - return the_name; -} - -ACE_Future<const char *> -Scheduler::name (void) -{ - if (this->scheduler_) - // Delegate to the Scheduler. - return this->scheduler_->name (); - else - { - ACE_Future<const char*> new_future; - - // @@ What happens if new fails here? - this->activation_queue_.enqueue - (new Method_Object_name (this, new_future)); - - return new_future; - } -} - -ACE_Future<u_long> -Scheduler::work (u_long newparam, - int newcount) -{ - if (this->scheduler_) { - return this->scheduler_->work (newparam, newcount); - } - else { - ACE_Future<u_long> new_future; - - this->activation_queue_.enqueue - (new Method_Object_work (this, newparam, newcount, new_future)); - return new_future; - } -} - -// @@ These values should be set by the command line options! - -// Total number of loops. -static size_t n_loops = 100; - -int -main (int, char *[]) -{ - Scheduler *andres, *peter, *helmut, *matias; - - // Create active objects.. - // @@ Should "open" be subsumed within the constructor of - // Scheduler()? - ACE_NEW_RETURN (andres, Scheduler ("andres"), -1); - andres->open (); - ACE_NEW_RETURN (peter, Scheduler ("peter"), -1); - peter->open (); - ACE_NEW_RETURN (helmut, Scheduler ("helmut"), -1); - helmut->open (); - - // Matias passes all asynchronous method calls on to Andres... - ACE_NEW_RETURN (matias, Scheduler ("matias", andres), -1); - matias->open (); - - for (size_t i = 0; i < n_loops; i++) - { - { - ACE_Future<u_long> fresulta, fresultb, fresultc, fresultd, fresulte; - ACE_Future<const char *> fname; - - ACE_DEBUG ((LM_DEBUG, "(%t) going to do a non-blocking call\n")); - - fresulta = andres->work (9013); - fresultb = peter->work (9013); - fresultc = helmut->work (9013); - fresultd = matias->work (9013); - fname = andres->name (); - - // see if the result is available... - if (fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG, "(%t) wow.. work is ready.....\n")); - - ACE_DEBUG ((LM_DEBUG, "(%t) non-blocking call done... now blocking...\n")); - - // Save the result of fresulta. - - fresulte = fresulta; - - if (i % 3 == 0) - { - // Every 3rd time... disconnect the futures... - // but "fresulte" should still contain the result... - fresulta.cancel (10); - fresultb.cancel (20); - fresultc.cancel (30); - fresultd.cancel (40); - } - - u_long resulta = 0, resultb = 0, resultc = 0, resultd = 0, resulte = 0; - - fresulta.get (resulta); - fresultb.get (resultb); - fresultc.get (resultc); - fresultd.get (resultd); - fresulte.get (resulte); - - ACE_DEBUG ((LM_DEBUG, "(%t) result a %u\n", (u_int) resulte)); - ACE_DEBUG ((LM_DEBUG, "(%t) result b %u\n", (u_int) resulta)); - ACE_DEBUG ((LM_DEBUG, "(%t) result c %u\n", (u_int) resultb)); - ACE_DEBUG ((LM_DEBUG, "(%t) result d %u\n", (u_int) resultc)); - ACE_DEBUG ((LM_DEBUG, "(%t) result e %u\n", (u_int) resultd)); - - const char *name; - - fname.get (name); - - ACE_DEBUG ((LM_DEBUG, "(%t) name %s\n", name)); - delete [] (char *) name; - } - - ACE_DEBUG ((LM_DEBUG, - "(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n", - (int) task_count, - (int) future_count, - (int) capsule_count, - (int) methodobject_count)); - } - - // Close things down. - andres->end (); - peter->end (); - helmut->end (); - matias->end (); - - ACE_OS::sleep (2); - - ACE_DEBUG ((LM_DEBUG, - "(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n", - (int) task_count, - (int) future_count, - (int) capsule_count, - (int) methodobject_count)); - - ACE_DEBUG ((LM_DEBUG,"(%t) th' that's all folks!\n")); - - ACE_OS::sleep (5); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -template class ACE_Future<const char *>; -template class ACE_Future<u_long>; -template class ACE_Future_Rep<char const *>; -template class ACE_Future_Rep<u_long>; -template class auto_ptr<ACE_Method_Object>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/future2.cpp b/examples/Threads/future2.cpp deleted file mode 100644 index 5636c193b6d..00000000000 --- a/examples/Threads/future2.cpp +++ /dev/null @@ -1,528 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Test_Future.cpp -// -// = DESCRIPTION -// This example tests the ACE Future. -// -// = AUTHOR -// Andres Kruse <Andres.Kruse@cern.ch> and Douglas C. Schmidt -// <schmidt@cs.wustl.edu> -// -// Modification History -// Aug. 96; A.Kruse; dev. -// Aug. 96; D.Schmidt; complete workover -// 08/27/96; A.Kruse; - the friends of Scheduler are "Method_Object_name" -// and "Method_Object_work". -// - make the methods "work_i" and "name_i" private -// 09/2/96; D.Schmidt; Integrate with new ACE_Future API and rearrange -// the tests so they are more modular. -// ============================================================================ - -#include "ace/ACE.h" -#include "ace/Task.h" -#include "ace/Synch.h" -#include "ace/Message_Queue.h" -#include "ace/Future.h" -#include "ace/Method_Object.h" -#include "ace/Activation_Queue.h" -#include "ace/Auto_Ptr.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> ATOMIC_INT; - -// a counter for the tasks.. -static ATOMIC_INT scheduler_open_count (0); - -// forward declarations -class Method_Object_work; -class Method_Object_name; - -class Scheduler : public ACE_Task<ACE_MT_SYNCH> - // = TITLE - // Active Object Scheduler. -{ - // Every method object has to be able to access the private methods. - - friend class Method_Object_work; - friend class Method_Object_name; - friend class Method_Object_end; -public: - - Scheduler (const char *, Scheduler * = 0); - virtual ~Scheduler (void); - - virtual int open (void *args = 0); - // The method that is used to start the active object. - - // = Here are the methods exported by the class. They return an - // <ACE_Future>. - ACE_Future<u_long> work (u_long param, int count = 1); - ACE_Future<char*> name (void); - void end (void); - -private: - virtual int close (u_long flags = 0); - // Should not be accessible from outside... (use end () instead). - - virtual int svc (void); - // Here the actual servicing of all requests is happening.. - - // = Implementation methods. - u_long work_i (u_long, int); - char *name_i (void); - - char *name_; - ACE_Activation_Queue activation_queue_; - Scheduler *scheduler_; -}; - -class Method_Object_work : public ACE_Method_Object - // = TITLE - // Reification of the <work> method. -{ -public: - Method_Object_work (Scheduler *, u_long, int, ACE_Future<u_long> &); - virtual ~Method_Object_work (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - u_long param_; - int count_; - ACE_Future<u_long> future_result_; -}; - -Method_Object_work::Method_Object_work (Scheduler* new_Scheduler, - u_long new_param, - int new_count, - ACE_Future<u_long> &new_result) - : scheduler_ (new_Scheduler), - param_ (new_param), - count_ (new_count), - future_result_ (new_result) -{ -} - -Method_Object_work::~Method_Object_work (void) -{ -} - -int -Method_Object_work::call (void) -{ - return this->future_result_.set (this->scheduler_->work_i (this->param_, this->count_)); -} - -class Method_Object_name : public ACE_Method_Object - // = TITLE - // Reification of the <name> method. -{ -public: - Method_Object_name (Scheduler *, ACE_Future<char*> &); - virtual ~Method_Object_name (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - ACE_Future<char*> future_result_; -}; - - -Method_Object_name::Method_Object_name (Scheduler *new_scheduler, - ACE_Future<char*> &new_result) - : scheduler_ (new_scheduler), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - " (%t) Method_Object_name created\n")); -}; - -Method_Object_name::~Method_Object_name (void) -{ - ACE_DEBUG ((LM_DEBUG, - " (%t) Method_Object_name will be deleted.\n")); -} - -int -Method_Object_name::call (void) -{ - return future_result_.set (scheduler_->name_i ()); -} - -class Method_Object_end : public ACE_Method_Object - // = TITLE - // Reification of the <end> method. -{ -public: - Method_Object_end (Scheduler *new_Scheduler): scheduler_ (new_Scheduler) {} - virtual ~Method_Object_end (void) {} - virtual int call (void) { this->scheduler_->close (); return -1; } - -private: - Scheduler *scheduler_; -}; - -// constructor -Scheduler::Scheduler (const char *newname, Scheduler *new_Scheduler) -{ - ACE_NEW (this->name_, char[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((char *) this->name_, newname); - this->scheduler_ = new_Scheduler; - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s created\n", this->name_)); -} - -// Destructor -Scheduler::~Scheduler (void) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s will be destroyed\n", this->name_)); -} - -int -Scheduler::open (void *) -{ - scheduler_open_count++; - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s open\n", this->name_)); - return this->activate (THR_BOUND); -} - -int -Scheduler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s close\n", this->name_)); - scheduler_open_count--; - return 0; -} - -int -Scheduler::svc (void) -{ - // Main event loop for this active object. - for (;;) - { - // Dequeue the next method object (we use an auto pointer in - // case an exception is thrown in the <call>). - auto_ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); - - ACE_DEBUG ((LM_DEBUG, " (%t) calling method object\n")); - // Call it. - if (mo->call () == -1) - break; - // Smart pointer destructor automatically deletes mo. - } - - /* NOTREACHED */ - return 0; -} - -void -Scheduler::end (void) -{ - this->activation_queue_.enqueue (new Method_Object_end (this)); -} - -// Here's where the Work takes place. -u_long -Scheduler::work_i (u_long param, - int count) -{ - ACE_UNUSED_ARG (count); - - return ACE::is_prime (param, 2, param / 2); -} - -char * -Scheduler::name_i (void) -{ - char *the_name; - - ACE_NEW_RETURN (the_name, char[ACE_OS::strlen (this->name_) + 1], 0); - ACE_OS::strcpy (the_name, this->name_); - - return the_name; -} - -ACE_Future<char *> -Scheduler::name (void) -{ - if (this->scheduler_) - // Delegate to the other scheduler - return this->scheduler_->name (); - else - { - ACE_Future<char*> new_future; - - if (this->thr_count () == 0) - { - // This scheduler is inactive... so we execute the user - // request right away... - - auto_ptr<ACE_Method_Object> mo (new Method_Object_name (this, new_future)); - - mo->call (); - // Smart pointer destructor automatically deletes mo. - } - else - // @@ What happens if new fails here? - this->activation_queue_.enqueue - (new Method_Object_name (this, new_future)); - - return new_future; - } -} - -ACE_Future<u_long> -Scheduler::work (u_long newparam, int newcount) -{ - if (this->scheduler_) - return this->scheduler_->work (newparam, newcount); - else - { - ACE_Future<u_long> new_future; - - if (this->thr_count () == 0) - { - auto_ptr<ACE_Method_Object> mo - (new Method_Object_work (this, newparam, newcount, new_future)); - mo->call (); - // Smart pointer destructor automatically deletes it. - } - else - this->activation_queue_.enqueue - (new Method_Object_work (this, newparam, newcount, new_future)); - - return new_future; - } -} - -static int -determine_iterations (void) -{ - int n_iterations; - - ACE_DEBUG ((LM_DEBUG," (%t) determining the number of iterations...\n")); - Scheduler *worker_a; - - ACE_NEW_RETURN (worker_a, Scheduler ("worker A"), -1); - - ACE_Time_Value tstart (ACE_OS::gettimeofday ()); - ACE_Time_Value tend (ACE_OS::gettimeofday ()); - - // Determine the number of iterations... we want so many that the - // work () takes about 1 second... - - for (n_iterations = 1; - (tend.sec () - tstart.sec ()) < 1; - n_iterations *= 2) - { - tstart = ACE_OS::gettimeofday (); - - worker_a->work (9013, n_iterations); - - tend = ACE_OS::gettimeofday (); - } - - ACE_DEBUG ((LM_DEBUG," (%t) n_iterations %d\n", - (int) n_iterations)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? - return n_iterations; -} - -static void -test_active_object (int n_iterations) -{ - ACE_UNUSED_ARG (n_iterations); - - ACE_DEBUG ((LM_DEBUG," (%t) testing active object pattern...\n")); - // A simple example for the use of the active object pattern and - // futures to return values from an active object. - - Scheduler *worker_a; - Scheduler *worker_b; - Scheduler *worker_c; - - ACE_NEW (worker_a, Scheduler ("worker A")); - ACE_NEW (worker_b, Scheduler ("worker B")); - // Have worker_c delegate his work to worker_a. - ACE_NEW (worker_c, Scheduler ("worker C", worker_a)); - - // loop 0: - // test the Schedulers when they are not active. - // now the method objects will be created but since - // there is no active thread they will also be - // immediately executed, in the "main" thread. - // loop 1: - // do the same test but with the schedulers - // activated - for (int i = 0; i < 2; i++) - { - if (i == 1) - { - worker_a->open (); - worker_b->open (); - worker_c->open (); - } - - ACE_Future<u_long> fresulta = worker_a->work (9013); - ACE_Future<u_long> fresultb = worker_b->work (9013); - ACE_Future<u_long> fresultc = worker_c->work (9013); - - if (i == 0) - { - if (!fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker A is should be ready!!!\n")); - if (!fresultb.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker B is should be ready!!!\n")); - if (!fresultc.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker C is should be ready!!!\n")); - } - - // When the workers are active we will block here until the - // results are available. - - u_long resulta = fresulta; - u_long resultb = fresultb; - u_long resultc = fresultc; - - ACE_Future<char *> fnamea = worker_a->name (); - ACE_Future<char *> fnameb = worker_b->name (); - ACE_Future<char *> fnamec = worker_c->name (); - - char *namea = fnamea; - char *nameb = fnameb; - char *namec = fnamec; - - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %u\n", - namea, (u_int) resulta)); - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %u\n", - nameb, (u_int) resultb)); - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %u\n", - namec, (u_int) resultc)); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d before end ()\n", - (int) scheduler_open_count)); - - worker_a->end (); - worker_b->end (); - worker_c->end (); - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d immediately after end ()\n", - (int) scheduler_open_count)); - - ACE_OS::sleep (2); - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d after waiting\n", - (int) scheduler_open_count)); - // @@ Can we safely delete worker_a, worker_b, and worker_c? -} - -static void -test_cancellation (int n_iterations) -{ - ACE_DEBUG ((LM_DEBUG," (%t) testing cancellation of a future...\n")); - - // Now test the cancelling a future. - - Scheduler *worker_a; - ACE_NEW (worker_a, Scheduler ("worker A")); - worker_a->open (); - - ACE_Future<u_long> fresulta = worker_a->work (9013, n_iterations); - - // save the result by copying the future - ACE_Future<u_long> fresultb = fresulta; - - // now we cancel the first future.. but the - // calculation will still go on... - fresulta.cancel (10); - - if (!fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: future A is should be ready!!!\n")); - - u_long resulta = fresulta; - - ACE_DEBUG ((LM_DEBUG, " (%t) cancelled result %u\n", (u_int) resulta)); - - if (resulta != 10) - ACE_DEBUG ((LM_DEBUG, " (%t) cancelled result should be 10!!\n", resulta)); - - resulta = fresultb; - - ACE_DEBUG ((LM_DEBUG, " (%t) true result %u\n", (u_int) resulta)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? -} - -static void -test_timeout (int n_iterations) -{ - ACE_DEBUG ((LM_DEBUG," (%t) testing timeout on waiting for the result...\n")); - Scheduler *worker_a; - ACE_NEW (worker_a, Scheduler ("worker A")); - worker_a->open (); - - ACE_Future<u_long> fresulta = worker_a->work (9013, 2 * n_iterations); - - // Should immediately return... and we should see an error... - ACE_Time_Value *delay; - ACE_NEW (delay, ACE_Time_Value (1)); - - u_long resulta; - fresulta.get (resulta, delay); - - if (fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: future A is should not be ready!!!\n")); - else - ACE_DEBUG ((LM_DEBUG," (%t) timed out on future A\n")); - - // now we wait until we are done... - fresulta.get (resulta); - ACE_DEBUG ((LM_DEBUG, " (%t) result %u\n", (u_int) resulta)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? -} - -int -main (int, char *[]) -{ - int n_iterations = determine_iterations (); - - test_active_object (n_iterations); - test_cancellation (n_iterations); - test_timeout (n_iterations); - - ACE_DEBUG ((LM_DEBUG," (%t) that's all folks!\n")); - - ACE_OS::sleep (5); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -template class ACE_Future<char *>; -template class ACE_Future<u_long>; -template class ACE_Future_Rep<char *>; -template class ACE_Future_Rep<u_long>; -template class auto_ptr<ACE_Method_Object>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/manual_event.cpp b/examples/Threads/manual_event.cpp deleted file mode 100644 index 65e08920d05..00000000000 --- a/examples/Threads/manual_event.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// The test shows the use of an ACE_Manual_Event to create a -// $Id$ - -// Pseudo_Barrier. Multiple threads are created which do the -// following: -// -// 1. work -// 2. synch with other threads -// 3. more work -// -// ACE_Manual_Event is use to synch with other -// threads. ACE_Manual_Event::signal() is used for broadcasting. - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) -static ACE_Atomic_Op <ACE_Thread_Mutex, int> amount_of_work = (u_long) 0; - -class Pseudo_Barrier - // = TITLE - // A barrier class using ACE manual-reset events. - // - // = DESCRIPTION - // This is *not* a real barrier. - // Pseudo_Barrier is more like a ``one shot'' barrier. - // All waiters after the Nth waiter are allowed to go. - // The barrier does not reset after the Nth waiter. - // For an example of a real barrier, please see class ACE_Barrier. -{ -public: - Pseudo_Barrier (u_long count); - - int wait (void); - -private: - ACE_Atomic_Op <ACE_Thread_Mutex, int> counter_; - ACE_Manual_Event event_; -}; - -Pseudo_Barrier::Pseudo_Barrier (u_long count) - : counter_ (count) -{ -} - -int -Pseudo_Barrier::wait (void) -{ - if (--this->counter_ == 0) - return this->event_.signal (); - else - return this->event_.wait (); -} - -static void * -worker (void *arg) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - Pseudo_Barrier &barrier = *(Pseudo_Barrier *) arg; - - // work - ACE_DEBUG ((LM_DEBUG, "(%t) working (%d secs)\n", ++::amount_of_work)); - ACE_OS::sleep (::amount_of_work); - - // synch with everybody else - ACE_DEBUG ((LM_DEBUG, "(%t) waiting to synch with others \n")); - barrier.wait (); - - // more work - ACE_DEBUG ((LM_DEBUG, "(%t) more work (%d secs)\n", ++::amount_of_work)); - ACE_OS::sleep (amount_of_work); - - ACE_DEBUG ((LM_DEBUG, "(%t) dying \n")); - - return 0; -} - -int -main (int argc, char **argv) -{ - int n_threads = argc == 2 ? atoi (argv[1]) : 5; - - ACE_Thread_Manager &tm = *ACE_Service_Config::thr_mgr (); - - // synch object shared by all threads - Pseudo_Barrier barrier (n_threads); - - // create workers - if (tm.spawn_n (n_threads, worker, &barrier) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread creates for worker failed"), -1); - - // wait for all workers to exit - if (tm.wait () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread wait failed"), -1); - else - ACE_DEBUG ((LM_ERROR, "graceful exit\n")); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/process_manager.cpp b/examples/Threads/process_manager.cpp deleted file mode 100644 index b8499b8056a..00000000000 --- a/examples/Threads/process_manager.cpp +++ /dev/null @@ -1,145 +0,0 @@ -// $Id$ - -// Test out the mechanisms provided by the ACE_Process_Manager. - -#include "ace/Service_Config.h" -#include "ace/Process_Manager.h" - -#if !defined (ACE_WIN32) && defined (ACE_HAS_THREADS) - -// Global process manager. -static ACE_Process_Manager proc_mgr; - -void * -sig_handler (void *) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - ACE_Sig_Set sigset; - - // Register a dummy signal handler so that our disposition isn't - // SIG_IGN (which is the default). - ACE_Sig_Action sa ((ACE_SignalHandler) sig_handler, SIGCHLD); - ACE_UNUSED_ARG (sa); - - // Register signal handlers. - sigset.sig_add (SIGINT); - sigset.sig_add (SIGCHLD); - - for (;;) - { - int signum = ACE_OS::sigwait (sigset); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) received signal %S\n", - signum)); - - switch (signum) - { - case SIGINT: - // Shutdown using <ACE_OS::exit>. - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) shutting down %n%a\n", 1)); - /* NOTREACHED */ - case SIGCHLD: - - for (;;) - { - pid_t pid = proc_mgr.reap (); - - switch (pid) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "reap"), 0); - /* NOTREACHED */ - default: - ACE_DEBUG ((LM_DEBUG, "(%P|%t) reaped pid %d\n", pid)); - } - } - - break; - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "sigwait"), 0); - /* NOTREACHED */ - default: - ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) signal %S unexpected\n", signum), 0); - /* NOTREACHED */ - } - } -} - -static void -worker (size_t iterations) -{ - for (size_t i = 0; i < iterations; i++) - if ((i % 100) == 0) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) sleeping\n")); - ACE_OS::sleep (5); - } -} - -extern "C" void -exithook (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%P|%t) later...\n")); -} - -static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; -static const int DEFAULT_ITERATIONS = 100000; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - daemon.open (argv[0]); - - ::atexit (exithook); - - ACE_Sig_Set sigset (1); // Block all signals. - - if (ACE_OS::thr_sigsetmask (SIG_BLOCK, sigset, 0) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "thr_sigsetmask"), 1); - else if (ACE_Service_Config::thr_mgr ()->spawn (sig_handler, 0, THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn"), 1); - - int n_processes = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS; - ACE_UNUSED_ARG (n_processes); - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - pid_t pid = proc_mgr.start (0); - - switch (pid) - { - case -1: - ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p\n", "start_n"), 1); - /* NOTREACHED */ - case 0: - worker (n_iterations); - break; - /* NOTREACHED */ - default: - // Give the child a chance to start running. - ACE_OS::sleep (1); - - // Shutdown the child. - if (proc_mgr.kill (pid, SIGINT) == -1) - ACE_ERROR_RETURN ((LM_DEBUG, "(%P|%t) %p\n", "kill"), 1); - - // Perform a barrier wait until all the processes and threads - // have shut down. - proc_mgr.wait (); - ACE_Service_Config::thr_mgr ()->wait (); - } - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, "process manager not supported on this platform\n"), -1); -} -#endif /* !ACE_WIN32 && ACE_HAS_THREADS */ diff --git a/examples/Threads/process_mutex.cpp b/examples/Threads/process_mutex.cpp deleted file mode 100644 index 7a69d7d6faa..00000000000 --- a/examples/Threads/process_mutex.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// $Id$ - -// This program tests ACE_Process_Mutexes. To run it, open 3 or 4 -// windows and run this program in each window... - -#include "ace/Synch.h" -#include "ace/Signal.h" - -#if defined (ACE_HAS_THREADS) - -static sig_atomic_t done; - -extern "C" void -handler (int) -{ - done = 1; -} - -int -main (int argc, char *argv[]) -{ - char *name = argc > 1 ? argv[1] : "hello"; - int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 100; - - ACE_Process_Mutex pm (name); - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - ACE_UNUSED_ARG (sa); - - for (int i = 0; i < iterations && !done; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquiring\n")); - if (pm.acquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "acquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquired\n")); - - ACE_OS::sleep (3); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - - if (pm.tryacquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "tryacquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = tryacquire\n")); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - } - - if (argc > 2) - pm.remove (); - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/process_semaphore.cpp b/examples/Threads/process_semaphore.cpp deleted file mode 100644 index a5249083344..00000000000 --- a/examples/Threads/process_semaphore.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// $Id$ - -// This program tests ACE_Process_Semaphore. To run it, open 3 or 4 -// windows and run this program in each window... - -#include "ace/Synch.h" -#include "ace/Signal.h" - -static sig_atomic_t done; - -extern "C" void -handler (int) -{ - done = 1; -} - -int -main (int argc, char *argv[]) -{ - char *name = argc == 1 ? "hello" : argv[1]; - int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 100; - - ACE_Process_Semaphore pm (1, name); - - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - ACE_UNUSED_ARG (sa); - - for (int i = 0; i < iterations && !done; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquiring\n")); - if (pm.acquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "acquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquired\n")); - - ACE_OS::sleep (3); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - - if (pm.tryacquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "tryacquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = tryacquire\n")); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - } - - if (argc > 2) - pm.remove (); - return 0; -} - diff --git a/examples/Threads/reader_writer.cpp b/examples/Threads/reader_writer.cpp deleted file mode 100644 index 5d343f1ab48..00000000000 --- a/examples/Threads/reader_writer.cpp +++ /dev/null @@ -1,190 +0,0 @@ -// This test program verifies the functionality of the ACE_OS -// $Id$ - -// implementation of readers/writer locks on Win32 and Posix pthreads. - - -#include "ace/Synch.h" -#include "ace/Thread.h" -#include "ace/Thread_Manager.h" -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_THREADS) - -// Default number of iterations. -static int n_iterations = 1000; - -// Default number of loops. -static int n_loops = 100; - -// Default number of readers. -static int n_readers = 6; - -// Default number of writers. -static int n_writers = 2; - -// Thread id of last writer. -static volatile int shared_data; - -// Lock for shared_data. -static ACE_RW_Mutex rw_mutex; - -// Count of the number of readers and writers. -ACE_Atomic_Op<ACE_Thread_Mutex, int> current_readers, current_writers; - -// Thread manager -static ACE_Thread_Manager thr_mgr; - -// Explain usage and exit. -static void -print_usage_and_die (void) -{ - ACE_DEBUG ((LM_DEBUG, - "usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n")); - ACE_OS::exit (1); -} - -// Parse the command-line arguments and set options. -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "r:w:n:l:"); - - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 'r': - n_readers = ACE_OS::atoi (get_opt.optarg); - break; - case 'w': - n_writers = ACE_OS::atoi (get_opt.optarg); - break; - case 'n': - n_iterations = ACE_OS::atoi (get_opt.optarg); - break; - case 'l': - n_loops = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -// Iterate <n_iterations> each time checking that nobody modifies the data -// while we have a read lock. - -static void * -reader (void *) -{ - ACE_Thread_Control tc (&thr_mgr); - ACE_DEBUG ((LM_DEBUG, "(%t) reader starting\n")); - - for (int iterations = 1; iterations <= n_iterations; iterations++) - { - ACE_Read_Guard<ACE_RW_Mutex> g(rw_mutex); - //int n = ++current_readers; - //ACE_DEBUG ((LM_DEBUG, "(%t) I'm reader number %d\n", n)); - - if (current_writers > 0) - ACE_DEBUG ((LM_DEBUG, "(%t) writers found!!!\n")); - - int data = shared_data; - - for (int loop = 1; loop <= n_loops; loop++) - { - ACE_Thread::yield(); - if (shared_data != data) - ACE_DEBUG ((LM_DEBUG, - "(%t) somebody changed %d to %d\n", - data, shared_data)); - } - - --current_readers; - //ACE_DEBUG ((LM_DEBUG, "(%t) done with reading guarded data\n")); - - ACE_Thread::yield (); - } - return 0; -} - -// Iterate <n_iterations> each time modifying the global data -// and checking that nobody steps on it while we can write it. - -static void * -writer (void *) -{ - ACE_Thread_Control tc (&thr_mgr); - ACE_DEBUG ((LM_DEBUG, "(%t) writer starting\n")); - - for (int iterations = 1; iterations <= n_iterations; iterations++) - { - ACE_Write_Guard<ACE_RW_Mutex> g(rw_mutex); - - ++current_writers; - //ACE_DEBUG ((LM_DEBUG, "(%t) writing to guarded data\n")); - - if (current_writers > 1) - ACE_DEBUG ((LM_DEBUG, "(%t) other writers found!!!\n")); - - if (current_readers > 0) - ACE_DEBUG ((LM_DEBUG, "(%t) readers found!!!\n")); - - int self = (int) ACE_Thread::self (); - shared_data = self; - - for (int loop = 1; loop <= n_loops; loop++) - { - ACE_Thread::yield(); - if (shared_data != self) - ACE_DEBUG ((LM_DEBUG, "(%t) somebody wrote on my data %d\n", shared_data)); - } - - --current_writers; - - //ACE_DEBUG ((LM_DEBUG, "(%t) done with guarded data\n")); - ACE_Thread::yield (); - } - return 0; -} - -// Spawn off threads. - -int main (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - parse_args (argc, argv); - - current_readers = 0; // Possibly already done - current_writers = 0; // Possibly already done - - ACE_DEBUG ((LM_DEBUG, "(%t) main thread starting\n")); - - if (thr_mgr.spawn_n (n_readers, reader, 0, THR_NEW_LWP) == -1 || - thr_mgr.spawn_n (n_writers, writer, 0, THR_NEW_LWP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - - thr_mgr.wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) exiting main thread\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -template class ACE_Guard<ACE_RW_Mutex>; -template class ACE_Read_Guard<ACE_RW_Mutex>; -template class ACE_Write_Guard<ACE_RW_Mutex>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ - diff --git a/examples/Threads/recursive_mutex.cpp b/examples/Threads/recursive_mutex.cpp deleted file mode 100644 index 1cc2892b2a8..00000000000 --- a/examples/Threads/recursive_mutex.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// $Id$ - -// This test program verifies the functionality of the ACE_OS -// implementation of recursive mutexes on Win32 and Posix pthreads. - -#include "ace/Service_Config.h" -#include "ace/Get_Opt.h" -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -// Total number of iterations. -static size_t n_iterations = 1000; -static size_t n_threads = 4; - -// Explain usage and exit. -static void -print_usage_and_die (void) -{ - ACE_DEBUG ((LM_DEBUG, - "usage: %n [-t n_threads] [-n iteration_count]\n")); - ACE_OS::exit (1); -} - -// Parse the command-line arguments and set options. - -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "n:t:"); - - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 'n': - n_iterations = ACE_OS::atoi (get_opt.optarg); - break; - case 't': - n_threads = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -static void -recursive_worker (size_t nesting_level, - ACE_Recursive_Thread_Mutex *rm) -{ - if (nesting_level < n_iterations) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = trying to acquire, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - { - // This illustrates the use of the ACE_Guard<LOCK> with an - // ACE_Recursive_Thread_Mutex. - ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, *rm); - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = acquired, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - - recursive_worker (nesting_level + 1, rm); - } - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = released, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - } -} - -static void * -worker (void *arg) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - ACE_Recursive_Thread_Mutex *rm = (ACE_Recursive_Thread_Mutex *) arg; - - recursive_worker (0, rm); - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - parse_args (argc, argv); - ACE_Recursive_Thread_Mutex rm; - - ACE_Service_Config::thr_mgr ()->spawn_n (n_threads, - ACE_THR_FUNC (worker), - (void *) &rm); - - ACE_Service_Config::thr_mgr ()->wait (); - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support process mutexes on this platform (yet)\n"), - -1); -} -#endif /* ACE_WIN32 */ diff --git a/examples/Threads/task_four.cpp b/examples/Threads/task_four.cpp deleted file mode 100644 index 6bcaac7962d..00000000000 --- a/examples/Threads/task_four.cpp +++ /dev/null @@ -1,253 +0,0 @@ -// $Id$ - -// The following test was written by Hamutal Yanay & Ari Erev's -// (Ari_Erev@comverse.com). -// -// This test program test enhancements to the thread_manager and task -// classes. The purpose of these enhancements was to allow the -// thread_manager to recognize the concept of an ACE_Task and to be -// able to group ACE_Tasks in groups. -// -// There are two main ACE_Tasks in this sample: -// -// Invoker_Task - is run from main (). It's purpose is to run a number of -// ACE_Tasks of type Worker_Task. The number can be specified -// on the command line. -// After starting the tasks, the Invoker_Task groups all the tasks -// in one group and then uses the -// num_tasks_in_group () to find out if the real number of tasks -// that are now running (should be the same as the number of tasks -// started). -// It also, suspends and resumes all the threads in the group to -// test the suspend_grp () and resume_grp () methods. -// Then it waits for all the tasks to end. -// -// Worker_Task - ACE_Tasks that are started by the Invoker_Task. -// Each Worker_Task can start a number of threads. -// The Worker_Task threads perform some work (iteration). The number -// of the iterations can be specified on the command line. -// -// The command line syntax is: -// -// test_task [num_tasks] [num_threads] [num_iterations] - -#include "ace/Task.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_THREADS) - -#include "ace/Task.h" - -class Invoker_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Invoker_Task (ACE_Thread_Manager *thr_mgr, - size_t n_tasks, - size_t n_threads, - size_t n_iterations); - virtual int svc (void); - // creats <n_tasks> and wait for them to finish - -private: - size_t n_tasks_; - // Number of tasks to start. - size_t n_threads_; - // Number of threads per task. - size_t n_iterations_; - // Number of iterations per thread. -}; - -class Worker_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Worker_Task (ACE_Thread_Manager *thr_mgr, - size_t n_threads, - size_t n_iterations); - virtual int svc (void); - // Does a small work... - virtual int open (void * = NULL); - -private: - static size_t workers_count_; - size_t index_; - size_t n_threads_; - size_t n_iterations_; - - // = Not needed for this test. - virtual int close (u_long); - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -size_t Worker_Task::workers_count_ = 1; - -int -Worker_Task::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) closing task %d\n", this->index_)); - delete this; - return 0; -} - -Worker_Task::Worker_Task (ACE_Thread_Manager *thr_mgr, - size_t n_threads, - size_t n_iterations) - : ACE_Task<ACE_MT_SYNCH> (thr_mgr), - index_ (Worker_Task::workers_count_++), - n_threads_ (n_threads), - n_iterations_ (n_iterations) -{ -} - -int -Worker_Task::open (void *) -{ - // Create worker threads. - return this->activate (THR_NEW_LWP, n_threads_, 0, -1, -1, this); -} - -int -Worker_Task::svc (void) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) in worker %d\n", index_)); - - for (size_t iterations = 1; - iterations <= this->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, " (%t) in iteration %d\n", iterations)); - ACE_OS::sleep (0); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) worker %d ends\n", index_)); - - return 0; -} - -Invoker_Task::Invoker_Task (ACE_Thread_Manager *thr_mgr, - size_t n_tasks, - size_t n_threads, - size_t n_iterations) - : n_tasks_ (n_tasks), - n_threads_ (n_threads), - n_iterations_ (n_iterations), - ACE_Task<ACE_MT_SYNCH> (thr_mgr) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, 1, 0, -1, -1, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Invoker_Task::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us to - // the Thread_Manager when the thread begins. - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - Worker_Task **worker_task = new Worker_Task *[n_tasks_]; - - size_t task; - - for (task = 0; - task < this->n_tasks_; - task++) - { - ACE_DEBUG ((LM_DEBUG, " (%t) in task %d\n", task+1)); - - ACE_NEW_RETURN (worker_task[task], - Worker_Task (thr_mgr, n_threads_, n_iterations_), - -1); - - if (worker_task[task]->open () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open failed"), -1); - } - - // Set all tasks to be one group - ACE_DEBUG ((LM_DEBUG, " (%t) setting tasks group id\n")); - - for (task = 0; - task < this->n_tasks_; - task++) - if (thr_mgr->set_grp (worker_task[task], 1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "set_grp")); - - size_t n_tasks = thr_mgr->num_tasks_in_group (1); - cout << "Number of tasks in group 1: " << n_tasks << endl; - - // Wait for 1 second and then suspend every thread in the group. - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, " (%t) suspending group\n")); - - if (thr_mgr->suspend_grp (1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "suspend_grp")); - - // Wait for 3 more second and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (2)); - - ACE_DEBUG ((LM_DEBUG, " (%t) resuming group\n")); - - if (thr_mgr->resume_grp (1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "resume_grp")); - - // Wait for all the tasks to reach their exit point. - thr_mgr->wait (); - - // Note that the ACE_Task::svc_run () method automatically removes - // us from the Thread_Manager when the thread exits. - - return 0; -} - -// Default number of tasks and iterations. -static const size_t DEFAULT_TASKS = 4; -static const size_t DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - size_t n_tasks = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_TASKS; - size_t n_threads = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_THREADS; - size_t n_iterations = argc > 3 ? ACE_OS::atoi (argv[3]) : DEFAULT_ITERATIONS; - - // Since ACE_Thread_Manager can only wait for all threads, we'll - // have special manager for the Invoker_Task. - ACE_Thread_Manager invoker_manager; - - Invoker_Task invoker (&invoker_manager, - n_tasks, - n_threads, - n_iterations); - - // Wait for 1 second and then suspend the invoker task - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, " (%t) suspending invoker task\n")); - - if (invoker_manager.suspend_task (&invoker) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "suspend_task")); - - // Wait for 3 more second and then resume the invoker task. - ACE_OS::sleep (ACE_Time_Value (3)); - - ACE_DEBUG ((LM_DEBUG, " (%t) resuming invoker task\n")); - - if (invoker_manager.resume_task (&invoker) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "resume_task")); - - // Wait for all the threads to reach their exit point. - invoker_manager.wait (); - - ACE_DEBUG ((LM_DEBUG, " (%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/task_one.cpp b/examples/Threads/task_one.cpp deleted file mode 100644 index 7acf8de3789..00000000000 --- a/examples/Threads/task_one.cpp +++ /dev/null @@ -1,99 +0,0 @@ -// This test program illustrates how the ACE barrier synchronization -// $Id$ - -// mechanisms work in conjunction with the ACE_Task and the -// ACE_Thread_Manager. It is instructive to compare this with the -// test_barrier.cpp test to see how they differ. - -#include "ace/Task.h" -#include "ace/Service_Config.h" - - -#if defined (ACE_HAS_THREADS) - -#include "ace/Task.h" - -class Barrier_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations); - - virtual int svc (void); - // Iterate <n_iterations> time printing off a message and "waiting" - // for all other threads to complete this iteration. - -private: - ACE_Barrier barrier_; - // Reference to the tester barrier. This controls each - // iteration of the tester function running in every thread. - - int n_iterations_; - // Number of iterations to run. -}; - -Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations) - : ACE_Task<ACE_MT_SYNCH> (thr_mgr), - barrier_ (n_threads), - n_iterations_ (n_iterations) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Barrier_Task::svc (void) -{ - // Note that the ACE_Task::svc_run() method automatically adds us to - // the Thread_Manager when the thread begins. - - for (int iterations = 1; - iterations <= this->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations)); - - // Block until all other threads have waited, then continue. - this->barrier_.wait (); - } - - // Note that the ACE_Task::svc_run() method automatically removes us - // from the Thread_Manager when the thread exits. - - return 0; -} - -// Default number of threads to spawn. -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - Barrier_Task barrier_task (ACE_Service_Config::thr_mgr (), - n_threads, - n_iterations); - - // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/task_three.cpp b/examples/Threads/task_three.cpp deleted file mode 100644 index bdfae9b0e0b..00000000000 --- a/examples/Threads/task_three.cpp +++ /dev/null @@ -1,224 +0,0 @@ -// $Id$ - -// Exercise more tests for the ACE Tasks. This also shows off some -// Interesting uses of the ACE Log_Msg's ability to print to ostreams. -// BTW, make sure that you set the out_stream in *every* thread that -// you want to have write to the output file, i.e.: -// -// -// if (out_stream) -// { -// ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); -// ACE_LOG_MSG->msg_ostream (out_stream); -// } - -#include <fstream.h> -#include "ace/Reactor.h" -#include "ace/Service_Config.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -static ofstream *out_stream = 0; - -static const size_t NUM_INVOCATIONS = 100; -static const size_t TASK_COUNT = 130; - -class Test_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Test_Task (void); - ~Test_Task (void); - - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int svc (void); - - virtual int handle_input (ACE_HANDLE fd); - - ACE_Reactor *r_; - size_t handled_; - static size_t current_count_; - static size_t done_cnt_; -}; - -size_t Test_Task::current_count_ = 0; -size_t Test_Task::done_cnt_ = 0; - -static ACE_Thread_Mutex lock_; - -Test_Task::Test_Task (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - this->handled_ = 0; - Test_Task::current_count_++; - ACE_DEBUG ((LM_DEBUG, - "Test_Task constructed, current_count_ = %d\n", - Test_Task::current_count_)); -} - -Test_Task::~Test_Task (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - ACE_DEBUG ((LM_DEBUG, "Test_Task destroyed, current_count_ = %d\n", - Test_Task::current_count_)); -} - -int -Test_Task::open (void *args) -{ - r_ = (ACE_Reactor *) args; - return ACE_Task<ACE_MT_SYNCH>::activate (THR_NEW_LWP); -} - -int -Test_Task::close (u_long) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - - Test_Task::current_count_--; - ACE_DEBUG ((LM_DEBUG, "Test_Task::close () current_count_ = %d.\n", - Test_Task::current_count_)); - return 0; -} - -int -Test_Task::svc (void) -{ - // Every thread must register the same stream to write to file. - if (out_stream) - { - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - for (size_t index = 0; index < NUM_INVOCATIONS; index++) - { - ACE_OS::thr_yield (); - - if (r_->notify (this, ACE_Event_Handler::READ_MASK)) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - - ACE_DEBUG ((LM_DEBUG, "Test_Task: error notifying reactor!\n")); - } - } - - ACE_DEBUG ((LM_DEBUG, " (%t) returning from svc ()\n")); - return 0; -} - -int -Test_Task::handle_input (ACE_HANDLE) -{ - this->handled_++; - - if (this->handled_ == NUM_INVOCATIONS) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - Test_Task::done_cnt_++; - ACE_DEBUG ((LM_DEBUG, - " (%t) Test_Task: handle_input! done_cnt_ = %d.\n", - Test_Task::done_cnt_)); - } - - ACE_OS::thr_yield (); - return -1; -} - -static void * -dispatch (void *arg) -{ - // every thread must register the same stream to write to file - if (out_stream) - { - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) Dispatcher Thread started!\n")); - ACE_Reactor *r = (ACE_Reactor *) arg; - int result; - - r->owner (ACE_OS::thr_self ()); - - while (1) - { - result = r->handle_events (); - if (result <= 0) - ACE_DEBUG ((LM_DEBUG, "Dispatch: handle_events (): %d", result)); - } - - return 0; -} - -extern "C" void -handler (int) -{ - *out_stream << flush; - out_stream->close (); - ACE_OS::exit (42); -} - -int -main (int argc, char **) -{ - if (argc > 1) - { - // Send output to file. - ACE_NEW_RETURN (out_stream, ofstream ("test_task_three.out", ios::trunc|ios::out), -1); - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - ACE_UNUSED_ARG (sa); - - ACE_Reactor *reactor1 = ACE_Service_Config::reactor (); - ACE_Reactor *reactor2 = new ACE_Reactor (); - - Test_Task t1[TASK_COUNT]; - Test_Task t2[TASK_COUNT]; - - ACE_Thread::spawn (ACE_THR_FUNC (dispatch), reactor2); - - reactor1->owner (ACE_OS::thr_self ()); - - for (size_t index = 0; index < TASK_COUNT; index++) - { - t1[index].open (reactor1); - t2[index].open (reactor2); - } - - ACE_OS::sleep (3); - - for (;;) - { - ACE_Time_Value timeout (2); - - if (reactor1->handle_events (timeout) <= 0) - { - if (errno == ETIME) - { - ACE_DEBUG ((LM_DEBUG, "no activity within 2 seconds, shutting down\n")); - break; - } - else - ACE_ERROR ((LM_ERROR, "%p error handling events\n", "main")); - } - } - - return 0; -} - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/task_two.cpp b/examples/Threads/task_two.cpp deleted file mode 100644 index 9ac9386a171..00000000000 --- a/examples/Threads/task_two.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// $Id$ - -// Exercise more tests for the ACE Tasks. This test can spawn off -// zillions of tasks and then wait for them using both polling and the -// ACE Thread Manager. - -#include "ace/Task.h" - -#include "ace/Service_Config.h" -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op<ACE_Thread_Mutex, int> ATOMIC_INT; - -static int zero = 0; -static ATOMIC_INT task_count (zero); -static ATOMIC_INT max_count (zero); -static ATOMIC_INT wait_count (zero); - -static int n_threads = 0; - -// Default number of tasks. -static const int default_threads = ACE_DEFAULT_THREADS; - -// Default number of times to run the test. -static const int default_iterations = 1000; - -class Task_Test : public ACE_Task<ACE_MT_SYNCH> -{ -public: - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int svc (void); - -private: - static ACE_Thread_Mutex lock_; -}; - -ACE_Thread_Mutex Task_Test::lock_; - -int -Task_Test::open (void *) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Task_Test::lock_, -1); - - task_count++; - ACE_DEBUG ((LM_DEBUG, "(%t) creating Task_Test, task count = %d\n", - (int) task_count)); - - return this->activate (THR_BOUND); -} - -int -Task_Test::close (u_long) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Task_Test::lock_, -1); - - task_count--; - ACE_DEBUG ((LM_DEBUG, "(%t) destroying Task_Test, task count = %d\n", - (int) task_count)); - wait_count--; - return 0; -} - -int -Task_Test::svc (void) -{ - wait_count++; - max_count++; - - ACE_DEBUG ((LM_DEBUG, "(%t) svc: waiting\n")); - - for (;;) - if (max_count >= n_threads) - break; - else - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, "(%t) svc: finished waiting\n")); - return 0; -} - -int -main (int argc, char *argv[]) -{ - n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : default_threads; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : default_iterations; - - Task_Test **task_array = new Task_Test *[n_threads]; - - for (int i = 1; i <= n_iterations; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) iteration = %d, max_count %d\n", - i, (int) max_count)); - max_count = 0; - - ACE_DEBUG ((LM_DEBUG, "(%t) starting %d task%s\n", - n_threads, n_threads == 1 ? "" : "s")); - - // Launch the new tasks. - for (int j = 0; j < n_threads; j++) - { - task_array[j] = new Task_Test; - // Activate the task, i.e., make it an active object. - task_array[j]->open (); - } - - // Wait for initialization to kick in. - while (max_count == 0) - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, "(%t) waiting for threads to finish\n")); - - // Wait for the threads to finish this iteration. - while (max_count != n_threads && wait_count != 0) - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, - "(%t) iteration %d finished, max_count %d, wait_count %d, waiting for tasks to exit\n", - i, (int) max_count, (int) wait_count)); - - // Wait for all the tasks to exit. - ACE_Service_Config::thr_mgr ()->wait (); - - // Delete the existing tasks. - for (int k = 0; k < n_threads; k++) - delete task_array[k]; - } - - delete [] task_array; - - ACE_DEBUG ((LM_DEBUG, "(%t) shutting down the test\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test.mak b/examples/Threads/test.mak deleted file mode 100644 index f2d13de07e7..00000000000 --- a/examples/Threads/test.mak +++ /dev/null @@ -1,3768 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-!IF "$(CFG)" == ""
-CFG=context_switch_time - Win32 Debug
-!MESSAGE No configuration specified. Defaulting to context_switch_time - Win32\
- Debug.
-!ENDIF
-
-!IF "$(CFG)" != "auto_event - Win32 Debug" && "$(CFG)" !=\
- "barrier1 - Win32 Debug" && "$(CFG)" != "barrier2 - Win32 Debug" && "$(CFG)" !=\
- "cancel - Win32 Debug" && "$(CFG)" != "future1 - Win32 Debug" && "$(CFG)" !=\
- "future2 - Win32 Debug" && "$(CFG)" != "manual_event - Win32 Debug" && "$(CFG)"\
- != "process_mutex - Win32 Debug" && "$(CFG)" !=\
- "process_semaphore - Win32 Debug" && "$(CFG)" != "reader_writer - Win32 Debug"\
- && "$(CFG)" != "recursive_mutex - Win32 Debug" && "$(CFG)" !=\
- "task_one - Win32 Debug" && "$(CFG)" != "task_two - Win32 Debug" && "$(CFG)" !=\
- "task_three - Win32 Debug" && "$(CFG)" != "task_four - Win32 Debug" && "$(CFG)"\
- != "thread_manager - Win32 Debug" && "$(CFG)" != "thread_pool - Win32 Debug" &&\
- "$(CFG)" != "thread_specific - Win32 Debug" && "$(CFG)" !=\
- "token - Win32 Debug" && "$(CFG)" != "tss1 - Win32 Debug" && "$(CFG)" !=\
- "tss2 - Win32 Debug" && "$(CFG)" != "context_switch_time - Win32 Debug"
-!MESSAGE Invalid configuration "$(CFG)" specified.
-!MESSAGE You can specify a configuration when running NMAKE on this makefile
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "test.mak" CFG="context_switch_time - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "auto_event - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "barrier1 - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "barrier2 - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "cancel - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "future1 - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "future2 - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "manual_event - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "process_mutex - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "process_semaphore - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "reader_writer - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "recursive_mutex - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "task_one - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "task_two - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "task_three - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "task_four - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "thread_manager - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "thread_pool - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "thread_specific - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE "token - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "tss1 - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "tss2 - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "context_switch_time - Win32 Debug" (based on\
- "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR An invalid configuration is specified.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-################################################################################
-# Begin Project
-# PROP Target_Last_Scanned "tss2 - Win32 Debug"
-RSC=rc.exe
-CPP=cl.exe
-
-!IF "$(CFG)" == "auto_event - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "auto_event\Debug"
-# PROP BASE Intermediate_Dir "auto_event\Debug"
-# PROP BASE Target_Dir "auto_event"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "auto_event"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\auto_event.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\auto_event.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\auto_event.exe"
- -@erase "$(OUTDIR)\auto_event.ilk"
- -@erase "$(OUTDIR)\auto_event.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/auto_event.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/auto_event.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/auto_event.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/auto_event.exe"
-LINK32_OBJS= \
- "$(INTDIR)\auto_event.obj"
-
-"$(OUTDIR)\auto_event.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "barrier1 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "barrier1\Debug"
-# PROP BASE Intermediate_Dir "barrier1\Debug"
-# PROP BASE Target_Dir "barrier1"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "barrier1"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\barrier1.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\barrier1.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\barrier1.exe"
- -@erase "$(OUTDIR)\barrier1.ilk"
- -@erase "$(OUTDIR)\barrier1.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/barrier1.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/barrier1.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/barrier1.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/barrier1.exe"
-LINK32_OBJS= \
- "$(INTDIR)\barrier1.obj"
-
-"$(OUTDIR)\barrier1.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "barrier2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "barrier2\Debug"
-# PROP BASE Intermediate_Dir "barrier2\Debug"
-# PROP BASE Target_Dir "barrier2"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "barrier2"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\barrier2.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\barrier2.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\barrier2.exe"
- -@erase "$(OUTDIR)\barrier2.ilk"
- -@erase "$(OUTDIR)\barrier2.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/barrier2.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/barrier2.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/barrier2.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/barrier2.exe"
-LINK32_OBJS= \
- "$(INTDIR)\barrier2.obj"
-
-"$(OUTDIR)\barrier2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "cancel - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "cancel\Debug"
-# PROP BASE Intermediate_Dir "cancel\Debug"
-# PROP BASE Target_Dir "cancel"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "cancel"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\cancel.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\cancel.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\cancel.exe"
- -@erase "$(OUTDIR)\cancel.ilk"
- -@erase "$(OUTDIR)\cancel.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/cancel.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/cancel.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/cancel.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/cancel.exe"
-LINK32_OBJS= \
- "$(INTDIR)\cancel.obj"
-
-"$(OUTDIR)\cancel.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "future1 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "future1\Debug"
-# PROP BASE Intermediate_Dir "future1\Debug"
-# PROP BASE Target_Dir "future1"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "future1"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\future1.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\future1.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\future1.exe"
- -@erase "$(OUTDIR)\future1.ilk"
- -@erase "$(OUTDIR)\future1.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/future1.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/future1.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/future1.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/future1.exe"
-LINK32_OBJS= \
- "$(INTDIR)\future1.obj"
-
-"$(OUTDIR)\future1.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "future2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "future2\Debug"
-# PROP BASE Intermediate_Dir "future2\Debug"
-# PROP BASE Target_Dir "future2"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "future2"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\future2.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\future2.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\future2.exe"
- -@erase "$(OUTDIR)\future2.ilk"
- -@erase "$(OUTDIR)\future2.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/future2.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/future2.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/future2.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/future2.exe"
-LINK32_OBJS= \
- "$(INTDIR)\future2.obj"
-
-"$(OUTDIR)\future2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "manual_event - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "manual_event\Debug"
-# PROP BASE Intermediate_Dir "manual_event\Debug"
-# PROP BASE Target_Dir "manual_event"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "manual_event"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\manual_event.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\manual_event.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\manual_event.exe"
- -@erase "$(OUTDIR)\manual_event.ilk"
- -@erase "$(OUTDIR)\manual_event.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/manual_event.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/manual_event.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/manual_event.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/manual_event.exe"
-LINK32_OBJS= \
- "$(INTDIR)\manual_event.obj"
-
-"$(OUTDIR)\manual_event.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "process_mutex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "process_mutex\Debug"
-# PROP BASE Intermediate_Dir "process_mutex\Debug"
-# PROP BASE Target_Dir "process_mutex"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "process_mutex"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\process_mutex.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\process_mutex.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\process_mutex.exe"
- -@erase "$(OUTDIR)\process_mutex.ilk"
- -@erase "$(OUTDIR)\process_mutex.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/process_mutex.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/process_mutex.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/process_mutex.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/process_mutex.exe"
-LINK32_OBJS= \
- "$(INTDIR)\process_mutex.obj"
-
-"$(OUTDIR)\process_mutex.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "process_semaphore - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "process_semaphore\Debug"
-# PROP BASE Intermediate_Dir "process_semaphore\Debug"
-# PROP BASE Target_Dir "process_semaphore"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "process_semaphore"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\process_semaphore.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\process_semaphore.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\process_semaphore.exe"
- -@erase "$(OUTDIR)\process_semaphore.ilk"
- -@erase "$(OUTDIR)\process_semaphore.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/process_semaphore.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/process_semaphore.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/process_semaphore.pdb"\
- /debug /machine:I386 /out:"$(OUTDIR)/process_semaphore.exe"
-LINK32_OBJS= \
- "$(INTDIR)\process_semaphore.obj"
-
-"$(OUTDIR)\process_semaphore.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "reader_writer - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "reader_writer\Debug"
-# PROP BASE Intermediate_Dir "reader_writer\Debug"
-# PROP BASE Target_Dir "reader_writer"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "reader_writer"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\reader_writer.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\reader_writer.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\reader_writer.exe"
- -@erase "$(OUTDIR)\reader_writer.ilk"
- -@erase "$(OUTDIR)\reader_writer.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/reader_writer.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/reader_writer.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/reader_writer.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/reader_writer.exe"
-LINK32_OBJS= \
- "$(INTDIR)\reader_writer.obj"
-
-"$(OUTDIR)\reader_writer.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "recursive_mutex - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "recursive_mutex\Debug"
-# PROP BASE Intermediate_Dir "recursive_mutex\Debug"
-# PROP BASE Target_Dir "recursive_mutex"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "recursive_mutex"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\recursive_mutex.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\recursive_mutex.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\recursive_mutex.exe"
- -@erase "$(OUTDIR)\recursive_mutex.ilk"
- -@erase "$(OUTDIR)\recursive_mutex.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/recursive_mutex.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/recursive_mutex.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/recursive_mutex.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/recursive_mutex.exe"
-LINK32_OBJS= \
- "$(INTDIR)\recursive_mutex.obj"
-
-"$(OUTDIR)\recursive_mutex.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "task_one - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "task_one\Debug"
-# PROP BASE Intermediate_Dir "task_one\Debug"
-# PROP BASE Target_Dir "task_one"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "task_one"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\task_one.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\task_one.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\task_one.exe"
- -@erase "$(OUTDIR)\task_one.ilk"
- -@erase "$(OUTDIR)\task_one.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/task_one.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/task_one.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/task_one.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/task_one.exe"
-LINK32_OBJS= \
- "$(INTDIR)\task_one.obj"
-
-"$(OUTDIR)\task_one.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "task_two - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "task_two\Debug"
-# PROP BASE Intermediate_Dir "task_two\Debug"
-# PROP BASE Target_Dir "task_two"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "task_two"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\task_two.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\task_two.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\task_two.exe"
- -@erase "$(OUTDIR)\task_two.ilk"
- -@erase "$(OUTDIR)\task_two.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/task_two.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/task_two.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/task_two.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/task_two.exe"
-LINK32_OBJS= \
- "$(INTDIR)\task_two.obj"
-
-"$(OUTDIR)\task_two.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "task_three - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "task_three\Debug"
-# PROP BASE Intermediate_Dir "task_three\Debug"
-# PROP BASE Target_Dir "task_three"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "task_three"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\task_three.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\task_three.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\task_three.exe"
- -@erase "$(OUTDIR)\task_three.ilk"
- -@erase "$(OUTDIR)\task_three.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/task_three.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/task_three.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/task_three.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/task_three.exe"
-LINK32_OBJS= \
- "$(INTDIR)\task_three.obj"
-
-"$(OUTDIR)\task_three.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "task_four - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "task_four\Debug"
-# PROP BASE Intermediate_Dir "task_four\Debug"
-# PROP BASE Target_Dir "task_four"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "task_four"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\task_four.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\task_four.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\task_four.exe"
- -@erase "$(OUTDIR)\task_four.ilk"
- -@erase "$(OUTDIR)\task_four.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/task_four.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/task_four.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/task_four.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/task_four.exe"
-LINK32_OBJS= \
- "$(INTDIR)\task_four.obj"
-
-"$(OUTDIR)\task_four.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "thread_manager - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "thread_manager\Debug"
-# PROP BASE Intermediate_Dir "thread_manager\Debug"
-# PROP BASE Target_Dir "thread_manager"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "thread_manager"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\thread_manager.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\thread_manager.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\thread_manager.exe"
- -@erase "$(OUTDIR)\thread_manager.ilk"
- -@erase "$(OUTDIR)\thread_manager.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/thread_manager.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/thread_manager.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/thread_manager.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/thread_manager.exe"
-LINK32_OBJS= \
- "$(INTDIR)\thread_manager.obj"
-
-"$(OUTDIR)\thread_manager.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "thread_pool - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "thread_pool\Debug"
-# PROP BASE Intermediate_Dir "thread_pool\Debug"
-# PROP BASE Target_Dir "thread_pool"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "thread_pool"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\thread_pool.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\thread_pool.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\thread_pool.exe"
- -@erase "$(OUTDIR)\thread_pool.ilk"
- -@erase "$(OUTDIR)\thread_pool.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/thread_pool.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/thread_pool.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/thread_pool.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/thread_pool.exe"
-LINK32_OBJS= \
- "$(INTDIR)\thread_pool.obj"
-
-"$(OUTDIR)\thread_pool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "thread_specific - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "thread_specific\Debug"
-# PROP BASE Intermediate_Dir "thread_specific\Debug"
-# PROP BASE Target_Dir "thread_specific"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "thread_specific"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\thread_specific.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\thread_specific.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\thread_specific.exe"
- -@erase "$(OUTDIR)\thread_specific.ilk"
- -@erase "$(OUTDIR)\thread_specific.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/thread_specific.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/thread_specific.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/thread_specific.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/thread_specific.exe"
-LINK32_OBJS= \
- "$(INTDIR)\thread_specific.obj"
-
-"$(OUTDIR)\thread_specific.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "token - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "token\Debug"
-# PROP BASE Intermediate_Dir "token\Debug"
-# PROP BASE Target_Dir "token"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "token"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\token.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\token.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\token.exe"
- -@erase "$(OUTDIR)\token.ilk"
- -@erase "$(OUTDIR)\token.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/token.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/token.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/token.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/token.exe"
-LINK32_OBJS= \
- "$(INTDIR)\token.obj"
-
-"$(OUTDIR)\token.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "tss1 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "tss1\Debug"
-# PROP BASE Intermediate_Dir "tss1\Debug"
-# PROP BASE Target_Dir "tss1"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "tss1"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\tss1.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\tss1.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\tss1.exe"
- -@erase "$(OUTDIR)\tss1.ilk"
- -@erase "$(OUTDIR)\tss1.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/tss1.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/tss1.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/tss1.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/tss1.exe"
-LINK32_OBJS= \
- "$(INTDIR)\tss1.obj"
-
-"$(OUTDIR)\tss1.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "tss2 - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "tss2\Debug"
-# PROP BASE Intermediate_Dir "tss2\Debug"
-# PROP BASE Target_Dir "tss2"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir ""
-# PROP Intermediate_Dir "Debug/"
-# PROP Target_Dir "tss2"
-OUTDIR=.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\tss2.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\tss2.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\tss2.exe"
- -@erase "$(OUTDIR)\tss2.ilk"
- -@erase "$(OUTDIR)\tss2.pdb"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/tss2.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x407 /d "_DEBUG"
-# ADD RSC /l 0x407 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/tss2.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
- /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/tss2.pdb" /debug\
- /machine:I386 /out:"$(OUTDIR)/tss2.exe"
-LINK32_OBJS= \
- "$(INTDIR)\tss2.obj"
-
-"$(OUTDIR)\tss2.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ELSEIF "$(CFG)" == "context_switch_time - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "context_switch_time\Debug"
-# PROP BASE Intermediate_Dir "context_switch_time\Debug"
-# PROP BASE Target_Dir "context_switch_time"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "."
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir "context_switch_time"
-OUTDIR=.\.
-INTDIR=.\Debug
-
-ALL : "$(OUTDIR)\context_switch_time.exe"
-
-CLEAN :
- -@erase "$(INTDIR)\context_switch_time.obj"
- -@erase "$(INTDIR)\vc40.idb"
- -@erase "$(INTDIR)\vc40.pdb"
- -@erase "$(OUTDIR)\context_switch_time.exe"
- -@erase "$(OUTDIR)\context_switch_time.ilk"
- -@erase "$(OUTDIR)\context_switch_time.pdb"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-"$(INTDIR)" :
- if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
-
-# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
-CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE"\
- /Fp"$(INTDIR)/context_switch_time.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-BSC32_FLAGS=/nologo /o"$(OUTDIR)/context_switch_time.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-# ADD LINK32 ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
-LINK32_FLAGS=ace.lib kernel32.lib user32.lib gdi32.lib winspool.lib\
- comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib\
- odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes\
- /pdb:"$(OUTDIR)/context_switch_time.pdb" /debug /machine:I386\
- /out:"$(OUTDIR)/context_switch_time.exe"
-LINK32_OBJS= \
- "$(INTDIR)\context_switch_time.obj"
-
-"$(OUTDIR)\context_switch_time.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-!ENDIF
-
-CPP_OBJS=.\Debug/
-CPP_SBRS=.\.
-
-.c{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_OBJS)}.obj:
- $(CPP) $(CPP_PROJ) $<
-
-.c{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cpp{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-.cxx{$(CPP_SBRS)}.sbr:
- $(CPP) $(CPP_PROJ) $<
-
-################################################################################
-# Begin Target
-
-# Name "auto_event - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\auto_event.cpp
-DEP_CPP_AUTO_=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\Singleton.cpp"\
- {$(INCLUDE)}"\ace\Singleton.h"\
- {$(INCLUDE)}"\ace\Singleton.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\auto_event.obj" : $(SOURCE) $(DEP_CPP_AUTO_) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "barrier1 - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\barrier1.cpp
-DEP_CPP_BARRI=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\barrier1.obj" : $(SOURCE) $(DEP_CPP_BARRI) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "barrier2 - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\barrier2.cpp
-DEP_CPP_BARRIE=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\barrier2.obj" : $(SOURCE) $(DEP_CPP_BARRIE) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "cancel - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\cancel.cpp
-DEP_CPP_CANCE=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\cancel.obj" : $(SOURCE) $(DEP_CPP_CANCE) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "future1 - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\future1.cpp
-DEP_CPP_FUTUR=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Activation_Queue.h"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\Auto_Ptr.cpp"\
- {$(INCLUDE)}"\ace\Auto_Ptr.h"\
- {$(INCLUDE)}"\ace\Auto_Ptr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Future.cpp"\
- {$(INCLUDE)}"\ace\Future.h"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Method_Object.h"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\future1.obj" : $(SOURCE) $(DEP_CPP_FUTUR) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "future2 - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\future2.cpp
-DEP_CPP_FUTURE=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Activation_Queue.h"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\Auto_Ptr.cpp"\
- {$(INCLUDE)}"\ace\Auto_Ptr.h"\
- {$(INCLUDE)}"\ace\Auto_Ptr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Future.cpp"\
- {$(INCLUDE)}"\ace\Future.h"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Method_Object.h"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\future2.obj" : $(SOURCE) $(DEP_CPP_FUTURE) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "manual_event - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\manual_event.cpp
-DEP_CPP_MANUA=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\manual_event.obj" : $(SOURCE) $(DEP_CPP_MANUA) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "process_mutex - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\process_mutex.cpp
-DEP_CPP_PROCE=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\process_mutex.obj" : $(SOURCE) $(DEP_CPP_PROCE) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "process_semaphore - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\process_semaphore.cpp
-DEP_CPP_PROCES=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\process_semaphore.obj" : $(SOURCE) $(DEP_CPP_PROCES) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "reader_writer - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\reader_writer.cpp
-DEP_CPP_READE=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\reader_writer.obj" : $(SOURCE) $(DEP_CPP_READE) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "recursive_mutex - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\recursive_mutex.cpp
-DEP_CPP_RECUR=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\recursive_mutex.obj" : $(SOURCE) $(DEP_CPP_RECUR) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "task_one - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\task_one.cpp
-DEP_CPP_TASK_=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\task_one.obj" : $(SOURCE) $(DEP_CPP_TASK_) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "task_two - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\task_two.cpp
-DEP_CPP_TASK_T=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\task_two.obj" : $(SOURCE) $(DEP_CPP_TASK_T) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "task_three - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\task_three.cpp
-DEP_CPP_TASK_TH=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\task_three.obj" : $(SOURCE) $(DEP_CPP_TASK_TH) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "task_four - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\task_four.cpp
-DEP_CPP_TASK_F=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\task_four.obj" : $(SOURCE) $(DEP_CPP_TASK_F) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "thread_manager - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\thread_manager.cpp
-DEP_CPP_THREA=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\thread_manager.obj" : $(SOURCE) $(DEP_CPP_THREA) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "thread_pool - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\thread_pool.cpp
-DEP_CPP_THREAD=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\thread_pool.obj" : $(SOURCE) $(DEP_CPP_THREAD) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "thread_specific - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\thread_specific.cpp
-DEP_CPP_THREAD_=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\thread_specific.obj" : $(SOURCE) $(DEP_CPP_THREAD_) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "token - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\token.cpp
-DEP_CPP_TOKEN=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\token.obj" : $(SOURCE) $(DEP_CPP_TOKEN) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "tss1 - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\tss1.cpp
-DEP_CPP_TSS1_=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\tss1.obj" : $(SOURCE) $(DEP_CPP_TSS1_) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "tss2 - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\tss2.cpp
-DEP_CPP_TSS2_=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\tss2.obj" : $(SOURCE) $(DEP_CPP_TSS2_) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-################################################################################
-# Begin Target
-
-# Name "context_switch_time - Win32 Debug"
-################################################################################
-# Begin Source File
-
-SOURCE=.\context_switch_time.cpp
-DEP_CPP_CONTE=\
- {$(INCLUDE)}"\ace\ACE.h"\
- {$(INCLUDE)}"\ace\ACE.i"\
- {$(INCLUDE)}"\ace\Addr.h"\
- {$(INCLUDE)}"\ace\Addr.i"\
- {$(INCLUDE)}"\ace\config.h"\
- {$(INCLUDE)}"\ace\Dispatcher.h"\
- {$(INCLUDE)}"\ace\Dispatcher.i"\
- {$(INCLUDE)}"\ace\Event_Handler.h"\
- {$(INCLUDE)}"\ace\Event_Handler.i"\
- {$(INCLUDE)}"\ace\Get_Opt.h"\
- {$(INCLUDE)}"\ace\Get_Opt.i"\
- {$(INCLUDE)}"\ace\Handle_Set.h"\
- {$(INCLUDE)}"\ace\Handle_Set.i"\
- {$(INCLUDE)}"\ace\High_Res_Timer.h"\
- {$(INCLUDE)}"\ace\High_Res_Timer.i"\
- {$(INCLUDE)}"\ace\INET_Addr.h"\
- {$(INCLUDE)}"\ace\INET_Addr.i"\
- {$(INCLUDE)}"\ace\IO_Cntl_Msg.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.h"\
- {$(INCLUDE)}"\ace\IPC_SAP.i"\
- {$(INCLUDE)}"\ace\Local_Tokens.h"\
- {$(INCLUDE)}"\ace\Local_Tokens.i"\
- {$(INCLUDE)}"\ace\Log_Msg.h"\
- {$(INCLUDE)}"\ace\Log_Priority.h"\
- {$(INCLUDE)}"\ace\Log_Record.h"\
- {$(INCLUDE)}"\ace\Log_Record.i"\
- {$(INCLUDE)}"\ace\Malloc.h"\
- {$(INCLUDE)}"\ace\Malloc.i"\
- {$(INCLUDE)}"\ace\Malloc_T.cpp"\
- {$(INCLUDE)}"\ace\Malloc_T.h"\
- {$(INCLUDE)}"\ace\Malloc_T.i"\
- {$(INCLUDE)}"\ace\Map_Manager.cpp"\
- {$(INCLUDE)}"\ace\Map_Manager.h"\
- {$(INCLUDE)}"\ace\Map_Manager.i"\
- {$(INCLUDE)}"\ace\Mem_Map.h"\
- {$(INCLUDE)}"\ace\Mem_Map.i"\
- {$(INCLUDE)}"\ace\Memory_Pool.h"\
- {$(INCLUDE)}"\ace\Memory_Pool.i"\
- {$(INCLUDE)}"\ace\Message_Block.h"\
- {$(INCLUDE)}"\ace\Message_Block.i"\
- {$(INCLUDE)}"\ace\Message_Queue.cpp"\
- {$(INCLUDE)}"\ace\Message_Queue.h"\
- {$(INCLUDE)}"\ace\Message_Queue.i"\
- {$(INCLUDE)}"\ace\Module.cpp"\
- {$(INCLUDE)}"\ace\Module.h"\
- {$(INCLUDE)}"\ace\Module.i"\
- {$(INCLUDE)}"\ace\OS.h"\
- {$(INCLUDE)}"\ace\OS.i"\
- {$(INCLUDE)}"\ace\Pipe.h"\
- {$(INCLUDE)}"\ace\Pipe.i"\
- {$(INCLUDE)}"\ace\Proactor.h"\
- {$(INCLUDE)}"\ace\Proactor.i"\
- {$(INCLUDE)}"\ace\Reactor.h"\
- {$(INCLUDE)}"\ace\Reactor.i"\
- {$(INCLUDE)}"\ace\ReactorEx.h"\
- {$(INCLUDE)}"\ace\ReactorEx.i"\
- {$(INCLUDE)}"\ace\Scheduling_Params.h"\
- {$(INCLUDE)}"\ace\Scheduling_Params.i"\
- {$(INCLUDE)}"\ace\Service_Config.h"\
- {$(INCLUDE)}"\ace\Service_Config.i"\
- {$(INCLUDE)}"\ace\Service_Object.h"\
- {$(INCLUDE)}"\ace\Service_Object.i"\
- {$(INCLUDE)}"\ace\Set.cpp"\
- {$(INCLUDE)}"\ace\Set.h"\
- {$(INCLUDE)}"\ace\Set.i"\
- {$(INCLUDE)}"\ace\Shared_Object.h"\
- {$(INCLUDE)}"\ace\Shared_Object.i"\
- {$(INCLUDE)}"\ace\Signal.h"\
- {$(INCLUDE)}"\ace\Signal.i"\
- {$(INCLUDE)}"\ace\SOCK.h"\
- {$(INCLUDE)}"\ace\SOCK.i"\
- {$(INCLUDE)}"\ace\SOCK_IO.h"\
- {$(INCLUDE)}"\ace\SOCK_IO.i"\
- {$(INCLUDE)}"\ace\SOCK_Stream.h"\
- {$(INCLUDE)}"\ace\SOCK_Stream.i"\
- {$(INCLUDE)}"\ace\SString.h"\
- {$(INCLUDE)}"\ace\SString.i"\
- {$(INCLUDE)}"\ace\Stack.cpp"\
- {$(INCLUDE)}"\ace\Stack.h"\
- {$(INCLUDE)}"\ace\Stack.i"\
- {$(INCLUDE)}"\ace\stdcpp.h"\
- {$(INCLUDE)}"\ace\Strategies.h"\
- {$(INCLUDE)}"\ace\Strategies_T.cpp"\
- {$(INCLUDE)}"\ace\Strategies_T.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.cpp"\
- {$(INCLUDE)}"\ace\Stream_Modules.h"\
- {$(INCLUDE)}"\ace\Stream_Modules.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Complex.i"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.h"\
- {$(INCLUDE)}"\ace\SV_Semaphore_Simple.i"\
- {$(INCLUDE)}"\ace\Svc_Conf_Tokens.h"\
- {$(INCLUDE)}"\ace\Synch.h"\
- {$(INCLUDE)}"\ace\Synch.i"\
- {$(INCLUDE)}"\ace\Synch_Options.h"\
- {$(INCLUDE)}"\ace\Synch_T.cpp"\
- {$(INCLUDE)}"\ace\Synch_T.h"\
- {$(INCLUDE)}"\ace\Synch_T.i"\
- {$(INCLUDE)}"\ace\Task.h"\
- {$(INCLUDE)}"\ace\Task.i"\
- {$(INCLUDE)}"\ace\Task_T.cpp"\
- {$(INCLUDE)}"\ace\Task_T.h"\
- {$(INCLUDE)}"\ace\Task_T.i"\
- {$(INCLUDE)}"\ace\Thread.h"\
- {$(INCLUDE)}"\ace\Thread.i"\
- {$(INCLUDE)}"\ace\Thread_Manager.h"\
- {$(INCLUDE)}"\ace\Thread_Manager.i"\
- {$(INCLUDE)}"\ace\Thread_Priority.h"\
- {$(INCLUDE)}"\ace\Thread_Priority.i"\
- {$(INCLUDE)}"\ace\Time_Value.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.h"\
- {$(INCLUDE)}"\ace\Timer_Queue.i"\
- {$(INCLUDE)}"\ace\Token.h"\
- {$(INCLUDE)}"\ace\Token.i"\
- {$(INCLUDE)}"\ace\Trace.h"\
- {$(INCLUDE)}"\ace\ws2tcpip.h"\
-
-
-"$(INTDIR)\context_switch_time.obj" : $(SOURCE) $(DEP_CPP_CONTE) "$(INTDIR)"
-
-
-# End Source File
-# End Target
-# End Project
-################################################################################
diff --git a/examples/Threads/test.mdp b/examples/Threads/test.mdp Binary files differdeleted file mode 100644 index 2d7028e0d7f..00000000000 --- a/examples/Threads/test.mdp +++ /dev/null diff --git a/examples/Threads/test_auto_event.cpp b/examples/Threads/test_auto_event.cpp deleted file mode 100644 index 4f83d50db71..00000000000 --- a/examples/Threads/test_auto_event.cpp +++ /dev/null @@ -1,113 +0,0 @@ -// $Id$ - -// This test shows the use of an ACE_Auto_Event as a signaling -// mechanism. Two threads are created (one a reader, the other a -// writer). The reader waits till the writer has completed -// calculations. Upon waking up the reader prints the data calculated -// by the writer. The writer thread calculates the value and signals -// the reader when the calculation completes. - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Singleton.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) -// Shared event between reader and writer. The ACE_Thread_Mutex is -// necessary to make sure that only one ACE_Auto_Event is created. -// The default constructor for ACE_Auto_Event sets it initially into -// the non-signaled state. - -typedef ACE_Singleton <ACE_Auto_Event, ACE_Thread_Mutex> EVENT; - -// work time for writer -static int work_time; - -// Reader thread. -static void * -reader (void *arg) -{ - // Shared data via a reference. - int& data = *(int *) arg; - - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - // Wait for writer to complete. - - ACE_DEBUG ((LM_DEBUG, "(%t) reader: waiting...... \n")); - - if (EVENT::instance ()->wait () == -1) - { - ACE_ERROR ((LM_ERROR, "thread wait failed")); - ACE_OS::exit (0); - } - - // Read shared data. - ACE_DEBUG ((LM_DEBUG, "(%t) reader: value of data is: %d \n", data)); - - return 0; -} - -// Writer thread. -static void * -writer (void *arg) -{ - int& data = *(int *) arg; - - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - // Calculate (work). - ACE_DEBUG ((LM_DEBUG, "(%t) writer: working for %d secs\n", work_time)); - ACE_OS::sleep (work_time); - - // Write shared data. - data = 42; - - // Wake up reader. - ACE_DEBUG ((LM_DEBUG, "(%t) writer: calculation complete, waking reader\n")); - - if (EVENT::instance ()->signal () == -1) - { - ACE_ERROR ((LM_ERROR, "thread wait failed")); - ACE_OS::exit (0); - } - - return 0; -} - -int -main (int argc, char **argv) -{ - // Shared data: set by writer, read by reader. - int data; - - // Work time for writer. - work_time = argc == 2 ? atoi (argv[1]) : 5; - - // threads manager - ACE_Thread_Manager& tm = *ACE_Service_Config::thr_mgr (); - - // Create reader thread. - if (tm.spawn (reader, (void *) &data) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread create for reader failed"), -1); - - // Create writer thread. - if (tm.spawn (writer, (void *) &data) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread create for writer failed"), -1); - - // Wait for both. - if (tm.wait () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread wait failed"), -1); - else - ACE_DEBUG ((LM_ERROR, "graceful exit\n")); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_barrier1.cpp b/examples/Threads/test_barrier1.cpp deleted file mode 100644 index 6b213819ca0..00000000000 --- a/examples/Threads/test_barrier1.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// This test program illustrates how the ACE barrier synchronization -// $Id$ - -// mechanisms work. - - -#include "ace/Synch.h" -#include "ace/Thread_Manager.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_THREADS) - -struct Tester_Args - // = TITLE - // These arguments are passed into each test thread. -{ - Tester_Args (ACE_Barrier &tb, int i) - : tester_barrier_ (tb), - n_iterations_ (i) {} - - ACE_Barrier &tester_barrier_; - // Reference to the tester barrier. This controls each miteration of - // the tester function running in every thread. - - int n_iterations_; - // Number of iterations to run. -}; - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -static void * -tester (Tester_Args *args) -{ - // Keeps track of thread exit. - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - for (int iterations = 1; - iterations <= args->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations)); - - // Block until all other threads have waited, then continue. - args->tester_barrier_.wait (); - } - - return 0; -} - -// Default number of threads to spawn. -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Barrier tester_barrier (n_threads); - - Tester_Args args (tester_barrier, n_iterations); - - if (ACE_Service_Config::thr_mgr ()->spawn_n - (n_threads, ACE_THR_FUNC (tester), - (void *) &args, THR_NEW_LWP | THR_DETACHED) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - - // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_barrier2.cpp b/examples/Threads/test_barrier2.cpp deleted file mode 100644 index 30190ace443..00000000000 --- a/examples/Threads/test_barrier2.cpp +++ /dev/null @@ -1,269 +0,0 @@ -// $Id$ - -// generic_worker_task.cpp -// -// This test program illustrates how the ACE task workers/barrier -// synchronization mechanisms work in conjunction with the ACE_Task -// and the ACE_Thread_Manager. The manual flag not set simulates -// user input, if set input comes from stdin until RETURN only is -// entered which stops all workers via a message block of length -// 0. This is an alernative shutdown of workers compared to queue -// deactivate. The delay_put flag simulates a delay between the -// shutdown puts. All should work with this flag disabled! The -// BARRIER_TYPE is supposed to enable/disable barrier sync on each svc -// a worker has done. - -#include <iostream.h> -#include "ace/Task.h" -#include "ace/Service_Config.h" - -#if defined (ACE_HAS_THREADS) - -#define BARRIER_TYPE ACE_Null_Barrier -//#define BARRIER_TYPE ACE_Barrier -//#ifdef delay_put -//#define manual - -template <class BARRIER> -class Worker_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - - Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int inp_serialize = 1); - - virtual int Producer (void); - // produce input for workers - - virtual int input (ACE_Message_Block *mb); - // Fill one message block via a certain input strategy. - - virtual int output (ACE_Message_Block *mb); - // Forward one message block via a certain output strategy to the - // next task if any. - - virtual int service (ACE_Message_Block *mb, int iter); - // Perform one message block dependant service. - -private: - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv=0); - - virtual int svc (void); - // Iterate <n_iterations> time printing off a message and "waiting" - // for all other threads to complete this iteration. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) {ACE_DEBUG ((LM_DEBUG,"(%t) in close of worker\n")); return 0; } - - int nt_; - // Number of worker threads to run. - int inp_serialize_; - - BARRIER barrier_; -}; - -template <class BARRIER> -Worker_Task<BARRIER>::Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int inp_serialize) - : ACE_Task<ACE_MT_SYNCH> (thr_mgr), - barrier_ (n_threads) -{ - nt_ = n_threads; - // Create worker threads. - inp_serialize_ = inp_serialize; - - // Use the task's message queue for serialization (default) or run - // service in the context of the caller thread. - - if (nt_ > 0 && inp_serialize == 1) - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Simply enqueue the Message_Block into the end of the queue. - -template <class BARRIER> int -Worker_Task<BARRIER>::put (ACE_Message_Block *mb, ACE_Time_Value *tv) -{ - int result; - if (this->inp_serialize_) - result = this->putq (mb, tv); - else - { - static int iter = 0; - result = this->service (mb, iter++); - - if (this->output (mb) < 0) - ACE_DEBUG ((LM_DEBUG, "(%t) output not connected!\n")); - - delete mb; - } - return result; -} - -template <class BARRIER> int -Worker_Task<BARRIER>::service (ACE_Message_Block *mb, int iter) -{ - int length = mb->length (); - - if (length > 0) - { - ACE_DEBUG ((LM_DEBUG,"(%t) in iteration %d len=%d text got:\n",iter,length)); - ACE_OS::write (ACE_STDOUT, mb->rd_ptr (), length); - ACE_DEBUG ((LM_DEBUG,"\n")); - } - return 0; -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -template <class BARRIER> int -Worker_Task<BARRIER>::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us - // to the Thread_Manager when the thread begins. - - // Keep looping, reading a message out of the queue, until we get a - // message with a length == 0, which signals us to quit. - - for (int iter = 1; ;iter++) - { - ACE_Message_Block *mb = 0; - - int result = this->getq (mb); - - if (result == -1) - { - ACE_ERROR ((LM_ERROR, - "(%t) in iteration %d\n", "error waiting for message in iteration", iter)); - break; - } - - int length = mb->length (); - this->service (mb,iter); - - if (length == 0) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d got quit, exit!\n", iter)); - delete mb; - break; - } - - this->barrier_.wait (); - this->output (mb); - - delete mb; - } - - // Note that the ACE_Task::svc_run () method automatically removes - // us from the Thread_Manager when the thread exits. - - return 0; -} - -template <class BARRIER> int -Worker_Task<BARRIER>::Producer (void) -{ - // Keep reading stdin, until we reach EOF. - - for (;;) - { - // Allocate a new message. - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - - if (this->input (mb) == -1) - return -1; - } - - return 0; -} - -template <class BARRIER>int -Worker_Task<BARRIER>::output (ACE_Message_Block *mb) -{ - return this->put_next (mb); -} - -template <class BARRIER>int -Worker_Task<BARRIER>::input (ACE_Message_Block *mb) -{ - ACE_Message_Block *mb1; - -#ifndef manual - static int l= 0; - char str[]="kalle"; - strcpy (mb->rd_ptr (),str); - int n=strlen (str); - if (l==1000) - n=1; - l++; - if (l==0 || (l%100 == 0)) ACE_OS::sleep (5); - if (n <= 1) -#else - ACE_DEBUG ((LM_DEBUG,"(%t) press chars and enter to put a new message into task queue ...\n")); - if ((n = read (0, mb->rd_ptr (), mb->size ())) <= 1) -#endif // manual - { - // Send a shutdown message to the waiting threads and exit. - // cout << "\nvor loop, dump of task msg queue:\n" << endl; - // this->msg_queue ()->dump (); - for (int i=0;i<nt_;i++) - { - ACE_DEBUG ((LM_DEBUG,"(%t) eof, sending block for thread=%d\n",i+1)); - mb1 = new ACE_Message_Block (2); - mb1->length (0); - if (this->put (mb1) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put")); -#ifdef delay_put - ACE_OS::sleep (1); // this sleep helps to shutdown correctly -> was an error! -#endif /* delay_put */ - } - // cout << "\nnach loop, dump of task msg queue:\n" << endl; - // this->msg_queue ()->dump (); - return (-1); - } - else - { - // Send a normal message to the waiting threads and continue producing. - mb->wr_ptr (n); - if (this->put (mb) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "put")); - } - return 0; -} - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - - ACE_DEBUG ((LM_DEBUG,"(%t) worker threads running=%d\n",n_threads)); - - - Worker_Task<BARRIER_TYPE> *worker_task = - new Worker_Task<BARRIER_TYPE> (ACE_Service_Config::thr_mgr (), - /*n_threads*/ 0,0); - - worker_task->Producer (); - - // Wait for all the threads to reach their exit point. - ACE_DEBUG ((LM_DEBUG,"(%t) waiting with thread manager ...\n")); - ACE_Service_Config::thr_mgr ()->wait (); - ACE_DEBUG ((LM_DEBUG,"(%t) delete worker task ...\n")); - - delete worker_task; - ACE_DEBUG ((LM_DEBUG,"(%t) done correct!\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_cancel.cpp b/examples/Threads/test_cancel.cpp deleted file mode 100644 index a9d12bea579..00000000000 --- a/examples/Threads/test_cancel.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// Test out the cooperative thread cancellation mechanisms provided by -// $Id$ - -// the ACE_Thread_Manager. - -#include "ace/Service_Config.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) - -static void * -worker (int iterations) -{ - for (int i = 0; i < iterations; i++) - { - if ((i % 10) == 0 - && (ACE_Service_Config::thr_mgr ()->testcancel (ACE_Thread::self ()) != 0)) - { - ACE_DEBUG ((LM_DEBUG, "(%t) has been cancelled before iteration!\n", i)); - break; - } - } - - return 0; -} - -static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; -static const int DEFAULT_ITERATIONS = 100000; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - daemon.open (argv[0]); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - - int grp_id = thr_mgr->spawn_n (n_threads, ACE_THR_FUNC (worker), - (void *) n_iterations, - THR_NEW_LWP | THR_DETACHED); - - // Wait for 2 seconds and then suspend every thread in the group. - ACE_OS::sleep (2); - thr_mgr->suspend_grp (grp_id); - - // Wait for 2 more seconds and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (2)); - thr_mgr->resume_grp (grp_id); - - // Wait for 2 more seconds and then send a SIGINT to every thread in - // the group. - ACE_OS::sleep (ACE_Time_Value (2)); - thr_mgr->kill_grp (grp_id, SIGINT); - - // Wait for 2 more seconds and then exit (which should kill all the - // threads)! - ACE_OS::sleep (ACE_Time_Value (2)); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_future1.cpp b/examples/Threads/test_future1.cpp deleted file mode 100644 index 1c00a786295..00000000000 --- a/examples/Threads/test_future1.cpp +++ /dev/null @@ -1,420 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Test_Future.cpp -// -// = DESCRIPTION -// This example tests the ACE Future. -// -// = AUTHOR -// Andres Kruse <Andres.Kruse@cern.ch> and Douglas C. Schmidt -// <schmidt@cs.wustl.edu> -// -// ============================================================================ - -#include <math.h> -#include "ace/Task.h" - -#include "ace/Synch.h" -#include "ace/Message_Queue.h" -#include "ace/Future.h" -#include "ace/Method_Object.h" -#include "ace/Activation_Queue.h" -#include "ace/Auto_Ptr.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op<ACE_Thread_Mutex, u_long> ATOMIC_INT; - -// a counter for the tasks.. -static ATOMIC_INT task_count (0); - -// a counter for the futures.. -static ATOMIC_INT future_count (0); -static ATOMIC_INT future_no (0); - -// a counter for the capsules.. -static ATOMIC_INT capsule_count (0); -static ATOMIC_INT capsule_no (0); - -// a counter for the method objects... -static ATOMIC_INT methodobject_count (0); -static ATOMIC_INT methodobject_no (0); - -class Scheduler : public ACE_Task<ACE_MT_SYNCH> - // = TITLE - // Active Object Scheduler. -{ - friend class Method_ObjectWork; -public: - Scheduler (const char *, Scheduler * = 0); - ~Scheduler (void); - - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); - virtual int svc (void); - - ACE_Future<float> work (float param, int count); - ACE_Future<const char*> name (void); - void end (void); - - float work_i (float, int); - const char *name_i (void); - -private: - char *name_; - ACE_Activation_Queue activation_queue_; - Scheduler *scheduler_; - -}; - -class Method_Object_work : public ACE_Method_Object - // = TITLE - // Reification of the <work> method. -{ -public: - Method_Object_work (Scheduler *, float, int, ACE_Future<float> &); - ~Method_Object_work (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - float param_; - int count_; - ACE_Future<float> future_result_; -}; - -Method_Object_work::Method_Object_work (Scheduler* new_Scheduler, - float new_param, - int new_count, - ACE_Future<float> &new_result) - : scheduler_ (new_Scheduler), - param_ (new_param), - count_ (new_count), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_work created\n")); -} - -Method_Object_work::~Method_Object_work (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Method_Object_work will be deleted.\n")); -} - - -int -Method_Object_work::call (void) -{ - return this->future_result_.set (this->scheduler_->work_i (this->param_, this->count_)); -} - -class Method_Object_name : public ACE_Method_Object - // = TITLE - // Reification of the <name> method. -{ -public: - Method_Object_name (Scheduler *, ACE_Future<const char*> &); - ~Method_Object_name (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - ACE_Future<const char*> future_result_; -}; - -Method_Object_name::Method_Object_name (Scheduler *new_scheduler, - ACE_Future<const char*> &new_result) - : scheduler_ (new_scheduler), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_name created\n")); -}; - -Method_Object_name::~Method_Object_name (void) -{ - ACE_DEBUG ((LM_DEBUG, - "(%t) Method_Object_name will be deleted.\n")); -} - -int -Method_Object_name::call (void) -{ - return future_result_.set (scheduler_->name_i ()); -} - -class Method_Object_end : public ACE_Method_Object - // = TITLE - // Reification of the <end> method. -{ -public: - Method_Object_end (Scheduler *new_Scheduler): scheduler_ (new_Scheduler) {} - ~Method_Object_end (void) {} - virtual int call (void) { this->scheduler_->close (); return -1; } - -private: - Scheduler *scheduler_; -}; - -// constructor -Scheduler::Scheduler (const char *newname, Scheduler *new_Scheduler) -{ - ACE_NEW (this->name_, char[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((char *) this->name_, newname); - this->scheduler_ = new_Scheduler; - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s created\n", this->name_)); -} - -// Destructor -Scheduler::~Scheduler (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s will be destroyed\n", this->name_)); -} - -// open -int -Scheduler::open (void *) -{ - task_count++; - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s open\n", this->name_)); - return this->activate (THR_BOUND); -} - -// close -int -Scheduler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) Scheduler %s close\n", this->name_)); - task_count--; - return 0; -} - -// put... ?? -int -Scheduler::put (ACE_Message_Block *, ACE_Time_Value *) -{ - return 0; -} - -// service.. -int -Scheduler::svc (void) -{ - for (;;) - { - // Dequeue the next method object (we use an auto pointer in - // case an exception is thrown in the <call>). - auto_ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); - - ACE_DEBUG ((LM_DEBUG, "(%t) calling method object\n")); - // Call it. - if (mo->call () == -1) - break; - // Destructor automatically deletes it. - } - - /* NOTREACHED */ - return 0; -} - -void -Scheduler::end (void) -{ - this->activation_queue_.enqueue (new Method_Object_end (this)); -} - - -// Here's where the Work takes place. -float -Scheduler::work_i (float param, - int count) -{ - float x = 0, y = 0; - - // @@ We should probably do something fun here, like compute the - // Fibonacci sequence or something. - - for (int j = 0; j < count; j++) - { - x = x + param; - y = y + ::sin (x); - } - - return y; -} - -const char * -Scheduler::name_i (void) -{ - char *the_name; - - the_name = new char[ACE_OS::strlen (this->name_) + 1]; - ACE_OS::strcpy (the_name, this->name_); - - return the_name; -} - -ACE_Future<const char *> -Scheduler::name (void) -{ - if (this->scheduler_) - // Delegate to the Scheduler. - return this->scheduler_->name (); - else - { - ACE_Future<const char*> new_future; - - // @@ What happens if new fails here? - this->activation_queue_.enqueue - (new Method_Object_name (this, new_future)); - - return new_future; - } -} - -ACE_Future<float> -Scheduler::work (float newparam, int newcount) -{ - if (this->scheduler_) { - return this->scheduler_->work (newparam, newcount); - } - else { - ACE_Future<float> new_future; - - this->activation_queue_.enqueue - (new Method_Object_work (this, newparam, newcount, new_future)); - return new_future; - } -} - -// @@ These values should be set by the command line options! - -// Total number of iterations to <work> -static int n_iterations = 50000; - -// Total number of loops. -static int n_loops = 100; - -int -main (int, char *[]) -{ - Scheduler *andres, *peter, *helmut, *matias; - - // Create active objects.. - // @@ Should "open" be subsumed within the constructor of - // Scheduler()? - andres = new Scheduler ("andres"); - andres->open (); - peter = new Scheduler ("peter"); - peter->open (); - helmut = new Scheduler ("helmut"); - helmut->open (); - - // Matias passes all asynchronous method calls on to Andres... - matias = new Scheduler ("matias", andres); - matias->open (); - - for (int i = 0; i < n_loops; i++) - { - { - ACE_Future<float> fresulta, fresultb, fresultc, fresultd, fresulte; - ACE_Future<const char*> fname; - - ACE_DEBUG ((LM_DEBUG, "(%t) going to do a non-blocking call\n")); - - fresulta = andres->work (0.01, 100 + (n_iterations * (i % 2))); - fresultb = peter->work (0.01, 100 + (n_iterations * (i % 2))); - fresultc = helmut->work (0.01, 100 + (n_iterations * (i % 2))); - fresultd = matias->work (0.02, 100 + (n_iterations * (i % 2))); - fname = andres->name (); - - // see if the result is available... - if (fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG, "(%t) wow.. work is ready.....\n")); - - ACE_DEBUG ((LM_DEBUG, "(%t) non-blocking call done... now blocking...\n")); - - // Save the result of fresulta. - - fresulte = fresulta; - - if (i % 3 == 0) - { - // Every 3rd time... disconnect the futures... - // but "fresulte" should still contain the result... - fresulta.cancel (10.0); - fresultb.cancel (20.0); - fresultc.cancel (30.0); - fresultd.cancel (40.0); - } - - float resulta = 0, resultb = 0, resultc = 0, resultd = 0, resulte = 0; - - fresulta.get (resulta); - fresultb.get (resultb); - fresultc.get (resultc); - fresultd.get (resultd); - fresulte.get (resulte); - - ACE_DEBUG ((LM_DEBUG, "(%t) result a %f\n", resulte)); - ACE_DEBUG ((LM_DEBUG, "(%t) result b %f\n", resulta)); - ACE_DEBUG ((LM_DEBUG, "(%t) result c %f\n", resultb)); - ACE_DEBUG ((LM_DEBUG, "(%t) result d %f\n", resultc)); - ACE_DEBUG ((LM_DEBUG, "(%t) result e %f\n", resultd)); - - const char *name; - - fname.get (name); - - ACE_DEBUG ((LM_DEBUG, "(%t) name %s\n", name)); - - } - - ACE_DEBUG ((LM_DEBUG, - "(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n", - (u_long) task_count, - (u_long) future_count, - (u_long) capsule_count, - (u_long) methodobject_count)); - } - - // Close things down. - andres->end (); - peter->end (); - helmut->end (); - matias->end (); - - ACE_OS::sleep (2); - - ACE_DEBUG ((LM_DEBUG, - "(%t) task_count %d future_count %d capsule_count %d methodobject_count %d\n", - (u_long) task_count, - (u_long) future_count, - (u_long) capsule_count, - (u_long) methodobject_count)); - - ACE_DEBUG ((LM_DEBUG,"(%t) th' that's all folks!\n")); - - ACE_OS::sleep (5); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, u_long>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_future2.cpp b/examples/Threads/test_future2.cpp deleted file mode 100644 index 3376008ab50..00000000000 --- a/examples/Threads/test_future2.cpp +++ /dev/null @@ -1,524 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// Test_Future.cpp -// -// = DESCRIPTION -// This example tests the ACE Future. -// -// = AUTHOR -// Andres Kruse <Andres.Kruse@cern.ch> and Douglas C. Schmidt -// <schmidt@cs.wustl.edu> -// -// Modification History -// Aug. 96; A.Kruse; dev. -// Aug. 96; D.Schmidt; complete workover -// 08/27/96; A.Kruse; - the friends of Scheduler are "Method_Object_name" -// and "Method_Object_work". -// - make the methods "work_i" and "name_i" private -// 09/2/96; D.Schmidt; Integrate with new ACE_Future API and rearrange -// the tests so they are more modular. -// ============================================================================ - -#include <math.h> -#include "ace/Task.h" - -#include "ace/Synch.h" -#include "ace/Message_Queue.h" -#include "ace/Future.h" -#include "ace/Method_Object.h" -#include "ace/Activation_Queue.h" -#include "ace/Auto_Ptr.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op<ACE_Thread_Mutex, u_long> ATOMIC_INT; - -// a counter for the tasks.. -static ATOMIC_INT scheduler_open_count (0); - -// forward declarations -class Method_Object_work; -class Method_Object_name; - -class Scheduler : public ACE_Task<ACE_MT_SYNCH> - // = TITLE - // Active Object Scheduler. -{ - // Every method object has to be able to access the private methods. - - friend class Method_Object_work; - friend class Method_Object_name; - friend class Method_Object_end; -public: - - Scheduler (const char *, Scheduler * = 0); - ~Scheduler (void); - - virtual int open (void *args = 0); - // The method that is used to start the active object. - - // = Here are the methods exported by the class. They return an - // <ACE_Future>. - ACE_Future<float> work (float param, int count); - ACE_Future<char*> name (void); - void end (void); - -private: - virtual int close (u_long flags = 0); - // Should not be accessible from outside... (use end () instead). - - virtual int put (ACE_Message_Block *, ACE_Time_Value * = 0) - { return 0; }; - // Doesn't have any use for this example. - - virtual int svc (void); - // Here the actual servicing of all requests is happening.. - - // = Implementation methods. - float work_i (float, int); - char *name_i (void); - - char *name_; - ACE_Activation_Queue activation_queue_; - Scheduler *scheduler_; -}; - -class Method_Object_work : public ACE_Method_Object - // = TITLE - // Reification of the <work> method. -{ -public: - Method_Object_work (Scheduler *, float, int, ACE_Future<float> &); - ~Method_Object_work (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - float param_; - int count_; - ACE_Future<float> future_result_; -}; - -Method_Object_work::Method_Object_work (Scheduler* new_Scheduler, - float new_param, - int new_count, - ACE_Future<float> &new_result) - : scheduler_ (new_Scheduler), - param_ (new_param), - count_ (new_count), - future_result_ (new_result) -{ -} - -Method_Object_work::~Method_Object_work (void) -{ -} - -int -Method_Object_work::call (void) -{ - return this->future_result_.set (this->scheduler_->work_i (this->param_, this->count_)); -} - -class Method_Object_name : public ACE_Method_Object - // = TITLE - // Reification of the <name> method. -{ -public: - Method_Object_name (Scheduler *, ACE_Future<char*> &); - ~Method_Object_name (void); - virtual int call (void); - -private: - Scheduler *scheduler_; - ACE_Future<char*> future_result_; -}; - - -Method_Object_name::Method_Object_name (Scheduler *new_scheduler, - ACE_Future<char*> &new_result) - : scheduler_ (new_scheduler), - future_result_ (new_result) -{ - ACE_DEBUG ((LM_DEBUG, - " (%t) Method_Object_name created\n")); -}; - -Method_Object_name::~Method_Object_name (void) -{ - ACE_DEBUG ((LM_DEBUG, - " (%t) Method_Object_name will be deleted.\n")); -} - -int -Method_Object_name::call (void) -{ - return future_result_.set (scheduler_->name_i ()); -} - -class Method_Object_end : public ACE_Method_Object - // = TITLE - // Reification of the <end> method. -{ -public: - Method_Object_end (Scheduler *new_Scheduler): scheduler_ (new_Scheduler) {} - ~Method_Object_end (void) {} - virtual int call (void) { this->scheduler_->close (); return -1; } - -private: - Scheduler *scheduler_; -}; - -// constructor -Scheduler::Scheduler (const char *newname, Scheduler *new_Scheduler) -{ - ACE_NEW (this->name_, char[ACE_OS::strlen (newname) + 1]); - ACE_OS::strcpy ((char *) this->name_, newname); - this->scheduler_ = new_Scheduler; - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s created\n", this->name_)); -} - -// Destructor -Scheduler::~Scheduler (void) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s will be destroyed\n", this->name_)); -} - -int -Scheduler::open (void *) -{ - scheduler_open_count++; - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s open\n", this->name_)); - return this->activate (THR_BOUND); -} - -int -Scheduler::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) Scheduler %s close\n", this->name_)); - scheduler_open_count--; - return 0; -} - -int -Scheduler::svc (void) -{ - // Main event loop for this active object. - for (;;) - { - // Dequeue the next method object (we use an auto pointer in - // case an exception is thrown in the <call>). - auto_ptr<ACE_Method_Object> mo (this->activation_queue_.dequeue ()); - - ACE_DEBUG ((LM_DEBUG, " (%t) calling method object\n")); - // Call it. - if (mo->call () == -1) - break; - // Smart pointer destructor automatically deletes mo. - } - - /* NOTREACHED */ - return 0; -} - -void -Scheduler::end (void) -{ - this->activation_queue_.enqueue (new Method_Object_end (this)); -} - -// Here's where the Work takes place. -float -Scheduler::work_i (float param, - int count) -{ - float x = 0, y = 0; - - for (int j = 0; j < count; j++) - { - x = x + param; - y = y + ::sin (x); - } - - return y; -} - -char * -Scheduler::name_i (void) -{ - char *the_name; - - the_name = new char[ACE_OS::strlen (this->name_) + 1]; - ACE_OS::strcpy (the_name, this->name_); - - return the_name; -} - -ACE_Future<char *> -Scheduler::name (void) -{ - if (this->scheduler_) - // Delegate to the other scheduler - return this->scheduler_->name (); - else - { - ACE_Future<char*> new_future; - - if (this->thr_count () == 0) - { - // This scheduler is inactive... so we execute the user - // request right away... - - auto_ptr<ACE_Method_Object> mo (new Method_Object_name (this, new_future)); - - mo->call (); - // Smart pointer destructor automatically deletes mo. - } - else - // @@ What happens if new fails here? - this->activation_queue_.enqueue - (new Method_Object_name (this, new_future)); - - return new_future; - } -} - -ACE_Future<float> -Scheduler::work (float newparam, int newcount) -{ - if (this->scheduler_) - return this->scheduler_->work (newparam, newcount); - else - { - ACE_Future<float> new_future; - - if (this->thr_count () == 0) - { - auto_ptr<ACE_Method_Object> mo - (new Method_Object_work (this, newparam, newcount, new_future)); - mo->call (); - // Smart pointer destructor automatically deletes it. - } - else - this->activation_queue_.enqueue - (new Method_Object_work (this, newparam, newcount, new_future)); - - return new_future; - } -} - -static int -determine_iterations (void) -{ - int n_iterations; - - ACE_DEBUG ((LM_DEBUG," (%t) determining the number of iterations...\n")); - Scheduler *worker_a = new Scheduler ("worker A"); - - ACE_Time_Value tstart (ACE_OS::gettimeofday ()); - ACE_Time_Value tend (ACE_OS::gettimeofday ()); - - // Determine the number of iterations... we want so many that the - // work () takes about 1 second... - - for (n_iterations = 1; - (tend.sec () - tstart.sec ()) < 1; - n_iterations *= 2) - { - tstart = ACE_OS::gettimeofday (); - - worker_a->work (0.1, n_iterations); - - tend = ACE_OS::gettimeofday (); - } - - ACE_DEBUG ((LM_DEBUG," (%t) n_iterations %d\n", - (u_long) n_iterations)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? - return n_iterations; -} - -static void -test_active_object (int n_iterations) -{ - ACE_DEBUG ((LM_DEBUG," (%t) testing active object pattern...\n")); - // A simple example for the use of the active object pattern and - // futures to return values from an active object. - - Scheduler *worker_a = new Scheduler ("worker A"); - Scheduler *worker_b = new Scheduler ("worker B"); - - // Have worker_c delegate his work to worker_a. - Scheduler *worker_c = new Scheduler ("worker C", worker_a); - - // loop 0: - // test the Schedulers when they are not active. - // now the method objects will be created but since - // there is no active thread they will also be - // immediately executed, in the "main" thread. - // loop 1: - // do the same test but with the schedulers - // activated - for (int i = 0; i < 2; i++) - { - if (i == 1) - { - worker_a->open (); - worker_b->open (); - worker_c->open (); - } - - ACE_Future<float> fresulta = worker_a->work (0.01, n_iterations); - ACE_Future<float> fresultb = worker_b->work (0.02, n_iterations); - ACE_Future<float> fresultc = worker_c->work (0.03, n_iterations); - - if (i == 0) - { - if (!fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker A is should be ready!!!\n")); - if (!fresultb.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker B is should be ready!!!\n")); - if (!fresultc.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: worker C is should be ready!!!\n")); - } - - // When the workers are active we will block here until the - // results are available. - - float resulta = fresulta; - float resultb = fresultb; - float resultc = fresultc; - - ACE_Future<char *> fnamea = worker_a->name (); - ACE_Future<char *> fnameb = worker_b->name (); - ACE_Future<char *> fnamec = worker_c->name (); - - char *namea = fnamea; - char *nameb = fnameb; - char *namec = fnamec; - - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %f\n", - namea, resulta)); - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %f\n", - nameb, resultb)); - ACE_DEBUG ((LM_DEBUG, " (%t) result from %s %f\n", - namec, resultc)); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d before end ()\n", - (u_long) scheduler_open_count)); - - worker_a->end (); - worker_b->end (); - worker_c->end (); - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d immediately after end ()\n", - (u_long) scheduler_open_count)); - - ACE_OS::sleep (2); - - ACE_DEBUG ((LM_DEBUG, " (%t) scheduler_open_count %d after waiting\n", - (u_long) scheduler_open_count)); - // @@ Can we safely delete worker_a, worker_b, and worker_c? -} - -static void -test_cancellation (int n_iterations) -{ - ACE_DEBUG ((LM_DEBUG," (%t) testing cancellation of a future...\n")); - - // Now test the cancelling a future. - - Scheduler *worker_a = new Scheduler ("worker A"); - worker_a->open (); - - ACE_Future<float> fresulta = worker_a->work (0.01, n_iterations); - - // save the result by copying the future - ACE_Future<float> fresultb = fresulta; - - // now we cancel the first future.. but the - // calculation will still go on... - fresulta.cancel (10.0); - - if (!fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: future A is should be ready!!!\n")); - - float resulta = fresulta; - - ACE_DEBUG ((LM_DEBUG, " (%t) cancelled result %f\n", resulta)); - - if (resulta != 10.0) - ACE_DEBUG ((LM_DEBUG, " (%t) cancelled result should be 10.0!!\n", resulta)); - - resulta = fresultb; - - ACE_DEBUG ((LM_DEBUG, " (%t) true result %f\n", resulta)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? -} - -static void -test_timeout (int n_iterations) -{ - ACE_DEBUG ((LM_DEBUG," (%t) testing timeout on waiting for the result...\n")); - Scheduler *worker_a = new Scheduler ("worker A"); - worker_a->open (); - - ACE_Future<float> fresulta = worker_a->work (0.01, 2 * n_iterations); - - // Should immediately return... and we should see an error... - ACE_Time_Value *delay = new ACE_Time_Value (1); - - float resulta; - fresulta.get (resulta, delay); - - if (fresulta.ready ()) - ACE_DEBUG ((LM_DEBUG," (%t) ERROR: future A is should not be ready!!!\n")); - else - ACE_DEBUG ((LM_DEBUG," (%t) timed out on future A\n")); - - // now we wait until we are done... - fresulta.get (resulta); - ACE_DEBUG ((LM_DEBUG, " (%t) result %f\n", resulta)); - - worker_a->end (); - // @@ Can we safely delete worker_a here? -} - -int -main (int, char *[]) -{ - int n_iterations = determine_iterations (); - - test_active_object (n_iterations); - test_cancellation (n_iterations); - test_timeout (n_iterations); - - ACE_DEBUG ((LM_DEBUG," (%t) that's all folks!\n")); - - ACE_OS::sleep (5); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, u_long>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_manual_event.cpp b/examples/Threads/test_manual_event.cpp deleted file mode 100644 index 26d477fabc0..00000000000 --- a/examples/Threads/test_manual_event.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// The test shows the use of an ACE_Manual_Event to create a -// $Id$ - -// Pseudo_Barrier. Multiple threads are created which do the -// following: -// -// 1. work -// 2. synch with other threads -// 3. more work -// -// ACE_Manual_Event is use to synch with other -// threads. ACE_Manual_Event::signal() is used for broadcasting. - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) -static ACE_Atomic_Op <ACE_Thread_Mutex, u_long> amount_of_work = (u_long) 0; - -class Pseudo_Barrier - // = TITLE - // A barrier class using ACE manual-reset events. - // - // = DESCRIPTION - // This is *not* a real barrier. - // Pseudo_Barrier is more like a ``one shot'' barrier. - // All waiters after the Nth waiter are allowed to go. - // The barrier does not reset after the Nth waiter. - // For an example of a real barrier, please see class ACE_Barrier. -{ -public: - Pseudo_Barrier (u_long count); - - int wait (void); - -private: - ACE_Atomic_Op <ACE_Thread_Mutex, u_long> counter_; - ACE_Manual_Event event_; -}; - -Pseudo_Barrier::Pseudo_Barrier (u_long count) - : counter_ (count) -{ -} - -int -Pseudo_Barrier::wait (void) -{ - if (--this->counter_ == 0) - return this->event_.signal (); - else - return this->event_.wait (); -} - -static void * -worker (void *arg) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - Pseudo_Barrier &barrier = *(Pseudo_Barrier *) arg; - - // work - ACE_DEBUG ((LM_DEBUG, "(%t) working (%d secs)\n", ++::amount_of_work)); - ACE_OS::sleep (::amount_of_work); - - // synch with everybody else - ACE_DEBUG ((LM_DEBUG, "(%t) waiting to synch with others \n")); - barrier.wait (); - - // more work - ACE_DEBUG ((LM_DEBUG, "(%t) more work (%d secs)\n", ++::amount_of_work)); - ACE_OS::sleep (amount_of_work); - - ACE_DEBUG ((LM_DEBUG, "(%t) dying \n")); - - return 0; -} - -int -main (int argc, char **argv) -{ - int n_threads = argc == 2 ? atoi (argv[1]) : 5; - - ACE_Thread_Manager &tm = *ACE_Service_Config::thr_mgr (); - - // synch object shared by all threads - Pseudo_Barrier barrier (n_threads); - - // create workers - if (tm.spawn_n (n_threads, worker, &barrier) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread creates for worker failed"), -1); - - // wait for all workers to exit - if (tm.wait () == -1) - ACE_ERROR_RETURN ((LM_ERROR, "thread wait failed"), -1); - else - ACE_DEBUG ((LM_ERROR, "graceful exit\n")); - - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_process_mutex.cpp b/examples/Threads/test_process_mutex.cpp deleted file mode 100644 index fb23c8b73be..00000000000 --- a/examples/Threads/test_process_mutex.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// $Id$ - -// This program tests ACE_Process_Mutexes. To run it, open 3 or 4 -// windows and run this program in each window... - -#include "ace/Synch.h" -#include "ace/Signal.h" - -#if defined (ACE_HAS_THREADS) - -static sig_atomic_t done; - -extern "C" void -handler (int) -{ - done = 1; -} - -int -main (int argc, char *argv[]) -{ - char *name = argc > 1 ? argv[1] : "hello"; - int iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : 100; - - ACE_Process_Mutex pm (name); - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - - for (int i = 0; i < iterations && !done; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquiring\n")); - if (pm.acquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "acquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquired\n")); - - ACE_OS::sleep (3); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - - if (pm.tryacquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "tryacquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = tryacquire\n")); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - } - - if (argc > 2) - pm.remove (); - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_process_semaphore.cpp b/examples/Threads/test_process_semaphore.cpp deleted file mode 100644 index d7933897f8e..00000000000 --- a/examples/Threads/test_process_semaphore.cpp +++ /dev/null @@ -1,56 +0,0 @@ -// $Id$ - -// This program tests ACE_Process_Semaphore. To run it, open 3 or 4 -// windows and run this program in each window... - -#include "ace/Synch.h" -#include "ace/Signal.h" - -static sig_atomic_t done; - -extern "C" void -handler (int) -{ - done = 1; -} - -int -main (int argc, char *argv[]) -{ - char *name = argc == 1 ? "hello" : argv[1]; - - ACE_Process_Semaphore pm (1, name); - - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - - for (int i = 0; i < 100 && !done; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquiring\n")); - if (pm.acquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "acquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = acquired\n")); - - ACE_OS::sleep (3); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - - if (pm.tryacquire () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "tryacquire failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = tryacquire\n")); - - if (pm.release () == -1) - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = %p\n", "release failed")); - else - ACE_DEBUG ((LM_DEBUG, "(%P|%t) = released\n")); - } - - if (argc > 2) - pm.remove (); - return 0; -} - diff --git a/examples/Threads/test_reader_writer.cpp b/examples/Threads/test_reader_writer.cpp deleted file mode 100644 index ef888133d83..00000000000 --- a/examples/Threads/test_reader_writer.cpp +++ /dev/null @@ -1,187 +0,0 @@ -// This test program verifies the functionality of the ACE_OS -// $Id$ - -// implementation of readers/writer locks on Win32 and Posix pthreads. - - -#include "ace/Synch.h" -#include "ace/Thread.h" -#include "ace/Thread_Manager.h" -#include "ace/Get_Opt.h" - -#if defined (ACE_HAS_THREADS) - -// Default number of iterations. -static size_t n_iterations = 1000; - -// Default number of loops. -static size_t n_loops = 100; - -// Default number of readers. -static size_t n_readers = 6; - -// Default number of writers. -static size_t n_writers = 2; - -// Thread id of last writer. -volatile static int shared_data; - -// Lock for shared_data. -static ACE_RW_Mutex rw_mutex; - -// Count of the number of readers and writers. -ACE_Atomic_Op<ACE_Thread_Mutex, int> current_readers, current_writers; - -// Thread manager -static ACE_Thread_Manager thr_mgr; - -// Explain usage and exit. -static void -print_usage_and_die (void) -{ - ACE_DEBUG ((LM_DEBUG, - "usage: %n [-r n_readers] [-w n_writers] [-n iteration_count]\n")); - ACE_OS::exit (1); -} - -// Parse the command-line arguments and set options. -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "r:w:n:l:"); - - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 'r': - n_readers = ACE_OS::atoi (get_opt.optarg); - break; - case 'w': - n_writers = ACE_OS::atoi (get_opt.optarg); - break; - case 'n': - n_iterations = ACE_OS::atoi (get_opt.optarg); - break; - case 'l': - n_loops = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -// Iterate <n_iterations> each time checking that nobody modifies the data -// while we have a read lock. - -static void * -reader (void *) -{ - ACE_Thread_Control tc (&thr_mgr); - ACE_DEBUG ((LM_DEBUG, "(%t) reader starting\n")); - - for (int iterations = 1; iterations <= n_iterations; iterations++) - { - ACE_Read_Guard<ACE_RW_Mutex> g(rw_mutex); - int n = ++current_readers; - //ACE_DEBUG ((LM_DEBUG, "(%t) I'm reader number %d\n", n)); - - if (current_writers > 0) - ACE_DEBUG ((LM_DEBUG, "(%t) writers found!!!\n")); - - int data = shared_data; - - for (int loop = 1; loop <= n_loops; loop++) - { - ACE_Thread::yield(); - if (shared_data != data) - ACE_DEBUG ((LM_DEBUG, - "(%t) somebody changed %d to %d\n", - data, shared_data)); - } - - --current_readers; - //ACE_DEBUG ((LM_DEBUG, "(%t) done with reading guarded data\n")); - - ACE_Thread::yield (); - } - return 0; -} - -// Iterate <n_iterations> each time modifying the global data -// and checking that nobody steps on it while we can write it. - -static void * -writer (void *) -{ - ACE_Thread_Control tc (&thr_mgr); - ACE_DEBUG ((LM_DEBUG, "(%t) writer starting\n")); - - for (int iterations = 1; iterations <= n_iterations; iterations++) - { - ACE_Write_Guard<ACE_RW_Mutex> g(rw_mutex); - - ++current_writers; - //ACE_DEBUG ((LM_DEBUG, "(%t) writing to guarded data\n")); - - if (current_writers > 1) - ACE_DEBUG ((LM_DEBUG, "(%t) other writers found!!!\n")); - - if (current_readers > 0) - ACE_DEBUG ((LM_DEBUG, "(%t) readers found!!!\n")); - - int self = (int) ACE_Thread::self (); - shared_data = self; - - for (int loop = 1; loop <= n_loops; loop++) - { - ACE_Thread::yield(); - if (shared_data != self) - ACE_DEBUG ((LM_DEBUG, "(%t) somebody wrote on my data %d\n", shared_data)); - } - - --current_writers; - - //ACE_DEBUG ((LM_DEBUG, "(%t) done with guarded data\n")); - ACE_Thread::yield (); - } - return 0; -} - -// Spawn off threads. - -int main (int argc, char *argv[]) -{ - ACE_LOG_MSG->open (argv[0]); - parse_args (argc, argv); - - current_readers = 0; // Possibly already done - current_writers = 0; // Possibly already done - - ACE_DEBUG ((LM_DEBUG, "(%t) main thread starting\n")); - - if (thr_mgr.spawn_n (n_readers, reader, 0, THR_NEW_LWP) == -1 || - thr_mgr.spawn_n (n_writers, writer, 0, THR_NEW_LWP) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "spawn_n"), 1); - - thr_mgr.wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) exiting main thread\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ - diff --git a/examples/Threads/test_recursive_mutex.cpp b/examples/Threads/test_recursive_mutex.cpp deleted file mode 100644 index 1cc2892b2a8..00000000000 --- a/examples/Threads/test_recursive_mutex.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// $Id$ - -// This test program verifies the functionality of the ACE_OS -// implementation of recursive mutexes on Win32 and Posix pthreads. - -#include "ace/Service_Config.h" -#include "ace/Get_Opt.h" -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -// Total number of iterations. -static size_t n_iterations = 1000; -static size_t n_threads = 4; - -// Explain usage and exit. -static void -print_usage_and_die (void) -{ - ACE_DEBUG ((LM_DEBUG, - "usage: %n [-t n_threads] [-n iteration_count]\n")); - ACE_OS::exit (1); -} - -// Parse the command-line arguments and set options. - -static void -parse_args (int argc, char *argv[]) -{ - ACE_Get_Opt get_opt (argc, argv, "n:t:"); - - int c; - - while ((c = get_opt ()) != -1) - switch (c) - { - case 'n': - n_iterations = ACE_OS::atoi (get_opt.optarg); - break; - case 't': - n_threads = ACE_OS::atoi (get_opt.optarg); - break; - default: - print_usage_and_die (); - break; - } -} - -static void -recursive_worker (size_t nesting_level, - ACE_Recursive_Thread_Mutex *rm) -{ - if (nesting_level < n_iterations) - { - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = trying to acquire, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - { - // This illustrates the use of the ACE_Guard<LOCK> with an - // ACE_Recursive_Thread_Mutex. - ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_mon, *rm); - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = acquired, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - - recursive_worker (nesting_level + 1, rm); - } - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) = released, nesting = %d, thread id = %u\n", - rm->get_nesting_level (), rm->get_thread_id ())); - } -} - -static void * -worker (void *arg) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - ACE_Recursive_Thread_Mutex *rm = (ACE_Recursive_Thread_Mutex *) arg; - - recursive_worker (0, rm); - return 0; -} - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon (argv[0]); - - parse_args (argc, argv); - ACE_Recursive_Thread_Mutex rm; - - ACE_Service_Config::thr_mgr ()->spawn_n (n_threads, - ACE_THR_FUNC (worker), - (void *) &rm); - - ACE_Service_Config::thr_mgr ()->wait (); - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support process mutexes on this platform (yet)\n"), - -1); -} -#endif /* ACE_WIN32 */ diff --git a/examples/Threads/test_task.cpp b/examples/Threads/test_task.cpp deleted file mode 100644 index 7cd7976d2bb..00000000000 --- a/examples/Threads/test_task.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// This test program illustrates how the ACE barrier synchronization -// $Id$ - -// mechanisms work in conjunction with the ACE_Task and the -// ACE_Thread_Manager. It is instructive to compare this with the -// test_barrier.cpp test to see how they differ. - -#include "ace/Task.h" -#include "ace/Service_Config.h" -#include "ace/Log_Msg.h" - -#if defined (ACE_HAS_THREADS) - -#include "ace/Task.h" - -class Barrier_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations); - - virtual int svc (void); - // Iterate <n_iterations> time printing off a message and "waiting" - // for all other threads to complete this iteration. - -private: - ACE_Barrier barrier_; - // Reference to the tester barrier. This controls each - // iteration of the tester function running in every thread. - - int n_iterations_; - // Number of iterations to run. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations) - : ACE_Task<ACE_MT_SYNCH> (thr_mgr), - barrier_ (n_threads), - n_iterations_ (n_iterations) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Barrier_Task::svc (void) -{ - // Note that the ACE_Task::svc_run() method automatically adds us to - // the Thread_Manager when the thread begins. - - for (int iterations = 1; - iterations <= this->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations)); - - // Block until all other threads have waited, then continue. - this->barrier_.wait (); - } - - // Note that the ACE_Task::svc_run() method automatically removes us - // from the Thread_Manager when the thread exits. - - return 0; -} - -// Default number of threads to spawn. -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - Barrier_Task barrier_task (ACE_Service_Config::thr_mgr (), - n_threads, - n_iterations); - - // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_task_four.cpp b/examples/Threads/test_task_four.cpp deleted file mode 100644 index 64209cb3430..00000000000 --- a/examples/Threads/test_task_four.cpp +++ /dev/null @@ -1,248 +0,0 @@ -// $Id$ - -// The following test was written by Hamutal Yanay & Ari Erev's -// (Ari_Erev@comverse.com). -// -// This test program test enhancements to the thread_manager and task -// classes. The purpose of these enhancements was to allow the -// thread_manager to recognize the concept of an ACE_Task and to be -// able to group ACE_Tasks in groups. -// -// There are two main ACE_Tasks in this sample: -// -// Invoker_Task - is run from main (). It's purpose is to run a number of -// ACE_Tasks of type Worker_Task. The number can be specified -// on the command line. -// After starting the tasks, the Invoker_Task groups all the tasks -// in one group and then uses the -// num_tasks_in_group () to find out if the real number of tasks -// that are now running (should be the same as the number of tasks -// started). -// It also, suspends and resumes all the threads in the group to -// test the suspend_grp () and resume_grp () methods. -// Then it waits for all the tasks to end. -// Worker_Task - ACE_Tasks that are started by the Invoker_Task. -// Each Worker_Task can start a number of threads. -// The Worker_Task threads perform some work (iteration). The number -// of the iterations can be specified on the command line. -// -// The command line syntax is: -// -// test_task [num_tasks] [num_threads] [num_iterations] - -#include "ace/Task.h" -#include "ace/Service_Config.h" - - -#if defined (ACE_HAS_THREADS) - -#include "ace/Task.h" - -class Invoker_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Invoker_Task (ACE_Thread_Manager *thr_mgr, - int n_tasks, - int n_threads, - int n_iterations); - virtual int svc (void); - // creats <n_tasks> and wait for them to finish - -private: - int n_tasks_; - // Number of tasks to start. - int n_threads_; - // Number of threads per task. - int n_iterations_; - // Number of iterations per thread. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -class Worker_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations); - virtual int svc (void); - // Does a small work... - virtual int open (void * = NULL); -private: - static int workers_count_; - int index_; - int n_threads_; - int n_iterations_; - - // = Not needed for this test. - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -int Worker_Task::workers_count_ = 1; - -Worker_Task::Worker_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations) - : n_threads_ (n_threads), - n_iterations_ (n_iterations), - ACE_Task<ACE_MT_SYNCH> (thr_mgr) -{ - index_ = workers_count_++; -} - -int -Worker_Task::open (void *) -{ - // Create worker threads. - int rc = this->activate (THR_NEW_LWP, n_threads_, 0, 0, -1, this); - - if (rc == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); - - return rc; -} - -int -Worker_Task::svc (void) -{ - ACE_DEBUG ((LM_DEBUG, " (%t) in worker %d\n", index_)); - - for (int iterations = 1; - iterations <= this->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, " (%t) in iteration %d\n", iterations)); - ACE_OS::sleep (0); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) worker %d ends\n", index_)); - - return 0; -} - -Invoker_Task::Invoker_Task (ACE_Thread_Manager *thr_mgr, - int n_tasks, - int n_threads, - int n_iterations) - : n_tasks_ (n_tasks), - n_threads_ (n_threads), - n_iterations_ (n_iterations), - ACE_Task<ACE_MT_SYNCH> (thr_mgr) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, 1, 0, 0, -1, this) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Invoker_Task::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us to - // the Thread_Manager when the thread begins. - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - Worker_Task **pTask = new Worker_Task* [n_tasks_]; - - for (int task = 0; - task < this->n_tasks_; - task++) - { - ACE_DEBUG ((LM_DEBUG, " (%t) in task %d\n", task+1)); - pTask[task] = new Worker_Task (thr_mgr, n_threads_, n_iterations_); - pTask[task]->open (); - } - - // Set all tasks to be one group - ACE_DEBUG ((LM_DEBUG, " (%t) setting tasks group id\n")); - for (task = 0; - task < this->n_tasks_; - task++) - if (thr_mgr->set_grp (pTask[task], 1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "set_grp")); - - int nTasks = thr_mgr->num_tasks_in_group (1); - cout << "Number of tasks in group 1: " << nTasks << endl; - - // Wait for 1 second and then suspend every thread in the group. - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, " (%t) suspending group\n")); - if (thr_mgr->suspend_grp (1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "suspend_grp")); - - // Wait for 5 more second and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (5)); - - // @QTSK This ACE_DEBUG statement blows us away! can't understand why - ACE_DEBUG ((LM_DEBUG, " (%t) resuming group\n")); - if (thr_mgr->resume_grp (1) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "resume_grp")); - - - // Wait for all the tasks to reach their exit point. - thr_mgr->wait (); - - // Note that the ACE_Task::svc_run () method automatically removes us - // from the Thread_Manager when the thread exits. - - return 0; -} - -// Default number of tasks and iterations. -static const int DEFAULT_TASKS = 4; -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - int n_tasks = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_TASKS; - int n_threads = argc > 2 ? ACE_OS::atoi (argv[2]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 3 ? ACE_OS::atoi (argv[3]) : DEFAULT_ITERATIONS; - - // Since ACE_Thread_Manager can only wait for all threads, we'll have - // special manager for the Invoker_Task. - ACE_Thread_Manager invoker_manager; - - Invoker_Task invoker (&invoker_manager, - n_tasks, - n_threads, - n_iterations); - - // Wait for 1 second and then suspend the invoker task - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, " (%t) suspending invoker task\n")); - - if (invoker_manager.suspend_task (&invoker) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "suspend_task")); - - // Wait for 5 more second and then resume the invoker task. - ACE_OS::sleep (ACE_Time_Value (5)); - - // @QTSK This ACE_DEBUG statement blows us away! can't understand why - ACE_DEBUG ((LM_DEBUG, " (%t) resuming invoker task\n")); - if (invoker_manager.resume_task (&invoker) == -1) - ACE_ERROR ((LM_DEBUG, " (%t) %p\n", "resume_task")); - - - // Wait for all the threads to reach their exit point. - invoker_manager.wait (); - - // @QTSK This ACE_DEBUG statement blows us away! can't understand why - ACE_DEBUG ((LM_DEBUG, " (%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_task_one.cpp b/examples/Threads/test_task_one.cpp deleted file mode 100644 index d0a8a12e6c4..00000000000 --- a/examples/Threads/test_task_one.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// This test program illustrates how the ACE barrier synchronization -// $Id$ - -// mechanisms work in conjunction with the ACE_Task and the -// ACE_Thread_Manager. It is instructive to compare this with the -// test_barrier.cpp test to see how they differ. - -#include "ace/Task.h" -#include "ace/Service_Config.h" - - -#if defined (ACE_HAS_THREADS) - -#include "ace/Task.h" - -class Barrier_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations); - - virtual int svc (void); - // Iterate <n_iterations> time printing off a message and "waiting" - // for all other threads to complete this iteration. - -private: - ACE_Barrier barrier_; - // Reference to the tester barrier. This controls each - // iteration of the tester function running in every thread. - - int n_iterations_; - // Number of iterations to run. - - // = Not needed for this test. - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } -}; - -Barrier_Task::Barrier_Task (ACE_Thread_Manager *thr_mgr, - int n_threads, - int n_iterations) - : ACE_Task<ACE_MT_SYNCH> (thr_mgr), - barrier_ (n_threads), - n_iterations_ (n_iterations) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Barrier_Task::svc (void) -{ - // Note that the ACE_Task::svc_run() method automatically adds us to - // the Thread_Manager when the thread begins. - - for (int iterations = 1; - iterations <= this->n_iterations_; - iterations++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d\n", iterations)); - - // Block until all other threads have waited, then continue. - this->barrier_.wait (); - } - - // Note that the ACE_Task::svc_run() method automatically removes us - // from the Thread_Manager when the thread exits. - - return 0; -} - -// Default number of threads to spawn. -static const int DEFAULT_ITERATIONS = 5; - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - Barrier_Task barrier_task (ACE_Service_Config::thr_mgr (), - n_threads, - n_iterations); - - // Wait for all the threads to reach their exit point. - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) done\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_task_three.cpp b/examples/Threads/test_task_three.cpp deleted file mode 100644 index c6ad69511b5..00000000000 --- a/examples/Threads/test_task_three.cpp +++ /dev/null @@ -1,230 +0,0 @@ -// $Id$ - -// Exercise more tests for the ACE Tasks. This also shows off some -// Interesting uses of the ACE Log_Msg's ability to print to ostreams. -// BTW, make sure that you set the out_stream in *every* thread that -// you want to have write to the output file, i.e.: -// -// -// if (out_stream) -// { -// ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); -// ACE_LOG_MSG->msg_ostream (out_stream); -// } - -#include <fstream.h> -#include "ace/Reactor.h" -#include "ace/Service_Config.h" -#include "ace/Task.h" - - -#if defined (ACE_HAS_THREADS) - -static ofstream *out_stream = 0; - -static const int NUM_INVOCATIONS = 100; -static const int TASK_COUNT = 130; - -class Test_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Test_Task (void); - ~Test_Task (void); - - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); - virtual int svc (void); - - virtual int handle_input (ACE_HANDLE fd); - - ACE_Reactor *r_; - int handled_; - static int current_count_; - static int done_cnt_; -}; - -int Test_Task::current_count_ = 0; -int Test_Task::done_cnt_ = 0; - -static ACE_Thread_Mutex lock_; - -Test_Task::Test_Task (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - this->handled_ = 0; - Test_Task::current_count_++; - ACE_DEBUG ((LM_DEBUG, - "Test_Task constructed, current_count_ = %d\n", - Test_Task::current_count_)); -} - -Test_Task::~Test_Task (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - ACE_DEBUG ((LM_DEBUG, "Test_Task destroyed, current_count_ = %d\n", - Test_Task::current_count_)); -} - -int -Test_Task::open (void *args) -{ - r_ = (ACE_Reactor *) args; - return ACE_Task<ACE_MT_SYNCH>::activate (THR_NEW_LWP); -} - -int -Test_Task::close (u_long) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - - Test_Task::current_count_--; - ACE_DEBUG ((LM_DEBUG, "Test_Task::close () current_count_ = %d.\n", - Test_Task::current_count_)); - return 0; -} - -int -Test_Task::put (ACE_Message_Block *, ACE_Time_Value *) -{ - return 0; -} - -Test_Task::svc (void) -{ - // Every thread must register the same stream to write to file. - if (out_stream) - { - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - for (int index = 0; index < NUM_INVOCATIONS; index++) - { - ACE_OS::thr_yield (); - - if (r_->notify (this, ACE_Event_Handler::READ_MASK)) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - - ACE_DEBUG ((LM_DEBUG, "Test_Task: error notifying reactor!\n")); - } - } - - ACE_DEBUG ((LM_DEBUG, " (%t) returning from svc ()\n")); - return 0; -} - -int -Test_Task::handle_input (ACE_HANDLE) -{ - this->handled_++; - - if (this->handled_ == NUM_INVOCATIONS) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock_, -1); - Test_Task::done_cnt_++; - ACE_DEBUG ((LM_DEBUG, - " (%t) Test_Task: handle_input! done_cnt_ = %d.\n", - Test_Task::done_cnt_)); - } - - ACE_OS::thr_yield (); - return -1; -} - -static void * -dispatch (void *arg) -{ - // every thread must register the same stream to write to file - if (out_stream) - { - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - ACE_DEBUG ((LM_DEBUG, " (%t) Dispatcher Thread started!\n")); - ACE_Reactor *r = (ACE_Reactor *) arg; - int result; - - r->owner (ACE_OS::thr_self ()); - - while (1) - { - result = r->handle_events (); - if (result <= 0) - ACE_DEBUG ((LM_DEBUG, "Dispatch: handle_events (): %d", result)); - } - - return 0; -} - -extern "C" void -handler (int) -{ - *out_stream << flush; - out_stream->close (); - ACE_OS::exit (42); -} - -int -main (int argc, char **argv) -{ - if (argc > 1) - { - // Send output to file. - out_stream = new ofstream ("test_task_three.out", ios::trunc|ios::out); - ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM); - ACE_LOG_MSG->msg_ostream (out_stream); - } - - // Register a signal handler. - ACE_Sig_Action sa (ACE_SignalHandler (handler), SIGINT); - - ACE_Reactor *reactor1 = ACE_Service_Config::reactor (); - ACE_Reactor *reactor2 = new ACE_Reactor (); - - Test_Task t1[TASK_COUNT]; - Test_Task t2[TASK_COUNT]; - - ACE_Thread::spawn (ACE_THR_FUNC (dispatch), reactor2); - - reactor1->owner (ACE_OS::thr_self ()); - - for (int index = 0; index < TASK_COUNT; index++) - { - t1[index].open (reactor1); - t2[index].open (reactor2); - } - - ACE_OS::sleep (3); - - for (;;) - { - ACE_Time_Value timeout (2); - - if (reactor1->handle_events (timeout) <= 0) - { - if (errno == ETIME) - { - ACE_DEBUG ((LM_DEBUG, "no activity within 2 seconds, shutting down\n")); - break; - } - else - ACE_ERROR ((LM_ERROR, "%p error handling events\n", "main")); - } - } - - return 0; -} - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_task_two.cpp b/examples/Threads/test_task_two.cpp deleted file mode 100644 index 9f25962c795..00000000000 --- a/examples/Threads/test_task_two.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// $Id$ - -// Exercise more tests for the ACE Tasks. This test can spawn off -// zillions of tasks and then wait for them using both polling and the -// ACE Thread Manager. - -#include "ace/Task.h" - -#include "ace/Service_Config.h" -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -typedef ACE_Atomic_Op<ACE_Thread_Mutex, u_long> ATOMIC_INT; - -static u_long zero = 0; -static ATOMIC_INT task_count (zero); -static ATOMIC_INT max_count (zero); -static ATOMIC_INT wait_count (zero); - -static u_long n_threads = 0; - -// Default number of tasks. -static const int default_threads = ACE_DEFAULT_THREADS; - -// Default number of times to run the test. -static const int default_iterations = 1000; - -class Task_Test : public ACE_Task<ACE_MT_SYNCH> -{ -public: - virtual int open (void *args = 0); - virtual int close (u_long flags = 0); - virtual int put (ACE_Message_Block *, ACE_Time_Value *tv = 0); - virtual int svc (void); - -private: - static ACE_Thread_Mutex lock_; -}; - -ACE_Thread_Mutex Task_Test::lock_; - -int -Task_Test::open (void *) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Task_Test::lock_, -1); - - task_count++; - ACE_DEBUG ((LM_DEBUG, "(%t) creating Task_Test, task count = %d\n", - (u_long) task_count)); - - return this->activate (THR_BOUND); -} - -int -Task_Test::close (u_long) -{ - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Task_Test::lock_, -1); - - task_count--; - ACE_DEBUG ((LM_DEBUG, "(%t) destroying Task_Test, task count = %d\n", - (u_long) task_count)); - wait_count--; -// delete this; - return 0; -} - -int -Task_Test::put (ACE_Message_Block *, - ACE_Time_Value *) -{ - return 0; -} - -int -Task_Test::svc (void) -{ - wait_count++; - max_count++; - - ACE_DEBUG ((LM_DEBUG, "(%t) svc: waiting\n")); - - for (;;) - if (max_count >= n_threads) - break; - else - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, "(%t) svc: finished waiting\n")); - return 0; -} - -int -main (int argc, char *argv[]) -{ - n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : default_threads; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : default_iterations; - - Task_Test **task_array = new Task_Test *[n_threads]; - - for (int i = 1; i <= n_iterations; i++) - { - ACE_DEBUG ((LM_DEBUG, "(%t) iteration = %d, max_count %d\n", - i, (u_long) max_count)); - max_count = 0; - - ACE_DEBUG ((LM_DEBUG, "(%t) starting %d task%s\n", - n_threads, n_threads == 1 ? "" : "s")); - - // Launch the new tasks. - for (int j = 0; j < n_threads; j++) - { - task_array[j] = new Task_Test; - // Activate the task, i.e., make it an active object. - task_array[j]->open (); - } - - // Wait for initialization to kick in. - while (max_count == 0) - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, "(%t) waiting for threads to finish\n")); - - // Wait for the threads to finish this iteration. - while (max_count != n_threads && wait_count != 0) - ACE_Thread::yield (); - - ACE_DEBUG ((LM_DEBUG, "(%t) iteration %d finished, max_count %d, wait_count %d, waiting for tasks to exit\n", - i, (u_long) max_count, (u_long) wait_count)); - - // Wait for all the tasks to exit. - ACE_Service_Config::thr_mgr ()->wait (); - - // Delete the existing tasks. - for (int k = 0; k < n_threads; k++) - delete task_array[k]; - } - - delete [] task_array; - - ACE_DEBUG ((LM_DEBUG, "(%t) shutting down the test\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, u_long>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_thread_manager.cpp b/examples/Threads/test_thread_manager.cpp deleted file mode 100644 index 73029d70d88..00000000000 --- a/examples/Threads/test_thread_manager.cpp +++ /dev/null @@ -1,104 +0,0 @@ -// $Id$ - -// Test out the group management mechanisms provided by the -// ACE_Thread_Manager, including the group signal handling, group -// suspension and resumption, and cooperative thread cancellation -// mechanisms. - -#include "ace/Service_Config.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) - -extern "C" void -handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) received signal %d\n", signum)); -} - -static void * -worker (int iterations) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - for (int i = 0; i < iterations; i++) - { - if ((i % 1000) == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) checking cancellation before iteration %d!\n", - i)); - - if (ACE_Service_Config::thr_mgr ()->testcancel (ACE_Thread::self ()) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) has been cancelled before iteration %d!\n", - i)); - break; - } - } - } - - // Destructor removes thread from Thread_Manager. - return 0; -} - -static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; -static const int DEFAULT_ITERATIONS = 100000; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - daemon.open (argv[0]); - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - - int grp_id = thr_mgr->spawn_n (n_threads, ACE_THR_FUNC (worker), - (void *) n_iterations, - THR_NEW_LWP | THR_DETACHED); - - // Wait for 1 second and then suspend every thread in the group. - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, "(%t) suspending group\n")); - if (thr_mgr->suspend_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "suspend_grp")); - - // Wait for 1 more second and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) resuming group\n")); - if (thr_mgr->resume_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "resume_grp")); - - // Wait for 1 more second and then send a SIGINT to every thread in - // the group. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) signaling group\n")); - if (thr_mgr->kill_grp (grp_id, SIGINT) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "kill_grp")); - - // Wait for 1 more second and then cancel all the threads. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) cancelling group\n")); - if (thr_mgr->cancel_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "cancel_grp")); - - // Perform a barrier wait until all the threads have shut down. - thr_mgr->wait (); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_thread_pool.cpp b/examples/Threads/test_thread_pool.cpp deleted file mode 100644 index 68741156b83..00000000000 --- a/examples/Threads/test_thread_pool.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// This test program illustrates how the ACE task synchronization -// $Id$ - -// mechanisms work in conjunction with the ACE_Task and the -// ACE_Thread_Manager. If the manual flag is not set input comes from -// stdin until the user enters a return only. This stops all workers -// via a message block of length 0. This is an alternative shutdown of -// workers compared to queue deactivate. -// -// This code is original based on a test program written by Karlheinz -// Dorn. It was modified to utilize more "ACE" features by Doug Schmidt. - -#include "ace/Task.h" -#include "ace/Service_Config.h" - -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -// Number of iterations to run the test. -static size_t n_iterations = 100; - -class Thread_Pool : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Thread_Pool (ACE_Thread_Manager *thr_mgr, int n_threads); - - virtual int svc (void); - // Iterate <n_iterations> time printing off a message and "waiting" - // for all other threads to complete this iteration. - - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv=0); - // This allows the producer to pass messages to the <Thread_Pool>. - -private: - virtual int close (u_long); - - // = Not needed for this test. - virtual int open (void *) { return 0; } -}; - -int -Thread_Pool::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) close of worker\n")); - return 0; -} - -Thread_Pool::Thread_Pool (ACE_Thread_Manager *thr_mgr, - int n_threads) - : ACE_Task<ACE_MT_SYNCH> (thr_mgr) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Simply enqueue the Message_Block into the end of the queue. - -int -Thread_Pool::put (ACE_Message_Block *mb, ACE_Time_Value *tv) -{ - return this->putq (mb, tv); -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Thread_Pool::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us to - // the Thread_Manager when the thread begins. - - int result = 0; - int count = 1; - - // Keep looping, reading a message out of the queue, until we get a - // message with a length == 0, which signals us to quit. - - for (;; count++) - { - ACE_Message_Block *mb; - - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d before getq ()\n", count)); - - if (this->getq (mb) == -1) - { - ACE_ERROR ((LM_ERROR, - "(%t) in iteration %d, got result -1, exiting\n", count)); - break; - } - - int length = mb->length (); - - if (length > 0) - ACE_DEBUG ((LM_DEBUG, - "(%t) in iteration %d, length = %d, text = \"%*s\"\n", - count, length, length - 1, mb->rd_ptr ())); - - // We're responsible for deallocating this. - delete mb; - - if (length == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) in iteration %d, got NULL message, exiting\n", - count)); - break; - } - } - - // Note that the ACE_Task::svc_run () method automatically removes - // us from the Thread_Manager when the thread exits. - return 0; -} - -static void -produce (Thread_Pool &thread_pool) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) producer start, dumping the Thread_Pool\n")); - thread_pool.dump (); - - for (int n;;) - { - // Allocate a new message. - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - -#if defined (manual) - ACE_DEBUG ((LM_DEBUG, - "(%t) press chars and enter to put a new message into task queue...")); - n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); -#else // Automatically generate messages. - static int count = 0; - - ACE_OS::sprintf (mb->rd_ptr (), "%d\n", count); - - n = ACE_OS::strlen (mb->rd_ptr ()); - - if (count == n_iterations) - n = 1; // Indicate that we need to shut down. - else - count++; - - if (count == 0 || (count % 20 == 0)) - ACE_OS::sleep (1); -#endif /* manual */ - if (n > 1) - { - // Send a normal message to the waiting threads and continue - // producing. - mb->wr_ptr (n); - - // Pass the message to the Thread_Pool. - if (thread_pool.put (mb) == -1) - ACE_ERROR ((LM_ERROR, " (%t) %p\n", "put")); - } - else - { - // Send a shutdown message to the waiting threads and exit. - ACE_DEBUG ((LM_DEBUG, "\n(%t) start loop, dump of task:\n")); - thread_pool.dump (); - - for (int i = thread_pool.thr_count (); i > 0; i--) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) EOF, enqueueing NULL block for thread = %d\n", - i)); - - // Enqueue a NULL message to flag each consumer to - // shutdown. - if (thread_pool.put (new ACE_Message_Block) == -1) - ACE_ERROR ((LM_ERROR, " (%t) %p\n", "put")); - } - - ACE_DEBUG ((LM_DEBUG, "\n(%t) end loop, dump of task:\n")); - thread_pool.dump (); - break; - } - } -} - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : n_iterations; - - ACE_DEBUG ((LM_DEBUG, "(%t) argc = %d, threads = %d\n", - argc, n_threads)); - - // Create the worker tasks. - Thread_Pool thread_pool (ACE_Service_Config::thr_mgr (), - n_threads); - - // Create work for the worker tasks to process in their own threads. - produce (thread_pool); - - // Wait for all the threads to reach their exit point. - - ACE_DEBUG ((LM_DEBUG, "(%t) waiting with thread manager...\n")); - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) destroying worker tasks and exiting...\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_thread_specific.cpp b/examples/Threads/test_thread_specific.cpp deleted file mode 100644 index f7a4f6dccf3..00000000000 --- a/examples/Threads/test_thread_specific.cpp +++ /dev/null @@ -1,219 +0,0 @@ -#include "ace/Service_Config.h" -// $Id$ - -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -// Define a class that will be stored in thread-specific data. Note -// that as far as this class is concerned it's just a regular C++ -// class. The ACE_TSS wrapper transparently ensures that -// objects of this class will be placed in thread-specific storage. -// All calls on ACE_TSS::operator->() are delegated to the -// appropriate method in the Errno class. - -class Errno -{ -public: - int error (void) { return this->errno_; } - void error (int i) { this->errno_ = i; } - - int line (void) { return this->lineno_; } - void line (int l) { this->lineno_ = l; } - - // Errno::flags_ is a static variable, so we've got to protect it - // with a mutex since it isn't kept in thread-specific storage. - int flags (void) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1); - - return Errno::flags_; - } - - void flags (int f) - { - ACE_GUARD (ACE_Thread_Mutex, ace_mon, Errno::lock_); - - Errno::flags_ = f; - } - -private: - // = errno_ and lineno_ will be thread-specific data so they don't - // need a lock. - int errno_; - int lineno_; - - static int flags_; -#if defined (ACE_HAS_THREADS) - // flags_ needs a lock. - static ACE_Thread_Mutex lock_; -#endif /* ACE_HAS_THREADS */ -}; - -// Static variables. -ACE_MT (ACE_Thread_Mutex Errno::lock_); -int Errno::flags_; - -// This is our thread-specific error handler... -static ACE_TSS<Errno> TSS_Error; - -#if defined (ACE_HAS_THREADS) -// Serializes output via cout. -static ACE_Thread_Mutex lock; - -typedef ACE_TSS_Guard<ACE_Thread_Mutex> GUARD; -#else -// Serializes output via cout. -static ACE_Null_Mutex lock; - -typedef ACE_Guard<ACE_Null_Mutex> GUARD; -#endif /* ACE_HAS_THREADS */ - -static void -cleanup (void *ptr) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) in cleanup, ptr = %x\n", ptr)); - - delete ptr; -} - -// This worker function is the entry point for each thread. - -static void * -worker (void *c) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - int count = int (c); - - ACE_thread_key_t key = 0; - int *ip = 0; - - // Make one key that will be available when the thread exits so that - // we'll have something to cleanup! - - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - for (int i = 0; i < count; i++) - { - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - ACE_DEBUG ((LM_DEBUG, "(%t) in worker 1, key = %d, ip = %x\n", key, ip)); - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - delete ip; - - if (ACE_OS::thr_keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keyfree")); - - // Cause an error. - ACE_OS::read (ACE_INVALID_HANDLE, 0, 0); - - // The following two lines set the thread-specific state. - TSS_Error->error (errno); - TSS_Error->line (__LINE__); - - // This sets the static state (note how C++ makes it easy to do - // both). - TSS_Error->flags (count); - - { - // Use the guard to serialize access to cout... - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock, 0); - - cout << "(" << ACE_Thread::self () - << ") errno = " << TSS_Error->error () - << ", lineno = " << TSS_Error->line () - << ", flags = " << TSS_Error->flags () - << endl; - } - key = 0; - - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - ACE_DEBUG ((LM_DEBUG, "(%t) in worker 2, key = %d, ip = %x\n", key, ip)); - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - delete ip; - - if (ACE_OS::thr_keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keyfree")); - } - - ACE_DEBUG ((LM_DEBUG, "(%t) exiting\n")); - return 0; -} - -extern "C" void -handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "signal = %S\n", signum)); - ACE_Service_Config::thr_mgr ()->exit (0); -} - -int -main (int argc, char *argv[]) -{ - // The Service_Config must be the first object defined in main... - ACE_Service_Config daemon (argv[0]); - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - int threads = argc > 1 ? ACE_OS::atoi (argv[1]) : 4; - int count = argc > 2 ? ACE_OS::atoi (argv[2]) : 10000; - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) (handler), SIGINT); - -#if defined (ACE_HAS_THREADS) - if (ACE_Service_Config::thr_mgr ()->spawn_n (threads, - ACE_THR_FUNC (&worker), - (void *) count, - THR_BOUND | THR_DETACHED) == -1) - ACE_OS::perror ("ACE_Thread_Manager::spawn_n"); - - ACE_Service_Config::thr_mgr ()->wait (); -#else - worker ((void *) count); -#endif /* ACE_HAS_THREADS */ - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_TSS<Errno>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_token.cpp b/examples/Threads/test_token.cpp deleted file mode 100644 index 5a51496d011..00000000000 --- a/examples/Threads/test_token.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// Test out the ACE Token class. -// $Id$ - -#include "ace/Token.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -class My_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - My_Task (int n); - virtual int open (void *) { return 0; } - virtual int close (u_long) { return 0; } - virtual int put (ACE_Message_Block *, ACE_Time_Value *) { return 0; } - virtual int svc (void); - - static void sleep_hook (void *); - -private: - ACE_Token token_; -}; - -My_Task::My_Task (int n) -{ - // Make this Task into an Active Object. - this->activate (THR_BOUND | THR_DETACHED, n); - - // Wait for all the threads to exit. - this->thr_mgr ()->wait (); -} - -void -My_Task::sleep_hook (void *) -{ - cerr << '(' << ACE_Thread::self () << ')' - << " blocking, My_Task::sleep_hook () called" << endl; -} - -// Test out the behavior of the ACE_Token class. - -int -My_Task::svc (void) -{ - for (int i = 0; i < 10000; i++) - { - // Wait for up to 1 millisecond past the current time to get the token. - ACE_Time_Value timeout (ACE_OS::time (0), 1000); - - if (this->token_.acquire (&My_Task::sleep_hook, 0, &timeout) == 1) - { - this->token_.acquire (); - this->token_.renew (); - this->token_.release (); - this->token_.release (); - } - else - ACE_Thread::yield (); - } - return 0; -} - -int -main (int argc, char *argv[]) -{ - My_Task tasks (argc > 1 ? atoi (argv[1]) : 4); - - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform doesn't support threads\n"), -1); -} -#endif /* */ diff --git a/examples/Threads/test_tss.cpp b/examples/Threads/test_tss.cpp deleted file mode 100644 index c81ca41c429..00000000000 --- a/examples/Threads/test_tss.cpp +++ /dev/null @@ -1,235 +0,0 @@ -// Torture test ACE thread-specific storage... -// $Id$ - - -#include "ace/Task.h" -#include "ace/Token.h" - -#if defined (ACE_HAS_THREADS) - -class TSS_Obj -{ -public: - - TSS_Obj (void); - ~TSS_Obj (void); - -private: - static int count_; - static ACE_Thread_Mutex lock_; -}; - -int TSS_Obj::count_ = 0; -ACE_Thread_Mutex TSS_Obj::lock_; - -TSS_Obj::TSS_Obj (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - count_++; - cout << "TO+ : " << count_ << endl; -} - -TSS_Obj::~TSS_Obj (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - count_--; - cout << "TO- : " << count_ << endl; -} - -class Test_Task -{ -public: - - Test_Task (void); - ~Test_Task (void); - - int open (void *arg); - - static void* svc (void *arg); - - static int wait_count_; - static int max_count_; - -private: - static int count_; -}; - -int Test_Task::count_ = 0; -int Test_Task::wait_count_ = 0; -int Test_Task::max_count_ = 0; -int num_threads_ = 0; - -ACE_Token token; - -Test_Task::Test_Task (void) -{ - ACE_GUARD (ACE_Token, ace_mon, token); - - count_++; - cout << "Test_Task+ : " - << count_ << " (" - << ACE_OS::thr_self () - << ")" << endl; -} - -Test_Task::~Test_Task (void) -{ - ACE_GUARD (ACE_Token, ace_mon, token); - - count_--; - cout << "Test_Task- : " - << count_ << " (" - << ACE_OS::thr_self () - << ")" << endl; - - wait_count_--; -} - -int Test_Task::open (void *arg) -{ - - ACE_Thread::spawn (Test_Task::svc, arg); - - return 0; -} - - -void * -Test_Task::svc (void *arg) -{ - ACE_TSS<TSS_Obj> tss (new TSS_Obj); - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - wait_count_++; - max_count_++; - cout << "svc: waiting (" << ACE_OS::thr_self () << ")" << endl; - } - - while (1) - { - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - if (max_count_ >= num_threads_) - break; - else - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - } - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - cout << "svc: waiting (" << ACE_OS::thr_self () << ") finished" << endl; - } - } - - delete (Test_Task *) arg; - - return 0; -} - -int -main (int argc, char **argv) -{ - if (argc != 2) - { - cout << "Missing parameters!" << endl; - return 1; - } - - int num_Tasks = atoi (argv[1]); - - num_threads_ = num_Tasks; - - Test_Task **task_arr = (Test_Task**) new char[sizeof (Test_Task*) * num_Tasks]; - - while (1) - { - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - cout << "ReseTest_Tasking Test_Task::max_count_ from: " - << Test_Task::max_count_ << endl; - - Test_Task::max_count_ = 0; - } - - for (int i = 0; i < num_Tasks; i++) - { - task_arr[i] = new Test_Task; - task_arr[i]->open (task_arr[i]); - } - - cout << "Waiting for first thread started..." << endl; - - for (;;) - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - if (Test_Task::max_count_ != 0 ) - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - break; - } - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - cout << "First thread started!" << endl - << "Waiting for all threads finished..." << endl; - } - - for (;;) - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - if (!(Test_Task::max_count_ == num_threads_ - && Test_Task::wait_count_ == 0)) - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - continue; - } - - cout << "Test_Task::max_count_ = " - << Test_Task::max_count_ - << " Test_Task::wait_count_ = " - << Test_Task::wait_count_ - << endl; - break; - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - cout << "All threads finished..." << endl; - } - - ACE_OS::sleep (2); - } - - return 0; -} - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_tss1.cpp b/examples/Threads/test_tss1.cpp deleted file mode 100644 index 7efdc9dc3ef..00000000000 --- a/examples/Threads/test_tss1.cpp +++ /dev/null @@ -1,164 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// TSS_Test.cpp -// -// = DESCRIPTION -// This program tests thread specific storage of data. The ACE_TSS -// wrapper transparently ensures that the objects of this class -// will be placed in thread-specific storage. All calls on -// ACE_TSS::operator->() are delegated to the appropriate method -// in the Errno class. -// -// = AUTHOR -// Detlef Becker -// -// ============================================================================ - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -static int iterations = 100; - -class Errno -{ -public: - int error (void) { return this->errno_; } - void error (int i) { this->errno_ = i; } - - int line (void) { return this->lineno_; } - void line (int l) { this->lineno_ = l; } - - // Errno::flags_ is a static variable, so we've got to protect it - // with a mutex since it isn't kept in thread-specific storage. - int flags (void) { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_Mon, Errno::lock_, -1)); - - return Errno::flags_; - } - int flags (int f) - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1)); - - Errno::flags_ = f; - return 0; - } - -private: - // = errno_ and lineno_ will be thread-specific data so they don't - // need a lock. - int errno_; - int lineno_; - - static int flags_; -#if defined (ACE_HAS_THREADS) - // flags_ needs a lock. - static ACE_Thread_Mutex lock_; -#endif /* ACE_HAS_THREADS */ -}; - -// Static variables. -ACE_MT (ACE_Thread_Mutex Errno::lock_); -int Errno::flags_; - -// This is our thread-specific error handler... -static ACE_TSS<Errno> TSS_Error; - -#if defined (ACE_HAS_THREADS) -// Serializes output via cout. -static ACE_Thread_Mutex lock; - -typedef ACE_TSS_Guard<ACE_Thread_Mutex> GUARD; -#else -// Serializes output via cout. -static ACE_Null_Mutex lock; - -typedef ACE_Guard<ACE_Null_Mutex> GUARD; -#endif /* ACE_HAS_THREADS */ - -// Keeps track of whether Tester::close () has started. -static int close_started = 0; - -template <ACE_SYNCH_1> -class Tester: public ACE_Task<ACE_SYNCH_2> -{ -public: - Tester (void) {} - ~Tester (void) {} - - virtual int open (void *theArgs = 0); - virtual int close (u_long theArg = 0); - virtual int put (ACE_Message_Block *theMsgBlock, - ACE_Time_Value *theTimeVal = 0); - virtual int svc (void); -}; - -template <ACE_SYNCH_1> int -Tester<ACE_SYNCH_2>::open (void *) -{ - return this->activate (); -} - -template <ACE_SYNCH_1> -int Tester<ACE_SYNCH_2>::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "close running\n!")); - close_started = 1; - ACE_OS::sleep (2); - ACE_DEBUG ((LM_DEBUG, "close: trying to log error code 7!\n")); - TSS_Error->error (7); - ACE_DEBUG ((LM_DEBUG, "close: logging succeeded!\n")); - return 0; -} - -template <ACE_SYNCH_1> int -Tester<ACE_SYNCH_2>::put (ACE_Message_Block *, ACE_Time_Value *) -{ - return 0; -} - -template <ACE_SYNCH_1> int -Tester<ACE_SYNCH_2>::svc (void) -{ - return 0; -} - -int -main (int, char *[]) -{ - Tester<ACE_MT_SYNCH> tester; - - tester.open (); - - while (!close_started) - continue; - - ACE_DEBUG ((LM_DEBUG, "main: trying to log error code 7!\n")); - - TSS_Error->error (3); - - ACE_DEBUG ((LM_DEBUG, "main: logging succeeded!\n")); - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_TSS<Errno>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/test_tss2.cpp b/examples/Threads/test_tss2.cpp deleted file mode 100644 index 24a8d958e91..00000000000 --- a/examples/Threads/test_tss2.cpp +++ /dev/null @@ -1,252 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// TSS_Test.cpp -// -// = DESCRIPTION -// This program tests thread specific storage of data. The ACE_TSS -// wrapper transparently ensures that the objects of this class -// will be placed in thread-specific storage. All calls on -// ACE_TSS::operator->() are delegated to the appropriate method -// in the Errno class. -// -// = AUTHOR -// Prashant Jain and Doug Schmidt -// -// ============================================================================ - -#include "ace/Task.h" -#include "ace/Token.h" - -#if defined (ACE_HAS_THREADS) - -class TSS_Obj -{ -public: - - TSS_Obj (void); - ~TSS_Obj (void); - -private: - static int count_; - static ACE_Thread_Mutex lock_; -}; - -int TSS_Obj::count_ = 0; -ACE_Thread_Mutex TSS_Obj::lock_; - -TSS_Obj::TSS_Obj (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - count_++; - cout << "TO+ : " << count_ << endl; -} - -TSS_Obj::~TSS_Obj (void) -{ - ACE_GUARD (ACE_Thread_Mutex, ace_mon, lock_); - - count_--; - cout << "TO- : " << count_ << endl; -} - -class Test_Task -{ -public: - - Test_Task (void); - ~Test_Task (void); - - int open (void *arg); - - static void *svc (void *arg); - static int wait_count_; - static int max_count_; - -private: - static int count_; -}; - -int Test_Task::count_ = 0; -int Test_Task::wait_count_ = 0; -int Test_Task::max_count_ = 0; -int num_threads_ = 0; - -ACE_Token token; - -Test_Task::Test_Task (void) -{ - ACE_GUARD (ACE_Token, ace_mon, token); - - count_++; - cout << "Test_Task+ : " - << count_ << " (" - << ACE_OS::thr_self () - << ")" << endl; -} - -Test_Task::~Test_Task (void) -{ - ACE_GUARD (ACE_Token, ace_mon, token); - - count_--; - cout << "Test_Task- : " - << count_ << " (" - << ACE_OS::thr_self () - << ")" << endl; - - wait_count_--; -} - -void * -Test_Task::svc (void *arg) -{ - ACE_TSS<TSS_Obj> tss (new TSS_Obj); - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - wait_count_++; - max_count_++; - cout << "svc: waiting (" << ACE_OS::thr_self () << ")" << endl; - } - - while (1) - { - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - if (max_count_ >= num_threads_) - break; - else - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - } - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, 0); - - cout << "svc: waiting (" << ACE_OS::thr_self () << ") finished" << endl; - } - } - - delete (Test_Task *) arg; - - return 0; -} - -int -Test_Task::open (void *arg) -{ - if (ACE_Thread::spawn (Test_Task::svc, arg) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Thread::spawn"), 0); - - return 0; -} - -int -main (int argc, char **argv) -{ - if (argc != 2) - { - cout << "Missing parameters!" << endl; - return 1; - } - - int num_Tasks = atoi (argv[1]); - - num_threads_ = num_Tasks; - - Test_Task **task_arr = (Test_Task**) new char[sizeof (Test_Task*) * num_Tasks]; - - while (1) - { - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - cout << "ReseTest_Tasking Test_Task::max_count_ from: " - << Test_Task::max_count_ << endl; - - Test_Task::max_count_ = 0; - } - - for (int i = 0; i < num_Tasks; i++) - { - task_arr[i] = new Test_Task; - task_arr[i]->open (task_arr[i]); - } - - cout << "Waiting for first thread started..." << endl; - - for (;;) - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - if (Test_Task::max_count_ != 0 ) - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - break; - } - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - cout << "First thread started!" << endl - << "Waiting for all threads finished..." << endl; - } - - for (;;) - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - - if (!(Test_Task::max_count_ == num_threads_ - && Test_Task::wait_count_ == 0)) - { - ace_mon.release (); - ACE_Thread::yield (); - ace_mon.acquire (); - continue; - } - - cout << "Test_Task::max_count_ = " - << Test_Task::max_count_ - << " Test_Task::wait_count_ = " - << Test_Task::wait_count_ - << endl; - break; - } - - { - ACE_GUARD_RETURN (ACE_Token, ace_mon, token, -1); - cout << "All threads finished..." << endl; - } - - ACE_OS::sleep (2); - } - - return 0; -} - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/thread_manager.cpp b/examples/Threads/thread_manager.cpp deleted file mode 100644 index 48cd2bb8b04..00000000000 --- a/examples/Threads/thread_manager.cpp +++ /dev/null @@ -1,105 +0,0 @@ -// $Id$ - -// Test out the group management mechanisms provided by the -// ACE_Thread_Manager, including the group signal handling, group -// suspension and resumption, and cooperative thread cancellation -// mechanisms. - -#include "ace/Service_Config.h" -#include "ace/Thread_Manager.h" - -#if defined (ACE_HAS_THREADS) - -extern "C" void -handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) received signal %d\n", signum)); -} - -static void * -worker (int iterations) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - - for (int i = 0; i < iterations; i++) - { - if ((i % 1000) == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) checking cancellation before iteration %d!\n", - i)); - - if (ACE_Service_Config::thr_mgr ()->testcancel (ACE_Thread::self ()) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) has been cancelled before iteration %d!\n", - i)); - break; - } - } - } - - // Destructor removes thread from Thread_Manager. - return 0; -} - -static const int DEFAULT_THREADS = ACE_DEFAULT_THREADS; -static const int DEFAULT_ITERATIONS = 100000; - -int -main (int argc, char *argv[]) -{ - ACE_Service_Config daemon; - - daemon.open (argv[0]); - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - ACE_UNUSED_ARG (sa); - - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : DEFAULT_THREADS; - int n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : DEFAULT_ITERATIONS; - - ACE_Thread_Manager *thr_mgr = ACE_Service_Config::thr_mgr (); - - int grp_id = thr_mgr->spawn_n (n_threads, ACE_THR_FUNC (worker), - (void *) n_iterations, - THR_NEW_LWP | THR_DETACHED); - - // Wait for 1 second and then suspend every thread in the group. - ACE_OS::sleep (1); - ACE_DEBUG ((LM_DEBUG, "(%t) suspending group\n")); - if (thr_mgr->suspend_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "suspend_grp")); - - // Wait for 1 more second and then resume every thread in the - // group. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) resuming group\n")); - if (thr_mgr->resume_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "resume_grp")); - - // Wait for 1 more second and then send a SIGINT to every thread in - // the group. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) signaling group\n")); - if (thr_mgr->kill_grp (grp_id, SIGINT) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "kill_grp")); - - // Wait for 1 more second and then cancel all the threads. - ACE_OS::sleep (ACE_Time_Value (1)); - ACE_DEBUG ((LM_DEBUG, "(%t) cancelling group\n")); - if (thr_mgr->cancel_grp (grp_id) == -1) - ACE_ERROR ((LM_DEBUG, "(%t) %p\n", "cancel_grp")); - - // Perform a barrier wait until all the threads have shut down. - thr_mgr->wait (); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR_RETURN ((LM_ERROR, "threads not supported on this platform\n"), -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/thread_pool.cpp b/examples/Threads/thread_pool.cpp deleted file mode 100644 index 2cf3a8c61a6..00000000000 --- a/examples/Threads/thread_pool.cpp +++ /dev/null @@ -1,210 +0,0 @@ -// This test program illustrates how the ACE task synchronization -// $Id$ - -// mechanisms work in conjunction with the ACE_Task and the -// ACE_Thread_Manager. If the manual flag is not set input comes from -// stdin until the user enters a return only. This stops all workers -// via a message block of length 0. This is an alternative shutdown of -// workers compared to queue deactivate. -// -// This code is original based on a test program written by Karlheinz -// Dorn. It was modified to utilize more "ACE" features by Doug Schmidt. - -#include "ace/Task.h" -#include "ace/Service_Config.h" - -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -// Number of iterations to run the test. -static int n_iterations = 100; - -class Thread_Pool : public ACE_Task<ACE_MT_SYNCH> -{ -public: - Thread_Pool (ACE_Thread_Manager *thr_mgr, int n_threads); - - virtual int svc (void); - // Iterate <n_iterations> time printing off a message and "waiting" - // for all other threads to complete this iteration. - - virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv=0); - // This allows the producer to pass messages to the <Thread_Pool>. - -private: - virtual int close (u_long); -}; - -int -Thread_Pool::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) close of worker\n")); - return 0; -} - -Thread_Pool::Thread_Pool (ACE_Thread_Manager *thr_mgr, - int n_threads) - : ACE_Task<ACE_MT_SYNCH> (thr_mgr) -{ - // Create worker threads. - if (this->activate (THR_NEW_LWP, n_threads) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "activate failed")); -} - -// Simply enqueue the Message_Block into the end of the queue. - -int -Thread_Pool::put (ACE_Message_Block *mb, ACE_Time_Value *tv) -{ - return this->putq (mb, tv); -} - -// Iterate <n_iterations> time printing off a message and "waiting" -// for all other threads to complete this iteration. - -int -Thread_Pool::svc (void) -{ - // Note that the ACE_Task::svc_run () method automatically adds us to - // the Thread_Manager when the thread begins. - - int count = 1; - - // Keep looping, reading a message out of the queue, until we get a - // message with a length == 0, which signals us to quit. - - for (;; count++) - { - ACE_Message_Block *mb; - - ACE_DEBUG ((LM_DEBUG, "(%t) in iteration %d before getq ()\n", count)); - - if (this->getq (mb) == -1) - { - ACE_ERROR ((LM_ERROR, - "(%t) in iteration %d, got result -1, exiting\n", count)); - break; - } - - int length = mb->length (); - - if (length > 0) - ACE_DEBUG ((LM_DEBUG, - "(%t) in iteration %d, length = %d, text = \"%*s\"\n", - count, length, length - 1, mb->rd_ptr ())); - - // We're responsible for deallocating this. - mb->release (); - - if (length == 0) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) in iteration %d, got NULL message, exiting\n", - count)); - break; - } - } - - // Note that the ACE_Task::svc_run () method automatically removes - // us from the Thread_Manager when the thread exits. - return 0; -} - -static void -produce (Thread_Pool &thread_pool) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) producer start, dumping the Thread_Pool\n")); - thread_pool.dump (); - - for (int n;;) - { - // Allocate a new message. - ACE_Message_Block *mb = new ACE_Message_Block (BUFSIZ); - -#if defined (manual) - ACE_DEBUG ((LM_DEBUG, - "(%t) press chars and enter to put a new message into task queue...")); - n = ACE_OS::read (ACE_STDIN, mb->rd_ptr (), mb->size ()); -#else // Automatically generate messages. - static int count = 0; - - ACE_OS::sprintf (mb->rd_ptr (), "%d\n", count); - - n = ACE_OS::strlen (mb->rd_ptr ()); - - if (count == n_iterations) - n = 1; // Indicate that we need to shut down. - else - count++; - - if (count == 0 || (count % 20 == 0)) - ACE_OS::sleep (1); -#endif /* manual */ - if (n > 1) - { - // Send a normal message to the waiting threads and continue - // producing. - mb->wr_ptr (n); - - // Pass the message to the Thread_Pool. - if (thread_pool.put (mb) == -1) - ACE_ERROR ((LM_ERROR, " (%t) %p\n", "put")); - } - else - { - // Send a shutdown message to the waiting threads and exit. - ACE_DEBUG ((LM_DEBUG, "\n(%t) start loop, dump of task:\n")); - thread_pool.dump (); - - for (int i = thread_pool.thr_count (); i > 0; i--) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) EOF, enqueueing NULL block for thread = %d\n", - i)); - - // Enqueue a NULL message to flag each consumer to - // shutdown. - if (thread_pool.put (new ACE_Message_Block) == -1) - ACE_ERROR ((LM_ERROR, " (%t) %p\n", "put")); - } - - ACE_DEBUG ((LM_DEBUG, "\n(%t) end loop, dump of task:\n")); - thread_pool.dump (); - break; - } - } -} - -int -main (int argc, char *argv[]) -{ - int n_threads = argc > 1 ? ACE_OS::atoi (argv[1]) : ACE_DEFAULT_THREADS; - n_iterations = argc > 2 ? ACE_OS::atoi (argv[2]) : n_iterations; - - ACE_DEBUG ((LM_DEBUG, "(%t) argc = %d, threads = %d\n", - argc, n_threads)); - - // Create the worker tasks. - Thread_Pool thread_pool (ACE_Service_Config::thr_mgr (), - n_threads); - - // Create work for the worker tasks to process in their own threads. - produce (thread_pool); - - // Wait for all the threads to reach their exit point. - - ACE_DEBUG ((LM_DEBUG, "(%t) waiting with thread manager...\n")); - ACE_Service_Config::thr_mgr ()->wait (); - - ACE_DEBUG ((LM_DEBUG, "(%t) destroying worker tasks and exiting...\n")); - return 0; -} -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/thread_specific.cpp b/examples/Threads/thread_specific.cpp deleted file mode 100644 index 290cc4a4fa4..00000000000 --- a/examples/Threads/thread_specific.cpp +++ /dev/null @@ -1,220 +0,0 @@ -#include "ace/Service_Config.h" -// $Id$ - -#include "ace/Synch.h" - -#if defined (ACE_HAS_THREADS) - -// Define a class that will be stored in thread-specific data. Note -// that as far as this class is concerned it's just a regular C++ -// class. The ACE_TSS wrapper transparently ensures that -// objects of this class will be placed in thread-specific storage. -// All calls on ACE_TSS::operator->() are delegated to the -// appropriate method in the Errno class. - -class Errno -{ -public: - int error (void) { return this->errno_; } - void error (int i) { this->errno_ = i; } - - int line (void) { return this->lineno_; } - void line (int l) { this->lineno_ = l; } - - // Errno::flags_ is a static variable, so we've got to protect it - // with a mutex since it isn't kept in thread-specific storage. - int flags (void) - { - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1); - - return Errno::flags_; - } - - void flags (int f) - { - ACE_GUARD (ACE_Thread_Mutex, ace_mon, Errno::lock_); - - Errno::flags_ = f; - } - -private: - // = errno_ and lineno_ will be thread-specific data so they don't - // need a lock. - int errno_; - int lineno_; - - static int flags_; -#if defined (ACE_HAS_THREADS) - // flags_ needs a lock. - static ACE_Thread_Mutex lock_; -#endif /* ACE_HAS_THREADS */ -}; - -// Static variables. -ACE_MT (ACE_Thread_Mutex Errno::lock_); -int Errno::flags_; - -// This is our thread-specific error handler... -static ACE_TSS<Errno> TSS_Error; - -#if defined (ACE_HAS_THREADS) -// Serializes output via cout. -static ACE_Thread_Mutex lock; - -typedef ACE_TSS_Guard<ACE_Thread_Mutex> GUARD; -#else -// Serializes output via cout. -static ACE_Null_Mutex lock; - -typedef ACE_Guard<ACE_Null_Mutex> GUARD; -#endif /* ACE_HAS_THREADS */ - -static void -cleanup (void *ptr) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) in cleanup, ptr = %x\n", ptr)); - - delete ptr; -} - -// This worker function is the entry point for each thread. - -static void * -worker (void *c) -{ - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - int count = int (c); - - ACE_thread_key_t key = 0; - int *ip = 0; - - // Make one key that will be available when the thread exits so that - // we'll have something to cleanup! - - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - for (int i = 0; i < count; i++) - { - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - ACE_DEBUG ((LM_DEBUG, "(%t) in worker 1, key = %d, ip = %x\n", key, ip)); - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - delete ip; - - if (ACE_OS::thr_keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keyfree")); - - // Cause an error. - ACE_OS::read (ACE_INVALID_HANDLE, 0, 0); - - // The following two lines set the thread-specific state. - TSS_Error->error (errno); - TSS_Error->line (__LINE__); - - // This sets the static state (note how C++ makes it easy to do - // both). - TSS_Error->flags (count); - - { - // Use the guard to serialize access to cout... - ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, lock, 0); - - cout << "(" << ACE_Thread::self () - << ") errno = " << TSS_Error->error () - << ", lineno = " << TSS_Error->line () - << ", flags = " << TSS_Error->flags () - << endl; - } - key = 0; - - if (ACE_OS::thr_keycreate (&key, cleanup) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keycreate")); - - ip = new int; - - ACE_DEBUG ((LM_DEBUG, "(%t) in worker 2, key = %d, ip = %x\n", key, ip)); - - if (ACE_OS::thr_setspecific (key, (void *) ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_getspecific (key, (void **) &ip) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - if (ACE_OS::thr_setspecific (key, (void *) 0) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_setspecific")); - - delete ip; - - if (ACE_OS::thr_keyfree (key) == -1) - ACE_ERROR ((LM_ERROR, "(%t) %p\n", "ACE_OS::thr_keyfree")); - } - - ACE_DEBUG ((LM_DEBUG, "(%t) exiting\n")); - return 0; -} - -extern "C" void -handler (int signum) -{ - ACE_DEBUG ((LM_DEBUG, "signal = %S\n", signum)); - ACE_Service_Config::thr_mgr ()->exit (0); -} - -int -main (int argc, char *argv[]) -{ - // The Service_Config must be the first object defined in main... - ACE_Service_Config daemon (argv[0]); - ACE_Thread_Control tc (ACE_Service_Config::thr_mgr ()); - int threads = argc > 1 ? ACE_OS::atoi (argv[1]) : 4; - int count = argc > 2 ? ACE_OS::atoi (argv[2]) : 10000; - - // Register a signal handler. - ACE_Sig_Action sa ((ACE_SignalHandler) (handler), SIGINT); - ACE_UNUSED_ARG (sa); - -#if defined (ACE_HAS_THREADS) - if (ACE_Service_Config::thr_mgr ()->spawn_n (threads, - ACE_THR_FUNC (&worker), - (void *) count, - THR_BOUND | THR_DETACHED) == -1) - ACE_OS::perror ("ACE_Thread_Manager::spawn_n"); - - ACE_Service_Config::thr_mgr ()->wait (); -#else - worker ((void *) count); -#endif /* ACE_HAS_THREADS */ - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_TSS<Errno>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/token.cpp b/examples/Threads/token.cpp deleted file mode 100644 index 26094d463f4..00000000000 --- a/examples/Threads/token.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// Test out the ACE Token class. -// $Id$ - -#include "ace/Token.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -class My_Task : public ACE_Task<ACE_MT_SYNCH> -{ -public: - My_Task (int n); - virtual int svc (void); - - static void sleep_hook (void *); - -private: - ACE_Token token_; -}; - -My_Task::My_Task (int n) -{ - // Make this Task into an Active Object. - this->activate (THR_BOUND | THR_DETACHED, n); - - // Wait for all the threads to exit. - this->thr_mgr ()->wait (); -} - -void -My_Task::sleep_hook (void *) -{ - cerr << '(' << ACE_Thread::self () << ')' - << " blocking, My_Task::sleep_hook () called" << endl; -} - -// Test out the behavior of the ACE_Token class. - -int -My_Task::svc (void) -{ - for (size_t i = 0; i < 100; i++) - { - // Wait for up to 1 millisecond past the current time to get the token. - ACE_Time_Value timeout (ACE_OS::time (0), 1000); - - if (this->token_.acquire (&My_Task::sleep_hook, 0, &timeout) == 1) - { - this->token_.acquire (); - this->token_.renew (); - this->token_.release (); - this->token_.release (); - } - else - ACE_Thread::yield (); - } - return 0; -} - -int -main (int argc, char *argv[]) -{ - My_Task tasks (argc > 1 ? atoi (argv[1]) : 4); - - return 0; -} -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, "your platform doesn't support threads\n"), -1); -} -#endif /* */ diff --git a/examples/Threads/tss1.cpp b/examples/Threads/tss1.cpp deleted file mode 100644 index 5e1af436655..00000000000 --- a/examples/Threads/tss1.cpp +++ /dev/null @@ -1,181 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// TSS_Test.cpp -// -// = DESCRIPTION -// This program tests thread specific storage of data. The ACE_TSS -// wrapper transparently ensures that the objects of this class -// will be placed in thread-specific storage. All calls on -// ACE_TSS::operator->() are delegated to the appropriate method -// in the Errno class. Note that each thread of control has its -// own unique TSS object. -// -// = AUTHOR -// Detlef Becker -// -// ============================================================================ - -#include "ace/Service_Config.h" -#include "ace/Synch.h" -#include "ace/Task.h" - -#if defined (ACE_HAS_THREADS) - -static int iterations = 100; - -class Errno -{ -public: - int error (void) { return this->errno_; } - void error (int i) { this->errno_ = i; } - - int line (void) { return this->lineno_; } - void line (int l) { this->lineno_ = l; } - - // Errno::flags_ is a static variable, so we've got to protect it - // with a mutex since it isn't kept in thread-specific storage. - int flags (void) { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_Mon, Errno::lock_, -1)); - - return Errno::flags_; - } - int flags (int f) - { - ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex, ace_mon, Errno::lock_, -1)); - - Errno::flags_ = f; - return 0; - } - -private: - // = errno_ and lineno_ will be thread-specific data so they don't - // need a lock. - int errno_; - int lineno_; - - static int flags_; -#if defined (ACE_HAS_THREADS) - // flags_ needs a lock. - static ACE_Thread_Mutex lock_; -#endif /* ACE_HAS_THREADS */ -}; - -// Static variables. -ACE_MT (ACE_Thread_Mutex Errno::lock_); -int Errno::flags_; - -// This is our thread-specific error handler... -static ACE_TSS<Errno> TSS_Error; - -#if defined (ACE_HAS_THREADS) -// Serializes output via cout. -static ACE_Thread_Mutex lock; - -typedef ACE_TSS_Guard<ACE_Thread_Mutex> GUARD; -#else -// Serializes output via cout. -static ACE_Null_Mutex lock; - -typedef ACE_Guard<ACE_Null_Mutex> GUARD; -#endif /* ACE_HAS_THREADS */ - -// Keeps track of whether Tester::close () has started. -static int close_started = 0; - -template <ACE_SYNCH_1> -class Tester: public ACE_Task<ACE_SYNCH_2> -{ -public: - Tester (void) {} - ~Tester (void) {} - - virtual int svc (void); - - virtual int open (void *args = 0); - // Activate the thread. - - virtual int close (u_long args = 0); -}; - -template <ACE_SYNCH_1> int -Tester<ACE_SYNCH_2>::svc (void) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) svc: setting error code to 1\n")); - TSS_Error->error (1); - - for (int i = 0; i < iterations; i++) - // Print out every tenth iteration. - if ((i % 10) == 1) - ACE_DEBUG ((LM_DEBUG, "(%t) error = %d\n", TSS_Error->error ())); - - this->close (); - - return 0; -} - -template <ACE_SYNCH_1> int -Tester<ACE_SYNCH_2>::open (void *) -{ - // Make this an Active Object. - return this->activate (); -} - -template <ACE_SYNCH_1> -int Tester<ACE_SYNCH_2>::close (u_long) -{ - ACE_DEBUG ((LM_DEBUG, "(%t) close running\n")); - close_started = 1; - ACE_DEBUG ((LM_DEBUG, "(%t) close: setting error code to 7\n")); - TSS_Error->error (7); - ACE_DEBUG ((LM_DEBUG, "(%t) close: error = %d\n", TSS_Error->error ())); - close_started = 0; - return 0; -} - -int -main (int, char *[]) -{ - Tester<ACE_MT_SYNCH> tester; - - ACE_DEBUG ((LM_DEBUG, "(%t) main: setting error code to 3\n")); - TSS_Error->error (3); - ACE_DEBUG ((LM_DEBUG, "(%t) main: error = %d\n", TSS_Error->error ())); - - // Spawn off a thread and make test an Active Object. - tester.open (); - - // Keep looping until <Tester::close> is called. - while (!close_started) - ACE_DEBUG ((LM_DEBUG, "(%t) error = %d\n", TSS_Error->error ())); - - ACE_DEBUG ((LM_DEBUG, "(%t) main: setting error code to 4\n")); - TSS_Error->error (4); - ACE_DEBUG ((LM_DEBUG, "(%t) main: error = %d\n", TSS_Error->error ())); - - // Keep looping until <Tester::close> finishes. - while (close_started != 0) - ACE_DEBUG ((LM_DEBUG, "(%t) error = %d\n", TSS_Error->error ())); - - return 0; -} - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_TSS<Errno>; -template class Tester<ACE_MT_SYNCH>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (void) -{ - ACE_ERROR_RETURN ((LM_ERROR, - "ACE doesn't support support threads on this platform (yet)\n"), - -1); -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/tss2.cpp b/examples/Threads/tss2.cpp deleted file mode 100644 index 41cd4b00fd4..00000000000 --- a/examples/Threads/tss2.cpp +++ /dev/null @@ -1,205 +0,0 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// tests -// -// = FILENAME -// TSS_Test.cpp -// -// = DESCRIPTION -// This program tests various features of ACE_Thread and thread -// specific storage of data. -// -// = AUTHOR -// Prashant Jain and Doug Schmidt -// -// ============================================================================ - -#include "ace/Task.h" -#include "ace/Token.h" - -#if defined (ACE_HAS_THREADS) - -const int MAX_TASKS = 4; -const int MAX_ITERATIONS = 10; - -class TSS_Obj - // = TITLE - // This object is stored in thread-specific storage. -{ -public: - TSS_Obj (void); - ~TSS_Obj (void); - -private: - static ACE_Atomic_Op<ACE_Thread_Mutex, int> count_; -}; - -ACE_Atomic_Op<ACE_Thread_Mutex, int> TSS_Obj::count_ = 0; - -TSS_Obj::TSS_Obj (void) -{ - TSS_Obj::count_++; - ACE_DEBUG ((LM_DEBUG, "(%t) TSS_Obj+: %d\n", (int) TSS_Obj::count_)); -} - -TSS_Obj::~TSS_Obj (void) -{ - TSS_Obj::count_--; - ACE_DEBUG ((LM_DEBUG, "(%t) TSS_Obj-: %d\n", (int) TSS_Obj::count_)); -} - -class Test_Task -{ -public: - - Test_Task (void); - ~Test_Task (void); - - int open (void *arg); - - static void *svc (void *arg); - - static ACE_Atomic_Op<ACE_Token, int> wait_count_; - static ACE_Atomic_Op<ACE_Token, int> max_count_; - -private: - static ACE_Atomic_Op<ACE_Token, int> count_; -}; - -ACE_Atomic_Op<ACE_Token, int> Test_Task::count_ (0); -ACE_Atomic_Op<ACE_Token, int> Test_Task::wait_count_ (0); -ACE_Atomic_Op<ACE_Token, int> Test_Task::max_count_ (0); -int num_tasks = 0; - -// ACE synchronization object. -static ACE_Token token; - -Test_Task::Test_Task (void) -{ - Test_Task::count_++; - ACE_DEBUG ((LM_DEBUG, - "(%t) Test_Task+: %d\n", (int) Test_Task::count_)); -} - -Test_Task::~Test_Task (void) -{ - Test_Task::count_--; - - ACE_DEBUG ((LM_DEBUG, - "(%t) Test_Task-: %d\n", (int) Test_Task::count_)); - Test_Task::wait_count_--; -} - -void * -Test_Task::svc (void *arg) -{ - // When the thread exits this thread-specific object will be deleted - // automatically. - ACE_TSS<TSS_Obj> tss (new TSS_Obj); - - Test_Task::wait_count_++; - Test_Task::max_count_++; - - ACE_DEBUG ((LM_DEBUG, "(%t) svc: waiting\n")); - - while (1) - { - if (Test_Task::max_count_ >= num_tasks) - break; - else - ACE_Thread::yield (); - } - - ACE_DEBUG ((LM_DEBUG, "(%t) svc: waiting finished\n")); - - delete (Test_Task *) arg; - - return 0; -} - -int -Test_Task::open (void *arg) -{ - if (ACE_Thread::spawn (Test_Task::svc, arg) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "ACE_Thread::spawn"), 0); - - return 0; -} - -int -main (int argc, char *argv[]) -{ - num_tasks = argc > 1 ? atoi (argv[1]) : MAX_TASKS; - - Test_Task **task_arr; - - ACE_NEW_RETURN (task_arr, Test_Task *[num_tasks], -1); - - for (int i = 0; i < MAX_ITERATIONS; i++) - { - ACE_DEBUG ((LM_DEBUG, - "(%t) ********* iteration %d **********\n" - "Test_Task::max_count_ %d\n", - i, - (int) Test_Task::max_count_)); - Test_Task::max_count_ = 0; - - for (int j = 0; j < num_tasks; j++) - { - ACE_NEW_RETURN (task_arr[j], Test_Task, -1); - task_arr[j]->open (task_arr[j]); - } - - ACE_DEBUG ((LM_DEBUG, "(%t) waiting for first thread started\n")); - - for (;;) - { - ACE_Thread::yield (); - - if (Test_Task::max_count_ != 0 ) - break; - } - - ACE_DEBUG ((LM_DEBUG, "(%t) First thread started\n" - "Waiting for all threads finished\n")); - - for (;;) - { - if (!(Test_Task::max_count_ == num_tasks - && Test_Task::wait_count_ == 0)) - { - ACE_Thread::yield (); - continue; - } - ACE_DEBUG ((LM_DEBUG, - "(%t) Test_Task::max_count_ = %d," - " Test_Task::wait_count_ = %d", - (int) Test_Task::max_count_, - (int) Test_Task::wait_count_)); - break; - } - - ACE_DEBUG ((LM_DEBUG, "(%t) all threads finished\n")); - } - - return 0; -} - - -#if defined (ACE_TEMPLATES_REQUIRE_SPECIALIZATION) -template class ACE_Atomic_Op<ACE_Thread_Mutex, int>; -template class ACE_Atomic_Op<ACE_Token, int>; -template class ACE_TSS<TSS_Obj>; -#endif /* ACE_TEMPLATES_REQUIRE_SPECIALIZATION */ - -#else -int -main (int, char *[]) -{ - ACE_ERROR ((LM_ERROR, "threads not supported on this platform\n")); - return 0; -} -#endif /* ACE_HAS_THREADS */ diff --git a/examples/Threads/wfmo.cpp b/examples/Threads/wfmo.cpp deleted file mode 100644 index b72fc6eb147..00000000000 --- a/examples/Threads/wfmo.cpp +++ /dev/null @@ -1,121 +0,0 @@ -// $Id$ - -// This test program illustrates that the Win32 -// <WaitForMultipleObjects> function can be called in multiple -// threads, all of which wait on the same set of HANDLEs. Note that -// the dispatching of the threads should be relatively "fair" (i.e., -// everyone gets a chance to process the various HANDLEs as they -// become active). Thanks to Ari Erev <Ari_Erev@comverse.com> for -// suggesting this and providing the initial code. - -#include "ace/Task.h" - -#if defined (ACE_WIN32) - -// Number of threads. -static const int THREAD_COUNT = 5; - -// Number of iterations. -static const int MAX_ITERATIONS = 100; - -class WFMO_Test : public ACE_Task <ACE_NULL_SYNCH> -{ -public: - virtual int open (void *); - virtual int svc (void); - - // Use two handles here.. - ACE_sema_t sema_handles_[2]; - int semaphore_count_; -}; - -static WFMO_Test wfmo_test; - -int -WFMO_Test::open (void *arg) -{ - int thread_count = int (arg); - ACE_ASSERT (this->activate (0, thread_count) != -1); - return 0; -} - -int -WFMO_Test::svc (void) -{ - while(1) - { - int result = ::WaitForMultipleObjects (2, this->sema_handles_, - FALSE, INFINITE); - - if (result == WAIT_OBJECT_0) - // Signal the other semaphore just to see if we can get - // another thread to wakeup. - ACE_ASSERT (ACE_OS::sema_post (&sema_handles_[1]) != -1); - else if (result == WAIT_OBJECT_0 + 1) - ; - else - { - ACE_DEBUG ((LM_DEBUG, "Error in WaitForMultipleObejcts\n")); - ACE_OS::exit (0); - } - - // semaphore_count_ will be displayed by the "main" thread. It's - // value must be 2. Note that although this is a shared - // resource it's not protected via a mutex because the ++ - // operation on Intel is atomic. - - semaphore_count_++; - ACE_DEBUG ((LM_DEBUG, "(%t) thread has been signaled.\n")); - - // Yield this thread so that the other one(s) have a chance to - // run. - ACE_OS::thr_yield (); - } - - return 0; -} - -int -main (int argc, char *argv[]) -{ - int thread_count = THREAD_COUNT; - - if (argc > 1) - thread_count = ACE_OS::atoi (argv[1]); - - wfmo_test.open ((void *) thread_count); - - // Initialize the semaphores. - ACE_ASSERT (ACE_OS::sema_init (&wfmo_test.sema_handles_[0], thread_count + 5) - != -1); - ACE_ASSERT (ACE_OS::sema_init (&wfmo_test.sema_handles_[1], thread_count + 5) - != -1); - - for (int i = 0; i < MAX_ITERATIONS; i++) - { - wfmo_test.semaphore_count_ = 0; - - ACE_ASSERT (ACE_OS::sema_post (&wfmo_test.sema_handles_[0]) != -1); - - // No real synchronization here. Just sleep enough so that at - // least one (or two threads) run as a result of the semaphore. - ACE_OS::sleep (1); - - // Add one for the other thread that was signaled. - ACE_DEBUG ((LM_DEBUG, - "semaphore_count_ = %d (should have been %d).\n", - wfmo_test.semaphore_count_, - 2)); // Two semaphores should have been released. - } - - ACE_OS::exit (0); - - return 0; -} -#else -int -main (void) -{ - ACE_DEBUG ((LM_DEBUG, "this test only runs on Win32\n")); -} -#endif /* ACE_WIN32 */ |