Initial Patch of Auction House bot rev. 135
[auctionmangos.git] / dep / ACE_wrappers / ace / Thread_Hook.h
blob7bc3bcce49272d4a52c07262a67a3f0d73f79dd8
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Thread_Hook.h
7 * $Id: Thread_Hook.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Carlos O'Ryan <coryan@uci.edu>
11 //=============================================================================
14 #ifndef ACE_THREAD_HOOK_H
15 #define ACE_THREAD_HOOK_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/config-all.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include /**/ "ace/ACE_export.h"
26 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 /**
29 * @class ACE_Thread_Hook
31 * @brief This class makes it possible to provide user-defined "start"
32 * hooks that are called before the thread entry point function
33 * is invoked.
35 class ACE_Export ACE_Thread_Hook
38 public:
40 /// Destructor.
41 virtual ~ACE_Thread_Hook (void);
43 /**
44 * This method can be overridden in a subclass to customize this
45 * pre-function call "hook" invocation that can perform
46 * initialization processing before the thread entry point @a func
47 * method is called back. The @a func and @a arg passed into the
48 * start hook are the same as those passed by the application that
49 * spawned the thread.
51 virtual ACE_THR_FUNC_RETURN start (ACE_THR_FUNC func,
52 void *arg);
54 /// sets the system wide thread hook, returns the previous thread
55 /// hook or 0 if none is set.
56 static ACE_Thread_Hook *thread_hook (ACE_Thread_Hook *hook);
58 /// Returns the current system thread hook.
59 static ACE_Thread_Hook *thread_hook (void);
62 ACE_END_VERSIONED_NAMESPACE_DECL
64 #include /**/ "ace/post.h"
65 #endif /* ACE_THREAD_HOOK_H */