diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-08-19 16:00:58 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-08-19 16:00:58 +0000 |
commit | 7526281adc5b3b28d7e83f2eac1cc74807ee6e6f (patch) | |
tree | e7afb06c787c77c9ade17f0b2c0822e62fc488f7 | |
parent | dc7a080d2c0959d707004d27e873332240deccd7 (diff) | |
download | ATCD-7526281adc5b3b28d7e83f2eac1cc74807ee6e6f.tar.gz |
ChangeLogTag:Thu Aug 19 10:53:50 1999 David L. Levine <levine@cs.wustl.edu>
-rw-r--r-- | ace/Reactor.h | 10 | ||||
-rw-r--r-- | ace/Reactor.i | 12 | ||||
-rw-r--r-- | ace/Reactor_Impl.h | 6 | ||||
-rw-r--r-- | ace/Select_Reactor_Base.h | 8 | ||||
-rw-r--r-- | ace/Select_Reactor_T.cpp | 16 | ||||
-rw-r--r-- | ace/Select_Reactor_T.h | 6 | ||||
-rw-r--r-- | ace/WFMO_Reactor.h | 10 | ||||
-rw-r--r-- | ace/WFMO_Reactor.i | 12 |
8 files changed, 75 insertions, 5 deletions
diff --git a/ace/Reactor.h b/ace/Reactor.h index baa00f6b2df..ec9cd0a2bac 100644 --- a/ace/Reactor.h +++ b/ace/Reactor.h @@ -424,6 +424,8 @@ public: // via the notify queue before breaking out of its // <ACE_Message_Queue::dequeue> loop. + // = Assorted helper methods. + virtual int handler (ACE_HANDLE handle, ACE_Reactor_Mask mask, ACE_Event_Handler **event_handler = 0); @@ -464,6 +466,12 @@ public: virtual int requeue_position (void); // Get position of the owner thread. + virtual int restart (void); + // Get the existing restart value. + + virtual int restart (int r); + // Set a new value for restart and return the original value. + // = Low-level wait_set mask manipulation methods. virtual int mask_ops (ACE_Event_Handler *event_handler, @@ -496,7 +504,7 @@ public: virtual int current_info (ACE_HANDLE handle, size_t &msg_size); // Returns 0, if the size of the current message has been put in - // <size> Returns -1, if not. ACE_HANDLE allows the reactor to + // <size> returns -1, if not. ACE_HANDLE allows the reactor to // check if the caller is valid. Used for CLASSIX Reactor // implementation. diff --git a/ace/Reactor.i b/ace/Reactor.i index 317c09f2d1f..9c3264cc1b4 100644 --- a/ace/Reactor.i +++ b/ace/Reactor.i @@ -514,6 +514,18 @@ ACE_Reactor::owner (ACE_thread_t *owner) return this->implementation ()->owner (owner); } +ACE_INLINE int +ACE_Reactor::restart (void) +{ + return this->implementation ()->restart (); +} + +ACE_INLINE int +ACE_Reactor::restart (int r) +{ + return this->implementation ()->restart (r); +} + ACE_INLINE void ACE_Reactor::requeue_position (int position) { diff --git a/ace/Reactor_Impl.h b/ace/Reactor_Impl.h index 8b2f08f1396..812ad3e67ef 100644 --- a/ace/Reactor_Impl.h +++ b/ace/Reactor_Impl.h @@ -415,6 +415,12 @@ public: virtual int owner (ACE_thread_t *owner) = 0; // Return the ID of the "owner" thread. + virtual int restart (void) = 0; + // Get the existing restart value. + + virtual int restart (int r) = 0; + // Set a new value for restart and return the original value. + virtual void requeue_position (int) = 0; // Set position of the owner thread. diff --git a/ace/Select_Reactor_Base.h b/ace/Select_Reactor_Base.h index 01789b46df7..10e333cb144 100644 --- a/ace/Select_Reactor_Base.h +++ b/ace/Select_Reactor_Base.h @@ -65,7 +65,8 @@ class ACE_Export ACE_Event_Tuple // to do so. public: ACE_Event_Tuple (void); - ACE_Event_Tuple (ACE_Event_Handler* eh, ACE_HANDLE h); + ACE_Event_Tuple (ACE_Event_Handler *eh, + ACE_HANDLE h); ~ACE_Event_Tuple (void); int operator== (const ACE_Event_Tuple &rhs) const; @@ -313,7 +314,7 @@ class ACE_Export ACE_Select_Reactor_Impl : public ACE_Reactor_Impl // = TITLE // This class simply defines how Select_Reactor's basic interface // functions should look like and provides a common base class for - // Select_Reactor using various locking mechanism. + // <Select_Reactor> using various locking mechanism. public: enum { @@ -322,7 +323,8 @@ public: }; ACE_Select_Reactor_Impl (void); - + // Constructor. + friend class ACE_Select_Reactor_Notify; friend class ACE_Select_Reactor_Handler_Repository; diff --git a/ace/Select_Reactor_T.cpp b/ace/Select_Reactor_T.cpp index 1e8e5ea52ec..b295e0def9b 100644 --- a/ace/Select_Reactor_T.cpp +++ b/ace/Select_Reactor_T.cpp @@ -118,6 +118,22 @@ ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::owner (ACE_thread_t *t_id) return 0; } +template <class ACE_SELECT_REACTOR_TOKEN> int +ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::restart (void) +{ + ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1)); + return this->restart_; +} + +template <class ACE_SELECT_REACTOR_TOKEN> int +ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::restart (int r) +{ + ACE_MT (ACE_GUARD_RETURN (ACE_SELECT_REACTOR_TOKEN, ace_mon, this->token_, -1)); + int current_value = this->restart_; + this->restart_ = r; + return current_value; +} + template <class ACE_SELECT_REACTOR_TOKEN> void ACE_Select_Reactor_T<ACE_SELECT_REACTOR_TOKEN>::requeue_position (int rp) { diff --git a/ace/Select_Reactor_T.h b/ace/Select_Reactor_T.h index cce4f1d73f1..b6da9216128 100644 --- a/ace/Select_Reactor_T.h +++ b/ace/Select_Reactor_T.h @@ -425,6 +425,12 @@ public: // dispatch the <ACE_Event_Handlers> that are passed in via the // notify pipe before breaking out of its <recv> loop. + virtual int restart (void); + // Get the existing restart value. + + virtual int restart (int r); + // Set a new value for restart and return the original value. + virtual void requeue_position (int); // Set position that the main ACE_Select_Reactor thread is requeued in the // list of waiters during a <notify> callback. diff --git a/ace/WFMO_Reactor.h b/ace/WFMO_Reactor.h index 719e10a4ba8..6104a171d75 100644 --- a/ace/WFMO_Reactor.h +++ b/ace/WFMO_Reactor.h @@ -860,10 +860,12 @@ public: // notify queue before breaking out of its // <ACE_Message_Queue::dequeue> loop. + // = Assorted helper methods. + virtual int handler (ACE_HANDLE handle, ACE_Reactor_Mask mask, ACE_Event_Handler **event_handler = 0); - // Not implemented + // Not implemented. virtual int handler (int signum, ACE_Event_Handler ** = 0); @@ -894,6 +896,12 @@ public: virtual int owner (ACE_thread_t *owner); // Return the ID of the "owner" thread. + virtual int restart (void); + // Get the existing restart value. + + virtual int restart (int r); + // Set a new value for restart and return the original value. + virtual void requeue_position (int); // Not implemented diff --git a/ace/WFMO_Reactor.i b/ace/WFMO_Reactor.i index 5aecde24695..b60d7f48bd4 100644 --- a/ace/WFMO_Reactor.i +++ b/ace/WFMO_Reactor.i @@ -1048,6 +1048,18 @@ ACE_WFMO_Reactor::requeue_position (void) } ACE_INLINE int +ACE_WFMO_Reactor::restart (void) +{ + return 0; +} + +ACE_INLINE int +ACE_WFMO_Reactor::restart (int) +{ + return 0; +} + +ACE_INLINE int ACE_WFMO_Reactor::ready_ops (ACE_Event_Handler *event_handler, ACE_Reactor_Mask mask, int ops) |