diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-05-18 16:36:26 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-05-18 16:36:26 +0000 |
commit | 31413b6faf28a2772a8d3e85b8cd71d38726b1ea (patch) | |
tree | a2ed3b5a8020ad6ac662b147c2d47644bd4b21b8 | |
parent | 457e10ced52dd085c708126e7cd1be5fb20225b4 (diff) | |
download | ATCD-31413b6faf28a2772a8d3e85b8cd71d38726b1ea.tar.gz |
.
-rw-r--r-- | ace/FlReactor.cpp | 2 | ||||
-rw-r--r-- | ace/FlReactor.h | 7 | ||||
-rw-r--r-- | ace/Makefile | 61 | ||||
-rw-r--r-- | ace/Task_T.cpp | 86 | ||||
-rw-r--r-- | ace/Task_T.h | 46 |
5 files changed, 35 insertions, 167 deletions
diff --git a/ace/FlReactor.cpp b/ace/FlReactor.cpp index e4a9e7128f5..74ac684b3c1 100644 --- a/ace/FlReactor.cpp +++ b/ace/FlReactor.cpp @@ -8,7 +8,7 @@ ACE_RCSID(ace, FlReactor, "$Id$") #if defined (ACE_HAS_FL) -#include "FL/Fl.h" +#include <FL/Fl.h> ACE_ALLOC_HOOK_DEFINE (ACE_FlReactor) diff --git a/ace/FlReactor.h b/ace/FlReactor.h index 9732a85d826..93519596657 100644 --- a/ace/FlReactor.h +++ b/ace/FlReactor.h @@ -40,11 +40,10 @@ class ACE_Export ACE_FlReactor : public ACE_Select_Reactor // // = DESCRIPTION // As many other GUI toolkits FL supports a minimal set of - // callbacks to handle event demultiplexing, namely simple methods + // callbacks to handle event demultiplexing, namely simple methods // to add file descriptors to the event demuxing set or timeout - // events. - // This class adapts this simple mechanisms so they are compatible - // with ACE's Reactor. + // events. This class adapts this simple mechanisms so they are + // compatible with ACE's Reactor. // public: diff --git a/ace/Makefile b/ace/Makefile index 9263ab740a5..72014aed3b7 100644 --- a/ace/Makefile +++ b/ace/Makefile @@ -479,8 +479,7 @@ endif # CHORUS $(ACE_ROOT)/ace/Log_Priority.h \ $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Template_Instantiations.cpp -.obj/OS.o .obj/OS.so .shobj/OS.o .shobj/OS.so: OS.cpp \ - $(ACE_ROOT)/ace/OS.h \ +.obj/OS.o .obj/OS.so .shobj/OS.o .shobj/OS.so: OS.cpp $(ACE_ROOT)/ace/OS.h \ $(ACE_ROOT)/ace/inc_user_config.h \ $(ACE_ROOT)/ace/streams.h \ $(ACE_ROOT)/ace/Basic_Types.h \ @@ -511,8 +510,7 @@ endif # CHORUS $(ACE_ROOT)/ace/Log_Priority.h \ $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Sched_Params.i -.obj/ACE.o .obj/ACE.so .shobj/ACE.o .shobj/ACE.so: ACE.cpp \ - $(ACE_ROOT)/ace/ACE.h \ +.obj/ACE.o .obj/ACE.so .shobj/ACE.o .shobj/ACE.so: ACE.cpp $(ACE_ROOT)/ace/ACE.h \ $(ACE_ROOT)/ace/OS.h \ $(ACE_ROOT)/ace/inc_user_config.h \ $(ACE_ROOT)/ace/streams.h \ @@ -1796,21 +1794,20 @@ endif # CHORUS $(ACE_ROOT)/ace/Mem_Map.i \ $(ACE_ROOT)/ace/Memory_Pool.i \ $(ACE_ROOT)/ace/Thread_Manager.i \ - $(ACE_ROOT)/ace/SOCK_Connector.h \ - $(ACE_ROOT)/ace/SOCK_Stream.h \ - $(ACE_ROOT)/ace/SOCK_IO.h \ - $(ACE_ROOT)/ace/SOCK.h \ - $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/SPIPE_Connector.h \ + $(ACE_ROOT)/ace/SPIPE_Stream.h \ + $(ACE_ROOT)/ace/SPIPE.h \ $(ACE_ROOT)/ace/IPC_SAP.h \ $(ACE_ROOT)/ace/IPC_SAP.i \ - $(ACE_ROOT)/ace/SOCK.i \ - $(ACE_ROOT)/ace/SOCK_IO.i \ - $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Connector.i + $(ACE_ROOT)/ace/SPIPE_Addr.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/SPIPE_Addr.i \ + $(ACE_ROOT)/ace/SString.h \ + $(ACE_ROOT)/ace/SString.i \ + $(ACE_ROOT)/ace/SPIPE.i \ + $(ACE_ROOT)/ace/SPIPE_Stream.i \ + $(ACE_ROOT)/ace/SPIPE_Connector.i .obj/Log_Record.o .obj/Log_Record.so .shobj/Log_Record.o .shobj/Log_Record.so: Log_Record.cpp \ $(ACE_ROOT)/ace/Log_Record.h \ $(ACE_ROOT)/ace/ACE.h \ @@ -3538,8 +3535,7 @@ endif # CHORUS $(ACE_ROOT)/ace/Addr.h \ $(ACE_ROOT)/ace/Addr.i \ $(ACE_ROOT)/ace/ATM_Addr.i -.obj/DEV.o .obj/DEV.so .shobj/DEV.o .shobj/DEV.so: DEV.cpp \ - $(ACE_ROOT)/ace/DEV.h \ +.obj/DEV.o .obj/DEV.so .shobj/DEV.o .shobj/DEV.so: DEV.cpp $(ACE_ROOT)/ace/DEV.h \ $(ACE_ROOT)/ace/IO_SAP.h \ $(ACE_ROOT)/ace/ACE.h \ $(ACE_ROOT)/ace/OS.h \ @@ -4202,8 +4198,7 @@ endif # CHORUS $(ACE_ROOT)/ace/Log_Priority.h \ $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/SV_Shared_Memory.i -.obj/TLI.o .obj/TLI.so .shobj/TLI.o .shobj/TLI.so: TLI.cpp \ - $(ACE_ROOT)/ace/TLI.h \ +.obj/TLI.o .obj/TLI.so .shobj/TLI.o .shobj/TLI.so: TLI.cpp $(ACE_ROOT)/ace/TLI.h \ $(ACE_ROOT)/ace/IPC_SAP.h \ $(ACE_ROOT)/ace/ACE.h \ $(ACE_ROOT)/ace/OS.h \ @@ -4220,7 +4215,8 @@ endif # CHORUS $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/IPC_SAP.i \ $(ACE_ROOT)/ace/Addr.h \ - $(ACE_ROOT)/ace/Addr.i + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/TLI.i .obj/TLI_Acceptor.o .obj/TLI_Acceptor.so .shobj/TLI_Acceptor.o .shobj/TLI_Acceptor.so: TLI_Acceptor.cpp \ $(ACE_ROOT)/ace/TLI_Acceptor.h \ $(ACE_ROOT)/ace/TLI.h \ @@ -4241,10 +4237,13 @@ endif # CHORUS $(ACE_ROOT)/ace/IPC_SAP.i \ $(ACE_ROOT)/ace/Addr.h \ $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/TLI.i \ $(ACE_ROOT)/ace/Time_Value.h \ $(ACE_ROOT)/ace/TLI_Stream.h \ $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/TLI_Stream.i \ + $(ACE_ROOT)/ace/TLI_Acceptor.i .obj/TLI_Connector.o .obj/TLI_Connector.so .shobj/TLI_Connector.o .shobj/TLI_Connector.so: TLI_Connector.cpp \ $(ACE_ROOT)/ace/Handle_Set.h \ $(ACE_ROOT)/ace/ACE.h \ @@ -4268,8 +4267,11 @@ endif # CHORUS $(ACE_ROOT)/ace/IPC_SAP.i \ $(ACE_ROOT)/ace/Addr.h \ $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/TLI.i \ $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/TLI_Stream.i \ + $(ACE_ROOT)/ace/TLI_Connector.i .obj/TLI_Stream.o .obj/TLI_Stream.so .shobj/TLI_Stream.o .shobj/TLI_Stream.so: TLI_Stream.cpp \ $(ACE_ROOT)/ace/TLI_Stream.h \ $(ACE_ROOT)/ace/TLI.h \ @@ -4290,8 +4292,10 @@ endif # CHORUS $(ACE_ROOT)/ace/IPC_SAP.i \ $(ACE_ROOT)/ace/Addr.h \ $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/TLI.i \ $(ACE_ROOT)/ace/INET_Addr.h \ - $(ACE_ROOT)/ace/INET_Addr.i + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/TLI_Stream.i .obj/TTY_IO.o .obj/TTY_IO.so .shobj/TTY_IO.o .shobj/TTY_IO.so: TTY_IO.cpp \ $(ACE_ROOT)/ace/TTY_IO.h \ $(ACE_ROOT)/ace/OS.h \ @@ -4748,8 +4752,7 @@ endif # CHORUS $(ACE_ROOT)/ace/SPIPE.i \ $(ACE_ROOT)/ace/UPIPE_Addr.h \ $(ACE_ROOT)/ace/UPIPE_Stream.i -.obj/DLL.o .obj/DLL.so .shobj/DLL.o .shobj/DLL.so: DLL.cpp \ - $(ACE_ROOT)/ace/DLL.h \ +.obj/DLL.o .obj/DLL.so .shobj/DLL.o .shobj/DLL.so: DLL.cpp $(ACE_ROOT)/ace/DLL.h \ $(ACE_ROOT)/ace/OS.h \ $(ACE_ROOT)/ace/inc_user_config.h \ $(ACE_ROOT)/ace/streams.h \ @@ -7660,8 +7663,6 @@ endif # CHORUS $(ACE_ROOT)/ace/Timer_Heap_T.h \ $(ACE_ROOT)/ace/Timer_Heap_T.cpp \ $(ACE_ROOT)/ace/Select_Reactor_T.i \ - $(ACE_ROOT)/ace/Select_Reactor.i \ - $(ACE_ROOT)/ace/FlReactor.i \ - /usr/include/FL/Enumerations.H + $(ACE_ROOT)/ace/Select_Reactor.i # IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/ace/Task_T.cpp b/ace/Task_T.cpp index 5c63c904ac2..b6425369a05 100644 --- a/ace/Task_T.cpp +++ b/ace/Task_T.cpp @@ -102,90 +102,4 @@ ACE_Task<ACE_SYNCH_USE>::module (void) const return this->mod_; } -// Initialize the <ACE_Message_Block_Buffer> to keep track of the -// <high_water_mark> and the <timeout>, which are used to determine at -// what point to flush the buffer. - -template <class PEER_STREAM, ACE_SYNCH_DECL> -ACE_Buffered_Task<PEER_STREAM, ACE_SYNCH_USE>::ACE_Buffered_Task (PEER_STREAM stream, - size_t high_water_mark, - ACE_Time_Value *timeout) - : current_size_ (0), - high_water_mark_ (high_water_mark), - timeout_ (timeout == 0 ? ACE_Time_Value::zero : *timeout), - timeoutp_ (timeout), - stream_ (stream) -{ -} - -template <class PEER_STREAM, ACE_SYNCH_DECL> int -ACE_Buffered_Task<PEER_STREAM, ACE_SYNCH_USE>::put (ACE_Message_Block *mb, - ACE_Time_Value *tv) -{ -#if 0 - if (this->putq (mb) == -1) - return -1; - else - { - this->current_size_ += mb->total_size (); - - if (this->current_size_ >= this->high_water_mark_) - // @@ Need to add the "timed flush" feature... - return this->flush (); - - return 0; - } -#else - return 0; -#endif -} - -// Flush the buffer. - -template <class PEER_STREAM, ACE_SYNCH_DECL> int -ACE_Buffered_Task<PEER_STREAM, ACE_SYNCH_USE>::flush (void) -{ -#if 0 - iovec iov[IOV_MAX]; - size_t i = 0; - - ACE_Message_Queue_Iterator<ACE_NULL_SYNCH> iterator (queue); - - // Iterate over all the <ACE_Message_Block>s in the - // <ACE_Message_Queue>. - for (ACE_Message_Block *entry = 0; - iterator.next (entry) != 0; - iterator.advance ()) - { - // Iterate over all the continuations (if any) in the - // <Message_Block>. - for (ACE_Message_Block *temp = entry; - entry != 0; - entry = entry->cont ()) - { - iov[i].iov_len = entry->size (); - iov[i].iov_buf = entry->rd_ptr (); - - i++; - if (i == IOV_MAX) - { - // Send off the data. - if (this->stream_.sendv_n (iov, - i) == -1) - return -1; - i = 0; - } - } - } - - if (i > 0) - return this->stream_.sendv_n (iov, - i); - else - return 0; -#else - return 0; -#endif -} - #endif /* ACE_TASK_T_C */ diff --git a/ace/Task_T.h b/ace/Task_T.h index d02f6e625b6..60b4ef5c5dc 100644 --- a/ace/Task_T.h +++ b/ace/Task_T.h @@ -150,52 +150,6 @@ private: ACE_UNIMPLEMENTED_FUNC (ACE_Task (const ACE_Task<ACE_SYNCH_USE> &)) }; -template <class PEER_STREAM, ACE_SYNCH_DECL> -class ACE_Buffered_Task : public ACE_Task<ACE_SYNCH_USE> -{ - // = TITLE - // Defines a configurable and efficient buffering scheme for - // <ACE_Message_Blocks>. - // - // = DESCRIPTION -public: - ACE_Buffered_Task (PEER_STREAM stream, - size_t high_water_mark = ACE_Message_Queue_Base::DEFAULT_HWM, - ACE_Time_Value *timeout = 0); - // Initialize the <ACE_Buffered_Task> to keep track of the - // <high_water_mark> and the <timeout>, which are used to determine - // at what point to flush the buffer. - - virtual int put (ACE_Message_Block *message_block, - ACE_Time_Value *unused = 0); - // Insert the <ACE_Message_Block> chain rooted at <message_block> - // into the buffer. If this causes the number of bytes - - virtual int flush (void); - // Flush the buffer, which writes all the queued - // <ACE_Message_Block>s. - -protected: - virtual int svc (void); - // Run the buffering flushing procedure in a separate thread! - - size_t current_size_; - // Keep track of the current number of bytes in the buffer. - - size_t high_water_mark_; - // Size of the high water mark, which is used to control when we - // flush the buffer. - - ACE_Time_Value timeout_; - // Timeout value. - - ACE_Time_Value *timeoutp_; - // Timeout pointer. - - PEER_STREAM stream_; - // Stream that we're sending over (should be a template parameter!). -}; - #if defined (__ACE_INLINE__) #include "ace/Task_T.i" #endif /* __ACE_INLINE__ */ |