Thread_Hook.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Thread_Hook.h
00006  *
00007  *  $Id: Thread_Hook.h 80826 2008-03-04 14:51:23Z wotte $
00008  *
00009  *  @author Carlos O'Ryan <coryan@uci.edu>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef ACE_THREAD_HOOK_H
00015 #define ACE_THREAD_HOOK_H
00016 #include /**/ "ace/pre.h"
00017 
00018 #include /**/ "ace/config-all.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include /**/ "ace/ACE_export.h"
00025 
00026 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 /**
00029  * @class ACE_Thread_Hook
00030  *
00031  * @brief This class makes it possible to provide user-defined "start"
00032  * hooks that are called before the thread entry point function
00033  * is invoked.
00034  */
00035 class ACE_Export ACE_Thread_Hook
00036 {
00037 
00038 public:
00039 
00040   /// Destructor.
00041   virtual ~ACE_Thread_Hook (void);
00042 
00043   /**
00044    * This method can be overridden in a subclass to customize this
00045    * pre-function call "hook" invocation that can perform
00046    * initialization processing before the thread entry point @a func
00047    * method is called back.  The @a func and @a arg passed into the
00048    * start hook are the same as those passed by the application that
00049    * spawned the thread.
00050    */
00051   virtual ACE_THR_FUNC_RETURN start (ACE_THR_FUNC func,
00052                                      void *arg);
00053 
00054   /// sets the system wide thread hook, returns the previous thread
00055   /// hook or 0 if none is set.
00056   static ACE_Thread_Hook *thread_hook (ACE_Thread_Hook *hook);
00057 
00058   /// Returns the current system thread hook.
00059   static ACE_Thread_Hook *thread_hook (void);
00060 };
00061 
00062 ACE_END_VERSIONED_NAMESPACE_DECL
00063 
00064 #include /**/ "ace/post.h"
00065 #endif /* ACE_THREAD_HOOK_H */

Generated on Tue Feb 2 17:18:43 2010 for ACE by  doxygen 1.4.7