ACE
6.1.6
|
Base class for all the Thread_Adapters. More...
#include <Base_Thread_Adapter.h>
Public Member Functions | |
virtual | ~ACE_Base_Thread_Adapter (void) |
virtual ACE_THR_FUNC_RETURN | invoke (void)=0 |
Virtual method invoked by the thread entry point. | |
ACE_THR_C_FUNC | entry_point (void) |
Static Public Member Functions | |
static void | close_log_msg (void) |
Invoke the close_log_msg_hook, if it is present. | |
static void | sync_log_msg (const ACE_TCHAR *prog_name) |
Invoke the sync_log_msg_hook, if it is present. | |
static ACE_OS_Thread_Descriptor * | thr_desc_log_msg (void) |
Invoke the thr_desc_log_msg_hook, if it is present. |
Protected Member Functions | |
ACE_Base_Thread_Adapter (ACE_THR_FUNC user_func, void *arg, ACE_THR_C_FUNC entry_point=(ACE_THR_C_FUNC) ACE_THREAD_ADAPTER_NAME, ACE_OS_Thread_Descriptor *td=0, long cancel_flags=0) | |
Constructor. | |
void | inherit_log_msg (void) |
Protected Attributes | |
ACE_THR_FUNC | user_func_ |
Thread startup function passed in by the user (C++ linkage). | |
void * | arg_ |
Argument to thread startup function. | |
ACE_THR_C_FUNC | entry_point_ |
ACE_OS_Thread_Descriptor * | thr_desc_ |
ACE_OS_Log_Msg_Attributes | log_msg_attributes_ |
The ACE_Log_Msg attributes. | |
ACE_Service_Gestalt *const | ctx_ |
That is useful for gprof, define itimerval. | |
long | flags_ |
Static Private Member Functions | |
static void | set_log_msg_hooks (ACE_INIT_LOG_MSG_HOOK init_hook, ACE_INHERIT_LOG_MSG_HOOK inherit_hook, ACE_CLOSE_LOG_MSG_HOOK close_hook, ACE_SYNC_LOG_MSG_HOOK sync_hook, ACE_THR_DESC_LOG_MSG_HOOK thr_desc) |
Set the Log_Msg hooks. |
Static Private Attributes | |
static ACE_INIT_LOG_MSG_HOOK | init_log_msg_hook_ = 0 |
The hooks to inherit and cleanup the Log_Msg attributes. | |
static ACE_INHERIT_LOG_MSG_HOOK | inherit_log_msg_hook_ = 0 |
static ACE_CLOSE_LOG_MSG_HOOK | close_log_msg_hook_ = 0 |
static ACE_SYNC_LOG_MSG_HOOK | sync_log_msg_hook_ = 0 |
static ACE_THR_DESC_LOG_MSG_HOOK | thr_desc_log_msg_hook_ = 0 |
Friends | |
class | ACE_Log_Msg |
Allow the ACE_Log_Msg class to set its hooks. |
Base class for all the Thread_Adapters.
Converts a C++ function into a function that can be called from a thread creation routine (e.g., pthread_create() or _beginthreadex()) that expects an extern "C" entry point. This class also makes it possible to transparently provide hooks to register a thread with an ACE_Thread_Manager. This class is used in ACE_OS::thr_create(). In general, the thread that creates an object of this class is different from the thread that calls invoke()
on this object. Therefore, the invoke()
method is responsible for deleting itself.
|
virtual |
|
protected |
Constructor.
|
static |
Invoke the close_log_msg_hook, if it is present.
|
inline |
Accessor for the C entry point function to the OS thread creation routine.
|
protected |
Inherit the logging features if the parent thread has an ACE_Log_Msg.
|
pure virtual |
Virtual method invoked by the thread entry point.
Implemented in ACE_Thread_Adapter, and ACE_OS_Thread_Adapter.
|
inlinestaticprivate |
Set the Log_Msg hooks.
|
static |
Invoke the sync_log_msg_hook, if it is present.
|
static |
Invoke the thr_desc_log_msg_hook, if it is present.
|
friend |
Allow the ACE_Log_Msg class to set its hooks.
|
protected |
Argument to thread startup function.
|
staticprivate |
|
protected |
That is useful for gprof, define itimerval.
Keep a reference to the configuration context that spawns the thread so the child can inherit it.
|
protected |
Entry point to the underlying OS thread creation call (C linkage).
|
protected |
Pass through the thread-creation flags that can only be acted on by the spawned thread. Currently this is only the cancellation-related flags.
|
staticprivate |
|
staticprivate |
The hooks to inherit and cleanup the Log_Msg attributes.
|
protected |
The ACE_Log_Msg attributes.
|
staticprivate |
|
protected |
Optional thread descriptor. Passing this pointer in will force the spawned thread to cache this location in Log_Msg and wait until Thread_Manager fills in all information in thread descriptor.
|
staticprivate |
|
protected |
Thread startup function passed in by the user (C++ linkage).