Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Thread_Hook.h

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

Generated on Mon Jun 16 11:21:45 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002