diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-02-03 12:19:16 +0100 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2017-02-03 12:19:16 +0100 |
commit | c29aa9215a2375cb949040d8606806bc2b799fd7 (patch) | |
tree | b1a5f523683cb5770f227c67907621569315e7d2 /ACE/ace/Thread_Manager.h | |
parent | 4f2dd7c0edde6a9793a6b4ef11519be44e4adb14 (diff) | |
download | ATCD-c29aa9215a2375cb949040d8606806bc2b799fd7.tar.gz |
Make the ACE_Thread_Descriptor do_at_exit and terminate protected instead of private
* ACE/ace/Thread_Manager.h:
Diffstat (limited to 'ACE/ace/Thread_Manager.h')
-rw-r--r-- | ACE/ace/Thread_Manager.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/ACE/ace/Thread_Manager.h b/ACE/ace/Thread_Manager.h index ab318f04fdb..b0f68ceaaa2 100644 --- a/ACE/ace/Thread_Manager.h +++ b/ACE/ace/Thread_Manager.h @@ -226,7 +226,7 @@ protected: * @class ACE_Thread_Descriptor * * @brief Information for controlling threads that run under the control - * of the <Thread_Manager>. + * of the Thread_Manager. */ class ACE_Export ACE_Thread_Descriptor : public ACE_Thread_Descriptor_Base { @@ -275,7 +275,7 @@ public: * "cleanup_hook" function; the first parameter is the object (or * array) to be destroyed. Returns 0 on success, non-zero on * failure: -1 if virtual memory is exhausted or 1 if the object (or - * arrayt) had already been registered. + * array) had already been registered. */ int at_exit (void *object, ACE_CLEANUP_FUNC cleanup_hook, @@ -304,6 +304,13 @@ public: void set_next (ACE_Thread_Descriptor *td); ACE_Thread_Descriptor *get_next (void) const; +protected: + /// Run the AT_Thread_Exit hooks. + void do_at_exit (void); + + /// Terminate realize the cleanup process to thread termination + void terminate (void); + private: /// Reset this thread descriptor. void reset (ACE_Thread_Manager *tm); @@ -317,12 +324,7 @@ private: void at_push (ACE_At_Thread_Exit* cleanup, bool is_owner = false); - /// Run the AT_Thread_Exit hooks. - void do_at_exit (void); - - /// Terminate realize the cleanup process to thread termination - void terminate (void); - +private: /// Thread_Descriptor is the ownership of ACE_Log_Msg if log_msg_!=0 /// This can occur because ACE_TSS_cleanup was executed before terminate. ACE_Log_Msg *log_msg_; @@ -340,7 +342,7 @@ private: #endif /// Pointer to an ACE_Thread_Manager or NULL if there's no - /// ACE_Thread_Manager> + /// ACE_Thread_Manager ACE_Thread_Manager* tm_; /// Registration lock to prevent premature removal of thread descriptor. @@ -387,7 +389,7 @@ class ACE_Export ACE_Thread_Manager public: friend class ACE_Thread_Control; - // Allow ACE_THread_Exit to register the global TSS instance object. + // Allow ACE_Thread_Exit to register the global TSS instance object. friend class ACE_Thread_Exit; friend class ACE_Thread_Descriptor; @@ -903,7 +905,7 @@ public: int kill_task (ACE_Task_Base *task, int signum); /** - * Cancel all threads in an ACE_Task. If <async_cancel> is non-0, + * Cancel all threads in an ACE_Task. If @a async_cancel is non-0, * then asynchronously cancel these threads if the OS platform * supports cancellation. Otherwise, perform a "cooperative" * cancellation. @@ -1035,7 +1037,7 @@ public: int get_grp (ACE_Task_Base *task, int &grp_id); /// Return a count of the current number of threads active in the - /// <Thread_Manager>. + /// Thread_Manager. size_t count_threads (void) const; /// Get the state of the thread. Returns false if the thread is not @@ -1069,7 +1071,7 @@ public: * second parameter to the "cleanup_hook" function; the first * parameter is the object (or array) to be destroyed. * "cleanup_hook", for example, may delete the object (or array). - * If <cleanup_hook> == 0, the <object> will _NOT_ get cleanup at + * If @a cleanup_hook == 0, the @a object will _NOT_ get cleanup at * thread exit. You can use this to cancel the previously added * at_exit. */ @@ -1121,12 +1123,12 @@ protected: /// Run the registered hooks when the thread exits. void run_thread_exit_hooks (int i); - /// Locate the index of the table slot occupied by <t_id>. Returns - /// -1 if <t_id> is not in the table doesn't contain <t_id>. + /// Locate the index of the table slot occupied by @a t_id. Returns + /// -1 if @a t_id is not in the table doesn't contain @a t_id. ACE_Thread_Descriptor *find_thread (ACE_thread_t t_id); - /// Locate the index of the table slot occupied by <h_id>. Returns - /// -1 if <h_id> is not in the table doesn't contain <h_id>. + /// Locate the index of the table slot occupied by @a h_id. Returns + /// -1 if @a h_id is not in the table doesn't contain @a h_id. ACE_Thread_Descriptor *find_hthread (ACE_hthread_t h_id); /** @@ -1205,7 +1207,7 @@ protected: int cancel_thr (ACE_Thread_Descriptor *td, int async_cancel = 0); - /// Register a thread as terminated and put it into the <terminated_thr_list_>. + /// Register a thread as terminated and put it into the terminated_thr_list_. int register_as_terminated (ACE_Thread_Descriptor *td); /// Setting the static ACE_TSS_TYPE (ACE_Thread_Exit) *thr_exit_ pointer. @@ -1236,7 +1238,7 @@ protected: // = ACE_Thread_Mutex and condition variable for synchronizing termination. #if defined (ACE_HAS_THREADS) - /// Serialize access to the <zero_cond_>. + /// Serialize access to the zero_cond_. ACE_Thread_Mutex lock_; /// Keep track of when there are no more threads. |