#include <Thread_Manager.h>
Inheritance diagram for ACE_Thread_Descriptor:
Public Methods | |
ACE_Thread_Descriptor (void) | |
ACE_thread_t | self (void) const |
Unique thread id. | |
void | self (ACE_hthread_t &) |
Unique handle to thread (used by Win32 and AIX). | |
void | dump (void) const |
Dump the state of an object. | |
void | log_msg_cleanup (ACE_Log_Msg *log_msg) |
int | at_exit (ACE_At_Thread_Exit *cleanup) |
int | at_exit (ACE_At_Thread_Exit &cleanup) |
int | at_exit (void *object, ACE_CLEANUP_FUNC cleanup_hook, void *param) |
~ACE_Thread_Descriptor (void) | |
Do nothing destructor to keep some compilers happy. | |
void | acquire_release (void) |
void | acquire (void) |
void | release (void) |
ACE_INLINE_FOR_GNUC void | set_next (ACE_Thread_Descriptor *td) |
ACE_INLINE_FOR_GNUC ACE_Thread_Descriptor * | get_next (void) const |
Private Methods | |
void | reset (ACE_Thread_Manager *tm) |
Reset this thread descriptor. | |
void | at_pop (int apply=1) |
void | at_push (ACE_At_Thread_Exit *cleanup, int is_owner=0) |
void | do_at_exit (void) |
Run the AT_Thread_Exit hooks. | |
void | terminate (void) |
terminate realize the cleanup process to thread termination | |
Private Attributes | |
ACE_Log_Msg * | log_msg_ |
ACE_At_Thread_Exit * | at_exit_list_ |
The AT_Thread_Exit list. | |
ACE_Cleanup_Info | cleanup_info_ |
ACE_Thread_Manager * | tm_ |
ACE_DEFAULT_THREAD_MANAGER_LOCK * | sync_ |
Registration lock to prevent premature removal of thread descriptor. | |
int | terminated_ |
Keep track of termination status. | |
Friends | |
class | ACE_At_Thread_Exit |
class | ACE_Thread_Manager |
class | ACE_Double_Linked_List< ACE_Thread_Descriptor > |
class | ACE_Double_Linked_List_Iterator< ACE_Thread_Descriptor > |
|
|
|
Do nothing destructor to keep some compilers happy.
|
|
|
|
Do nothing but to acquire the thread descriptor's lock and release. This will first check if the thread is registered or not. If it is already registered, there's no need to reacquire the lock again. This is used mainly to get newly spawned thread in synch with thread manager and prevent it from accessing its thread descriptor before it gets fully built. This function is only called from ACE_Log_Msg::thr_desc. |
|
Register an object (or array) for cleanup at thread termination. "cleanup_hook" points to a (global, or static member) function that is called for the object or array when it to be destroyed. It may perform any necessary cleanup specific for that object or its class. "param" is passed as the second parameter to the "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. |
|
Register an At_Thread_Exit hook and the ownership is retained for the caller. Normally used when the at_exit hook is created in stack. |
|
Register an At_Thread_Exit hook and the ownership is acquire by Thread_Descriptor, this is the usual case when the AT is dynamically allocated. |
|
Pop an At_Thread_Exit from at thread termination list, apply the at if apply is true. |
|
Push an At_Thread_Exit to at thread termination list and set the ownership of at. |
|
Run the AT_Thread_Exit hooks.
|
|
Dump the state of an object.
|
|
|
|
This cleanup function must be called only for ACE_TSS_cleanup. The ACE_TSS_cleanup delegate Log_Msg instance destruction when Log_Msg cleanup is called before terminate. |
|
|
|
Reset this thread descriptor.
|
|
Unique handle to thread (used by Win32 and AIX).
|
|
Unique thread id.
|
|
Set/get the <next_> pointer. These are required by the ACE_Free_List. ACE_INLINE is specified here because one version of g++ couldn't grok this code without it. |
|
terminate realize the cleanup process to thread termination
|
|
|
|
Reimplemented from ACE_Thread_Descriptor_Base. |
|
Reimplemented from ACE_Thread_Descriptor_Base. |
|
Reimplemented from ACE_Thread_Descriptor_Base. |
|
The AT_Thread_Exit list.
|
|
Stores the cleanup info for a thread. @ Note, this should be generalized to be a stack of <ACE_Cleanup_Info>s. |
|
Thread_Descriptor is the ownership of ACE_Log_Msg if log_msg_!=0 This can occur because ACE_TSS_cleanup was executed before terminate. |
|
Registration lock to prevent premature removal of thread descriptor.
|
|
Keep track of termination status.
|
|
Pointer to an <ACE_Thread_Manager> or NULL if there's no <ACE_Thread_Manager>. |