diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-01 22:17:39 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-11-01 22:17:39 +0000 |
commit | 53284e215e3d3351a7d7e9c4b68f14b427fb4377 (patch) | |
tree | 97236ece363cff48fd287c780db4290da39b02cb /ace/Thread_Control.h | |
parent | 7b7c52ad2abd228138ba1a948d5e28bf6dc3b880 (diff) | |
download | ATCD-53284e215e3d3351a7d7e9c4b68f14b427fb4377.tar.gz |
ChangeLogTag:Wed Nov 1 14:11:48 2000 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'ace/Thread_Control.h')
-rw-r--r-- | ace/Thread_Control.h | 88 |
1 files changed, 43 insertions, 45 deletions
diff --git a/ace/Thread_Control.h b/ace/Thread_Control.h index 669eeb4d0a5..fbf8f0f213f 100644 --- a/ace/Thread_Control.h +++ b/ace/Thread_Control.h @@ -1,17 +1,14 @@ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// Thread_Control.h -// -// = AUTHOR -// Carlos O'Ryan <coryan@uci.edu> -// -// ============================================================================ + +//============================================================================= +/** + * @file Thread_Control.h + * + * $Id$ + * + * @author Carlos O'Ryan <coryan@uci.edu> + */ +//============================================================================= + #ifndef ACE_THREAD_CONTROL_H #define ACE_THREAD_CONTROL_H @@ -29,66 +26,67 @@ class ACE_Thread_Manager; +/** + * @class ACE_Thread_Control + * + * @brief Used to keep track of a thread's activities within its entry + * point function. + * + * A <ACE_Thread_Manager> uses this class to ensure that threads + * it spawns automatically register and unregister themselves + * with it. + * This class can be stored in thread-specific storage using the + * <ACE_TSS> wrapper. When a thread exits the + * <ACE_TSS::cleanup> function deletes this object, thereby + * ensuring that it gets removed from its associated + * <ACE_Thread_Manager>. + */ class ACE_Export ACE_Thread_Control { - // = TITLE - // Used to keep track of a thread's activities within its entry - // point function. - // - // = DESCRIPTION - // A <ACE_Thread_Manager> uses this class to ensure that threads - // it spawns automatically register and unregister themselves - // with it. - // - // This class can be stored in thread-specific storage using the - // <ACE_TSS> wrapper. When a thread exits the - // <ACE_TSS::cleanup> function deletes this object, thereby - // ensuring that it gets removed from its associated - // <ACE_Thread_Manager>. public: + /// Initialize the thread control object. If <insert> != 0, then + /// register the thread with the Thread_Manager. ACE_Thread_Control (ACE_Thread_Manager *tm = 0, int insert = 0); - // Initialize the thread control object. If <insert> != 0, then - // register the thread with the Thread_Manager. + /// Remove the thread from its associated <Thread_Manager> and exit + /// the thread if <do_thr_exit> is enabled. ~ACE_Thread_Control (void); - // Remove the thread from its associated <Thread_Manager> and exit - // the thread if <do_thr_exit> is enabled. + /// Remove this thread from its associated <Thread_Manager> and exit + /// the thread if <do_thr_exit> is enabled. void *exit (void *status, int do_thr_exit); - // Remove this thread from its associated <Thread_Manager> and exit - // the thread if <do_thr_exit> is enabled. + /// Store the <Thread_Manager> and use it to register ourselves for + /// correct shutdown. int insert (ACE_Thread_Manager *tm, int insert = 0); - // Store the <Thread_Manager> and use it to register ourselves for - // correct shutdown. + /// Returns the current <Thread_Manager>. ACE_Thread_Manager *thr_mgr (void); - // Returns the current <Thread_Manager>. + /// Atomically set a new <Thread_Manager> and return the old + /// <Thread_Manager>. ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *); - // Atomically set a new <Thread_Manager> and return the old - // <Thread_Manager>. + /// Set the exit status (and return existing status). void *status (void *status); - // Set the exit status (and return existing status). + /// Get the current exit status. void *status (void); - // Get the current exit status. + /// Dump the state of an object. void dump (void) const; - // Dump the state of an object. + /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; - // Declare the dynamic allocation hooks. private: + /// Pointer to the thread manager for this block of code. ACE_Thread_Manager *tm_; - // Pointer to the thread manager for this block of code. + /// Keeps track of the exit status for the thread. void *status_; - // Keeps track of the exit status for the thread. }; # if defined (ACE_HAS_INLINED_OSCALLS) |