summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2019-04-17 11:21:52 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2019-04-17 11:21:52 +0200
commitc1bb9e940b47d8be511c8d62f3f2251971b93743 (patch)
tree5556c256c6efa96f9bf6bb7399a17053341b2b0c
parent3b08cd8e99327a66f8a77dc50d3cee2ee73119a4 (diff)
downloadATCD-c1bb9e940b47d8be511c8d62f3f2251971b93743.tar.gz
Layout and const changes
* ACE/ace/Event_Handler.cpp: * ACE/ace/Process_Manager.cpp: * TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp: * TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h: * TAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl:
-rw-r--r--ACE/ace/Event_Handler.cpp13
-rw-r--r--ACE/ace/Process_Manager.cpp32
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp3
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.h8
-rwxr-xr-xTAO/orbsvcs/tests/ImplRepo/ping_interrupt/run_test.pl2
5 files changed, 9 insertions, 49 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/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";