ACE
6.3.3
|
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. More...
#include <OS_Thread_Adapter.h>
Public Member Functions | |
ACE_OS_Thread_Adapter (ACE_THR_FUNC user_func, void *arg, ACE_THR_C_FUNC entry_point=(ACE_THR_C_FUNC) ACE_THREAD_ADAPTER_NAME, long cancel_flags=0) | |
Constructor. More... | |
virtual ACE_THR_FUNC_RETURN | invoke (void) |
Public Member Functions inherited from ACE_Base_Thread_Adapter | |
virtual | ~ACE_Base_Thread_Adapter (void) |
ACE_THR_C_FUNC | entry_point (void) |
Protected Member Functions | |
~ACE_OS_Thread_Adapter (void) | |
Ensure that this object is allocated on the heap. More... | |
Protected Member Functions inherited from ACE_Base_Thread_Adapter | |
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. More... | |
void | inherit_log_msg (void) |
Additional Inherited Members | |
Static Public Member Functions inherited from ACE_Base_Thread_Adapter | |
static void | close_log_msg (void) |
Invoke the close_log_msg_hook, if it is present. More... | |
static void | sync_log_msg (const ACE_TCHAR *prog_name) |
Invoke the sync_log_msg_hook, if it is present. More... | |
static ACE_OS_Thread_Descriptor * | thr_desc_log_msg (void) |
Invoke the thr_desc_log_msg_hook, if it is present. More... | |
Protected Attributes inherited from ACE_Base_Thread_Adapter | |
ACE_THR_FUNC | user_func_ |
Thread startup function passed in by the user (C++ linkage). More... | |
void * | arg_ |
Argument to thread startup function. More... | |
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. More... | |
ACE_Service_Gestalt *const | ctx_ |
That is useful for gprof, define itimerval. More... | |
long | flags_ |
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.
ACE_OS_Thread_Adapter::ACE_OS_Thread_Adapter | ( | ACE_THR_FUNC | user_func, |
void * | arg, | ||
ACE_THR_C_FUNC | entry_point = (ACE_THR_C_FUNC) ACE_THREAD_ADAPTER_NAME , |
||
long | cancel_flags = 0 |
||
) |
Constructor.
|
protected |
Ensure that this object is allocated on the heap.
|
virtual |
Execute the user_func_ with the arg. This function deletes this
, thereby rendering the object useless after the call returns.
Implements ACE_Base_Thread_Adapter.