diff options
-rw-r--r-- | ACE/ace/Event_Handler.cpp | 13 | ||||
-rw-r--r-- | ACE/ace/Process_Manager.cpp | 32 | ||||
-rw-r--r-- | ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp | 6 | ||||
-rw-r--r-- | ACE/tests/Process_Manager_Test.cpp | 4 | ||||
-rw-r--r-- | ACE/tests/Reactor_Exceptions_Test.cpp | 1 | ||||
-rw-r--r-- | ACE/tests/Timer_Cancellation_Test.cpp | 7 | ||||
-rw-r--r-- | ACE/tests/WFMO_Reactor_Test.cpp | 7 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h | 8 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl | 2 |
10 files changed, 12 insertions, 71 deletions
diff --git a/ACE/ace/Event_Handler.cpp b/ACE/ace/Event_Handler.cpp index 82e6879bed1..6a44bf58eea 100644 --- a/ACE/ace/Event_Handler.cpp +++ b/ACE/ace/Event_Handler.cpp @@ -16,7 +16,6 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL // Implement conceptually abstract virtual functions in the base class // so derived classes don't have to implement unused ones. - ACE_Event_Handler::ACE_Event_Handler (ACE_Reactor *r, int p) : reference_count_ (1), @@ -33,7 +32,6 @@ ACE_Event_Handler::~ACE_Event_Handler (void) } // Gets the file descriptor associated with this I/O device. - ACE_HANDLE ACE_Event_Handler::get_handle (void) const { @@ -42,7 +40,6 @@ ACE_Event_Handler::get_handle (void) const } // Sets the file descriptor associated with this I/O device. - void ACE_Event_Handler::set_handle (ACE_HANDLE) { @@ -50,7 +47,6 @@ ACE_Event_Handler::set_handle (ACE_HANDLE) } // Gets the priority of this handler. - int ACE_Event_Handler::priority (void) const { @@ -59,7 +55,6 @@ ACE_Event_Handler::priority (void) const } // Sets the priority - void ACE_Event_Handler::priority (int priority) { @@ -69,7 +64,6 @@ ACE_Event_Handler::priority (int priority) // Called when the object is about to be removed from the Dispatcher // tables. - int ACE_Event_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) { @@ -78,7 +72,6 @@ ACE_Event_Handler::handle_close (ACE_HANDLE, ACE_Reactor_Mask) } // Called when input becomes available on fd. - int ACE_Event_Handler::handle_input (ACE_HANDLE) { @@ -87,7 +80,6 @@ ACE_Event_Handler::handle_input (ACE_HANDLE) } // Called when output is possible on fd. - int ACE_Event_Handler::handle_output (ACE_HANDLE) { @@ -96,7 +88,6 @@ ACE_Event_Handler::handle_output (ACE_HANDLE) } // Called when urgent data is available on fd. - int ACE_Event_Handler::handle_exception (ACE_HANDLE) { @@ -105,7 +96,6 @@ ACE_Event_Handler::handle_exception (ACE_HANDLE) } // Called when timer expires, TV stores the current time. - int ACE_Event_Handler::handle_timeout (const ACE_Time_Value &, const void *) { @@ -114,7 +104,6 @@ ACE_Event_Handler::handle_timeout (const ACE_Time_Value &, const void *) } // Called when a monitored Process exits - int ACE_Event_Handler::handle_exit (ACE_Process *) { @@ -123,7 +112,6 @@ ACE_Event_Handler::handle_exit (ACE_Process *) } // Called when a registered signal occurs. - int ACE_Event_Handler::handle_signal (int, siginfo_t *, ucontext_t *) { @@ -141,7 +129,6 @@ ACE_Event_Handler::resume_handler (void) return ACE_Event_Handler::ACE_REACTOR_RESUMES_HANDLER; } - int ACE_Event_Handler::handle_qos (ACE_HANDLE) { diff --git a/ACE/ace/Process_Manager.cpp b/ACE/ace/Process_Manager.cpp index f50b5584c68..e5d30024f14 100644 --- a/ACE/ace/Process_Manager.cpp +++ b/ACE/ace/Process_Manager.cpp @@ -53,7 +53,7 @@ ACE_ALLOC_HOOK_DEFINE(ACE_Process_Manager) // Singleton instance. ACE_Process_Manager *ACE_Process_Manager::instance_ = 0; -// Controls whether the <Process_Manager> is deleted when we shut down +// Controls whether the Process_Manager is deleted when we shut down // (we can only delete it safely if we created it!) bool ACE_Process_Manager::delete_instance_ = false; @@ -219,7 +219,6 @@ ACE_Process_Manager::resize (size_t size) } // Create and initialize the table to keep track of the process pool. - int ACE_Process_Manager::open (size_t size, ACE_Reactor *r) { @@ -243,7 +242,6 @@ ACE_Process_Manager::open (size_t size, ACE_Reactor *r) } // Initialize the synchronization variables. - ACE_Process_Manager::ACE_Process_Manager (size_t size, ACE_Reactor *r) : ACE_Event_Handler (), @@ -266,7 +264,6 @@ ACE_Process_Manager::ACE_Process_Manager (size_t size, } // Close up and release all resources. - int ACE_Process_Manager::close (void) { @@ -313,7 +310,6 @@ ACE_Process_Manager::~ACE_Process_Manager (void) // routine, which fooled the Reactor into thinking that this routine // needed to be called. Since we don't know which Process exited, we // must reap as many exit statuses as are immediately available. - int ACE_Process_Manager::handle_input (ACE_HANDLE) { @@ -322,8 +318,7 @@ ACE_Process_Manager::handle_input (ACE_HANDLE) pid_t pid; do - pid = this->wait (0, - ACE_Time_Value::zero); + pid = this->wait (0, ACE_Time_Value::zero); while (pid != 0 && pid != ACE_INVALID_PID); return 0; @@ -351,7 +346,6 @@ ACE_Process_Manager::handle_close (ACE_HANDLE /* handle */, // // On Win32, this routine is called synchronously, and is passed the // HANDLE of the Process that exited, so we can do all our work here. - int ACE_Process_Manager::handle_signal (int, siginfo_t *si, @@ -431,7 +425,6 @@ ACE_Process_Manager::register_handler (ACE_Event_Handler *eh, } // Create a new process. - pid_t ACE_Process_Manager::spawn (ACE_Process_Options &options, ACE_Event_Handler *event_handler) @@ -449,7 +442,6 @@ ACE_Process_Manager::spawn (ACE_Process_Options &options, } // Create a new process. - pid_t ACE_Process_Manager::spawn (ACE_Process *process, ACE_Process_Options &options, @@ -474,7 +466,6 @@ ACE_Process_Manager::spawn (ACE_Process *process, } // Create N new processs. - int ACE_Process_Manager::spawn_n (size_t n, ACE_Process_Options &options, @@ -506,7 +497,6 @@ ACE_Process_Manager::spawn_n (size_t n, // Append a process into the pool (does not check for duplicates). // Must be called with locks held. - int ACE_Process_Manager::append_proc (ACE_Process *proc, ACE_Event_Handler *event_handler) @@ -545,7 +535,6 @@ ACE_Process_Manager::append_proc (ACE_Process *proc, // Insert a process into the pool (checks for duplicates and doesn't // allow them to be inserted twice). - int ACE_Process_Manager::insert_proc (ACE_Process *proc, ACE_Event_Handler *event_handler) @@ -561,7 +550,6 @@ ACE_Process_Manager::insert_proc (ACE_Process *proc, } // Remove a process from the pool. - int ACE_Process_Manager::remove (pid_t pid) { @@ -579,7 +567,6 @@ ACE_Process_Manager::remove (pid_t pid) } // Remove a process from the pool. Must be called with locks held. - int ACE_Process_Manager::remove_proc (size_t i) { @@ -654,7 +641,6 @@ ACE_Process_Manager::terminate (pid_t pid, int sig) return ACE_OS::kill (pid, sig); } - int ACE_Process_Manager::set_scheduler (const ACE_Sched_Params & params, pid_t pid) @@ -694,7 +680,6 @@ ACE_Process_Manager::set_scheduler_all (const ACE_Sched_Params & params) // Locate the index in the table associated with <pid>. Must be // called with the lock held. - ssize_t ACE_Process_Manager::find_proc (pid_t pid) { @@ -714,7 +699,6 @@ ACE_Process_Manager::find_proc (pid_t pid) #if defined (ACE_WIN32) // Locate the index in the table associated with <h>. Must be // called with the lock held. - ssize_t ACE_Process_Manager::find_proc (ACE_HANDLE h) { @@ -732,9 +716,8 @@ ACE_Process_Manager::find_proc (ACE_HANDLE h) } #endif /* ACE_WIN32 */ -// Wait for all the Processs to exit, or until <timeout> elapses. +// Wait for all the Processs to exit, or until @a timeout elapses. // Returns the number of Processes remaining, or -1 on an error. - int ACE_Process_Manager::wait (const ACE_Time_Value &timeout) { @@ -773,7 +756,6 @@ ACE_Process_Manager::wait (const ACE_Time_Value &timeout) // near as possible -- on Unix, we might accidentally get some other // Process_Manager's Process, or an unmanaged Process, or a child // process started by some other means. - pid_t ACE_Process_Manager::wait (pid_t pid, ACE_exitcode *status) @@ -785,10 +767,9 @@ ACE_Process_Manager::wait (pid_t pid, status); } -// Collect a single child processes' exit status, unless <timeout> +// Collect a single child processes' exit status, unless @a timeout // elapses before the process exits. Same caveats about accidental // Process reaping on Unix as above. - pid_t ACE_Process_Manager::wait (pid_t pid, const ACE_Time_Value &timeout, @@ -985,7 +966,6 @@ ACE_Process_Manager::wait (pid_t pid, // Notify either the process-specific handler or the generic handler. // If process-specific, call handle_close on the handler. Returns 1 // if process found, 0 if not. Must be called with locks held. - int ACE_Process_Manager::notify_proc_handler (size_t i, ACE_exitcode exit_code) @@ -1002,9 +982,7 @@ ACE_Process_Manager::notify_proc_handler (size_t i, else if (this->default_exit_handler_ != 0 && this->default_exit_handler_->handle_exit (proc_desc.process_) < 0) { - this->default_exit_handler_->handle_close - (ACE_INVALID_HANDLE, - 0); + this->default_exit_handler_->handle_close (ACE_INVALID_HANDLE, 0); this->default_exit_handler_ = 0; } return 1; diff --git a/ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp b/ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp index f069c1a9056..bae36ea9c0e 100644 --- a/ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp +++ b/ACE/tests/MT_Reference_Counted_Event_Handler_Test.cpp @@ -19,7 +19,6 @@ */ //============================================================================= - #include "test_config.h" #include "ace/Reactor.h" #include "ace/Select_Reactor.h" @@ -36,8 +35,6 @@ #include "ace/OS_NS_sys_socket.h" #include "ace/OS_NS_unistd.h" - - #if defined (ACE_HAS_THREADS) && !defined ACE_LACKS_ACCEPT static const char message[] = "abcdefghijklmnopqrstuvwxyz"; @@ -1313,8 +1310,7 @@ test<REACTOR_IMPL>::test (int ignore_nested_upcalls, if (!test_configs[i][1] && require_event_loop_thread) continue; - ACE_Reactor reactor (new REACTOR_IMPL, - 1); + ACE_Reactor reactor (new REACTOR_IMPL, true); testing (&reactor, test_configs[i][0], diff --git a/ACE/tests/Process_Manager_Test.cpp b/ACE/tests/Process_Manager_Test.cpp index 1c13e36df59..d08152588d6 100644 --- a/ACE/tests/Process_Manager_Test.cpp +++ b/ACE/tests/Process_Manager_Test.cpp @@ -17,7 +17,6 @@ */ //============================================================================= - #include "test_config.h" #include "ace/SString.h" #include "ace/Atomic_Op.h" @@ -30,8 +29,6 @@ #include "ace/Thread.h" #include "ace/Reactor.h" - - static u_int debug_test = 0; #if defined (ACE_HAS_WIN32_PRIORITY_CLASS) static u_int process_id = 0; @@ -361,7 +358,6 @@ run_main (int argc, ACE_TCHAR *argv[]) test_status = result; // Try the explicit <ACE_Process_Manager::wait> functions - ACE_Process_Manager mgr; mgr.register_handler (new Exit_Handler ("default")); diff --git a/ACE/tests/Reactor_Exceptions_Test.cpp b/ACE/tests/Reactor_Exceptions_Test.cpp index 2796ac8ee6a..fe06d7813a9 100644 --- a/ACE/tests/Reactor_Exceptions_Test.cpp +++ b/ACE/tests/Reactor_Exceptions_Test.cpp @@ -1,4 +1,3 @@ - //============================================================================= /** * @file Reactor_Exceptions_Test.cpp diff --git a/ACE/tests/Timer_Cancellation_Test.cpp b/ACE/tests/Timer_Cancellation_Test.cpp index 30f4b9cc41b..b48f2a8849c 100644 --- a/ACE/tests/Timer_Cancellation_Test.cpp +++ b/ACE/tests/Timer_Cancellation_Test.cpp @@ -1,4 +1,3 @@ - //============================================================================= /** * @file Timer_Cancellation_Test.cpp @@ -9,15 +8,12 @@ */ //============================================================================= - #include "test_config.h" #include "ace/OS_NS_unistd.h" #include "ace/Reactor.h" #include "ace/TP_Reactor.h" #include "ace/Task.h" - - #if defined (ACE_HAS_THREADS) class Deadlock : public ACE_Task_Base @@ -116,8 +112,7 @@ run_main (int, ACE_TCHAR *[]) { ACE_START_TEST (ACE_TEXT ("Timer_Cancellation_Test")); - ACE_Reactor reactor (new ACE_TP_Reactor, - 1); + ACE_Reactor reactor (new ACE_TP_Reactor, true); Deadlock deadlock; deadlock.reactor (&reactor); diff --git a/ACE/tests/WFMO_Reactor_Test.cpp b/ACE/tests/WFMO_Reactor_Test.cpp index 9e86f577607..ee85fa70acb 100644 --- a/ACE/tests/WFMO_Reactor_Test.cpp +++ b/ACE/tests/WFMO_Reactor_Test.cpp @@ -10,14 +10,11 @@ */ //============================================================================= - #include "test_config.h" #include "ace/Reactor.h" #include "ace/WFMO_Reactor.h" #include "ace/Pipe.h" - - #if defined (ACE_WIN32) static int number_of_handlers = 6; @@ -26,13 +23,11 @@ static int number_of_closes = 0; class Event_Handler : public ACE_Event_Handler { public: - Event_Handler (ACE_Reactor &reactor); ~Event_Handler (void); ACE_Pipe pipe_; - }; Event_Handler::Event_Handler (ACE_Reactor &reactor) @@ -78,7 +73,7 @@ test (void) int result = 0; int i = 0; - ACE_Reactor reactor (new ACE_WFMO_Reactor, 1); + ACE_Reactor reactor (new ACE_WFMO_Reactor, true); ACE_Event_Handler_var *safe_event_handlers = new ACE_Event_Handler_var[number_of_handlers]; diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp index 819f35b7f4f..3b49e2bd211 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp @@ -405,7 +405,7 @@ ImR_Activator_i::kill_server (const char* name, CORBA::Long lastpid, CORBA::Shor CORBA::Boolean ImR_Activator_i::still_alive (CORBA::Long pid) { - pid_t pt = static_cast<pid_t>(pid); + pid_t const pt = static_cast<pid_t>(pid); bool is_running = this->process_map_.find (pt) == 0; #if defined (ACE_WIN32) if (is_running) @@ -660,7 +660,6 @@ ImR_Activator_i::handle_exit (ACE_Process * process) return 0; } - int ImR_Activator_i::handle_timeout (const ACE_Time_Value &, const void * tok) { diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h index 299cba88099..48fdd3544f5 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h @@ -66,7 +66,7 @@ class Active_Pid_Setter; class Activator_Export ImR_Activator_i : public POA_ImplementationRepository::ActivatorExt, public ACE_Event_Handler { - public: +public: friend class Active_Pid_Setter; ImR_Activator_i (void); @@ -96,8 +96,7 @@ class Activator_Export ImR_Activator_i : public POA_ImplementationRepository::Ac /// Shutdown the orb. void shutdown (bool signaled); - private: - +private: int init_with_orb (CORBA::ORB_ptr orb, const Activator_Options& opts); void register_with_imr(ImplementationRepository::Activator_ptr activator); @@ -111,8 +110,7 @@ class Activator_Export ImR_Activator_i : public POA_ImplementationRepository::Ac bool in_upcall (void); - private: - +private: typedef ACE_Unbounded_Set<ACE_CString> UniqueServerList; typedef ACE_Hash_Map_Manager_Ex<pid_t, diff --git a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl index 3f0c9b91ba6..f22cfa7510d 100755 --- a/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl +++ b/TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl @@ -140,7 +140,6 @@ sub server_setup () return 1; } - $TI->Arguments ("-ORBInitRef ImplRepoService=file://$ti_imriorfile ". "start $objprefix"); @@ -154,7 +153,6 @@ sub server_setup () $TI_status = 0; } - sub interrupt_ping_test { print "Running interrupt ping test.\n"; |