NAME
ACE_Thread_Control -
Used to keep track of a thread's activities within its entry
point function.
SYNOPSIS
#include <ace/Thread_Manager.h >
class ACE_Thread_Control
{
public:
inline ACE_Thread_Control (ACE_Thread_Manager * = 0, int = 0);
inline ~ACE_Thread_Control (void);
inline ACE_Thread_Manager *thr_mgr (void);
inline ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *);
inline void *exit (void *);
inline int insert (ACE_Thread_Manager *);
inline void *status (void *);
inline void *status (void);
inline void dump (void) const;
ACE_Thread_Control (ACE_Thread_Manager *tm = 0, int insert = 0);
~ACE_Thread_Control (void);
void *exit (void *status);
int insert (ACE_Thread_Manager *tm);
ACE_Thread_Manager *thr_mgr (void);
ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *);
void *status (void *status);
void *status (void);
void dump (void) const;
ACE_ALLOC_HOOK_DECLARE;
private:
ACE_Thread_Manager *tm_;
void *status_;
};
PUBLIC MEMBERS
inline ACE_Thread_Control (ACE_Thread_Manager * = 0, int = 0);
inline ~ACE_Thread_Control (void);
inline ACE_Thread_Manager *thr_mgr (void);
inline ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *);
inline void *exit (void *);
inline int insert (ACE_Thread_Manager *);
inline void *status (void *);
inline void *status (void);
inline void dump (void) const;
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.
~ACE_Thread_Control (void);
Implicitly kill the thread on exit and remove it from its
associated ThreadManager.
void *exit (void *status);
Explicitly kill the thread on exit and remove it from its
associated Thread_Manager.
int insert (ACE_Thread_Manager *tm);
Store the Thread_Manager and use it to register ourselves for
correct shutdown.
ACE_Thread_Manager *thr_mgr (void);
Returns the current Thread_Manager.
ACE_Thread_Manager *thr_mgr (ACE_Thread_Manager *);
Atomically set a new Thread_Manager and return the old
Thread_Manager.
void *status (void *status);
Set the exit status (and return existing status).
void *status (void);
Get the current exit status.
void dump (void) const;
Dump the state of an object.
ACE_ALLOC_HOOK_DECLARE;
Declare the dynamic allocation hooks.
PRIVATE MEMBERS
ACE_Thread_Manager *tm_;
Pointer to the thread manager for this block of code.
void *status_;
Keeps track of the exit status for the thread.
AUTHOR
Doug Schmidt
LIBRARY
ace