diff options
Diffstat (limited to 'ACE/examples/Reactor/Misc/notification.cpp')
-rw-r--r-- | ACE/examples/Reactor/Misc/notification.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/ACE/examples/Reactor/Misc/notification.cpp b/ACE/examples/Reactor/Misc/notification.cpp index cf790ff6b03..c304b254dd0 100644 --- a/ACE/examples/Reactor/Misc/notification.cpp +++ b/ACE/examples/Reactor/Misc/notification.cpp @@ -53,7 +53,7 @@ public: // Print data from main thread. virtual int handle_timeout (const ACE_Time_Value &, - const void *); + const void *); // Handle timeout events in the main thread. virtual int handle_input (ACE_HANDLE); @@ -112,7 +112,7 @@ Thread_Handler::~Thread_Handler (void) Thread_Handler::Thread_Handler ( long delay, long interval, - size_t n_threads, + size_t n_threads, size_t max_iterations) : iterations_ (max_iterations) { @@ -126,8 +126,8 @@ Thread_Handler::Thread_Handler ( this->id_ = 0; if (ACE_Event_Handler::register_stdin_handler (this, - ACE_Reactor::instance (), - ACE_Thread_Manager::instance ()) == -1) + ACE_Reactor::instance (), + ACE_Thread_Manager::instance ()) == -1) ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); @@ -183,15 +183,15 @@ Thread_Handler::notify (ACE_Time_Value *timeout) timeout) == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", - "notification::notify:exception"), + "notification::notify:exception"), -1); else if (ACE_Reactor::instance ()->notify - (this, + (this, ACE_Event_Handler::WRITE_MASK, timeout) == -1) ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", - "notification::notify:write"), + "notification::notify:write"), -1); return 0; } @@ -209,21 +209,21 @@ Thread_Handler::handle_input (ACE_HANDLE handle) { ACE_DEBUG ((LM_DEBUG, "input to (%t) %*s", - n, + n, buf)); ACE_DEBUG ((LM_DEBUG, "%d more input to kill\n", - this->iterations_)); + this->iterations_)); // 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, + ACE_ERROR ((LM_DEBUG, "(%t), %p\n", - "notification::handle_input:notify")); + "notification::handle_input:notify")); return 0; } else @@ -252,7 +252,7 @@ Thread_Handler::svc (void) ACE_Time_Value timeout (0, 10 * 1000); if (this->notify (&timeout) == -1) - ACE_ERROR ((LM_ERROR, + ACE_ERROR ((LM_ERROR, "(%t) %p\n", "notify")); } @@ -284,8 +284,8 @@ Thread_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) case SIGQUIT: #endif ACE_ERROR ((LM_ERROR, - "(%t) ******************** shutting down %n on signal %S\n", - signum)); + "(%t) ******************** shutting down %n on signal %S\n", + signum)); this->shutdown_ = 1; ACE_Reactor::end_event_loop(); } @@ -297,7 +297,7 @@ Thread_Handler::handle_timeout (const ACE_Time_Value &time, const void *) { ACE_DEBUG ((LM_DEBUG, "(%t) received timeout at (%u, %u), iterations = %d\n", - time.sec (), + time.sec (), time.usec (), this->iterations_)); @@ -314,8 +314,8 @@ int Thread_Handler::handle_exception (ACE_HANDLE) { ACE_DEBUG ((LM_DEBUG, - "(%t) exception to id %d, iteration = %d\n", - this->id_, + "(%t) exception to id %d, iteration = %d\n", + this->id_, this->iterations_)); return 0; } @@ -326,8 +326,8 @@ int Thread_Handler::handle_output (ACE_HANDLE) { ACE_DEBUG ((LM_DEBUG, - "(%t) output to id %d, iteration = %d\n", - this->id_, + "(%t) output to id %d, iteration = %d\n", + this->id_, // This decrement must come last since // <handle_exception> is called before <handle_output>! this->iterations_--)); @@ -382,6 +382,6 @@ int ACE_TMAIN (int, ACE_TCHAR *[]) { ACE_ERROR_RETURN ((LM_ERROR, - "threads must be supported to run this application\n"), -1); + "threads must be supported to run this application\n"), -1); } #endif /* ACE_HAS_THREADS */ |