From e1a6971fa0621f8caa3a3ab71d9468b9f88e86e4 Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Thu, 2 May 2002 20:51:18 +0000 Subject: Syntax error fixes and updated dependencies. --- ace/Dev_Poll_Reactor.cpp | 22 ++++++------- ace/Dev_Poll_Reactor.h | 6 ++-- ace/Makefile | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 15 deletions(-) (limited to 'ace') diff --git a/ace/Dev_Poll_Reactor.cpp b/ace/Dev_Poll_Reactor.cpp index f306929672e..79d6e1a2d7c 100644 --- a/ace/Dev_Poll_Reactor.cpp +++ b/ace/Dev_Poll_Reactor.cpp @@ -1185,7 +1185,7 @@ ACE_Dev_Poll_Reactor::handle_events_i (ACE_Time_Value *max_wait_time) ACE_TRACE ("ACE_Dev_Poll_Reactor::handle_events_i"); int result = 0; - int active_handle_count = 0; + // int active_handle_count = 0; // Poll for events // @@ -1208,7 +1208,7 @@ ACE_Dev_Poll_Reactor::handle_events_i (ACE_Time_Value *max_wait_time) } int -ACE_Dev_Poll_Reactor::dispatch (int active_handle_count) +ACE_Dev_Poll_Reactor::dispatch (void) { ACE_TRACE ("ACE_Dev_Poll_Reactor::dispatch"); @@ -1239,7 +1239,7 @@ ACE_Dev_Poll_Reactor::dispatch (int active_handle_count) // Perform the Template Method for dispatching all the handlers. // First check for interrupts. - if (active_handle_count == -1) + if (0 /* active_handle_count == -1 */) { // Bail out -- we got here since the poll (i.e. ioctl()) was // interrupted. @@ -1247,11 +1247,13 @@ ACE_Dev_Poll_Reactor::dispatch (int active_handle_count) { ACE_Sig_Handler::sig_pending (0); +#if 0 // If any HANDLES in the are activated as a // result of signals they should be dispatched since // they may be time critical... pfds = this->ready_set_.pfds; active_handle_count = this->ready_set_.nfds; +#endif /* 0 */ // Record the fact that the Reactor has dispatched a // handle_signal() method. We need this to return the @@ -1271,7 +1273,7 @@ ACE_Dev_Poll_Reactor::dispatch (int active_handle_count) // Check to see if there are no more I/O handles left to // dispatch AFTER we've handled the timers. - else if (active_handle_count == 0) + else if (0 /* active_handle_count == 0 */) return io_handlers_dispatched + other_handlers_dispatched + signal_occurred; @@ -1294,7 +1296,7 @@ ACE_Dev_Poll_Reactor::dispatch (int active_handle_count) // State has changed, so exit loop. break; } - while (active_handle_count > 0); + while (0 /* active_handle_count > 0 */); return io_handlers_dispatched + other_handlers_dispatched + signal_occurred; } @@ -1377,8 +1379,6 @@ ACE_Dev_Poll_Reactor::dispatch_io_events (int &io_handlers_dispatched) ACE_Event_Handler *eh = this->handler_rep_.find (handle); - int status = 0; - { // Modify the reference count in an exception-safe way. ACE_Dev_Poll_Handler_Guard (this->handler_rep_, handle); @@ -1396,7 +1396,7 @@ ACE_Dev_Poll_Reactor::dispatch_io_events (int &io_handlers_dispatched) ACE_DEBUG ((LM_DEBUG, "GOT POLLOUT EVENT\n")); int status = - this->upcall (eh, ACE_Event_Handler::handle_output, handle); + this->upcall (eh, &ACE_Event_Handler::handle_output, handle); if (status < 0) { @@ -1415,7 +1415,7 @@ ACE_Dev_Poll_Reactor::dispatch_io_events (int &io_handlers_dispatched) ACE_DEBUG ((LM_DEBUG, "GOT POLLPRI EVENT\n")); int status = - this->upcall (eh, ACE_Event_Handler::handle_exception, handle); + this->upcall (eh, &ACE_Event_Handler::handle_exception, handle); if (status < 0) { @@ -1436,7 +1436,7 @@ ACE_Dev_Poll_Reactor::dispatch_io_events (int &io_handlers_dispatched) // handle)); int status = - this->upcall (eh, ACE_Event_Handler::handle_input, handle); + this->upcall (eh, &ACE_Event_Handler::handle_input, handle); if (status < 0) { @@ -1595,7 +1595,7 @@ ACE_Dev_Poll_Reactor::register_handler (const ACE_Handle_Set &handle_set, return 0; } - + int ACE_Dev_Poll_Reactor::register_handler (int signum, ACE_Event_Handler *new_sh, diff --git a/ace/Dev_Poll_Reactor.h b/ace/Dev_Poll_Reactor.h index 191b7411fce..9c7c9235d62 100644 --- a/ace/Dev_Poll_Reactor.h +++ b/ace/Dev_Poll_Reactor.h @@ -993,16 +993,14 @@ protected: * signal events. Returns the total number of ACE_Event_Handlers * that were dispatched or -1 if something goes wrong. */ - int dispatch (struct pollfd *pfds, int active_handle_count); + int dispatch (void); /// int dispatch_timer_handlers (int &number_of_handlers_dispatched); /// Dispatch all IO related events to their corresponding event /// handlers. - int dispatch_io_events (struct pollfd *pfds, - int nfds, - int &io_handlers_dispatched); + int dispatch_io_events (int &io_handlers_dispatched); /// Register the given event handler with the reactor. int register_handler_i (ACE_HANDLE handle, diff --git a/ace/Makefile b/ace/Makefile index eafb34ff7d7..1c9b3328166 100644 --- a/ace/Makefile +++ b/ace/Makefile @@ -101,6 +101,7 @@ DEMUX_FILES = \ Select_Reactor \ Select_Reactor_Base \ SUN_Proactor \ + Dev_Poll_Reactor \ TP_Reactor \ TkReactor \ WFMO_Reactor \ @@ -5725,6 +5726,87 @@ endif # GHS ace_wchar.h \ ace_wchar.inl +.obj/Dev_Poll_Reactor.o .obj/Dev_Poll_Reactor.so .shobj/Dev_Poll_Reactor.o .shobj/Dev_Poll_Reactor.so: Dev_Poll_Reactor.cpp \ + Dev_Poll_Reactor.h \ + pre.h \ + Reactor_Impl.h \ + Timer_Queue.h \ + Synch.h \ + ACE_export.h \ + config-all.h \ + config.h \ + config-linux.h \ + config-linux-common.h \ + config-g++-common.h \ + post.h \ + ace_wchar.h \ + ace_wchar.inl \ + OS.h \ + OS_Dirent.h \ + OS_Export.h \ + OS_Errno.h \ + OS_Errno.inl \ + OS_Dirent.inl \ + OS_String.h \ + Basic_Types.h \ + Basic_Types.i \ + OS_String.inl \ + OS_Memory.h \ + OS_Memory.inl \ + OS_TLI.h \ + OS_TLI.inl \ + Time_Value.h \ + Time_Value.inl \ + Default_Constants.h \ + Global_Macros.h \ + Min_Max.h \ + streams.h \ + Trace.h \ + OS.i \ + Synch.i \ + Synch_T.h \ + Synch_T.i \ + Thread.h \ + Thread_Adapter.h \ + Base_Thread_Adapter.h \ + OS_Log_Msg_Attributes.h \ + OS_Log_Msg_Attributes.inl \ + Base_Thread_Adapter.inl \ + Thread_Adapter.inl \ + Thread.i \ + Synch_T.cpp \ + Log_Msg.h \ + Log_Priority.h \ + Timer_Queue_T.h \ + Free_List.h \ + Free_List.i \ + Free_List.cpp \ + Test_and_Set.h \ + Event_Handler.h \ + Event_Handler.i \ + Test_and_Set.i \ + Test_and_Set.cpp \ + Timer_Queue_T.i \ + Timer_Queue_T.cpp \ + Signal.h \ + Signal.i \ + Pipe.h \ + Pipe.i \ + Dev_Poll_Reactor.inl \ + Handle_Set.h \ + Handle_Set.i \ + Reactor.h \ + Reactor.i \ + Timer_Heap.h \ + Timer_Heap_T.h \ + Unbounded_Set.h \ + Node.h \ + Node.cpp \ + Unbounded_Set.inl \ + Unbounded_Set.cpp \ + Malloc_Base.h \ + Timer_Heap_T.cpp + .obj/TP_Reactor.o .obj/TP_Reactor.so .shobj/TP_Reactor.o .shobj/TP_Reactor.so: TP_Reactor.cpp \ TP_Reactor.h \ pre.h \ -- cgit v1.2.1