1 // (C) Copyright Michael Glassford 2004.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #if !defined(BOOST_TLS_HOOKS_HPP)
7 #define BOOST_TLS_HOOKS_HPP
9 #include <boost/thread/detail/config.hpp>
11 #include <boost/config/abi_prefix.hpp>
13 #if defined(BOOST_HAS_WINTHREADS)
17 BOOST_THREAD_DECL void __cdecl on_process_enter(void);
18 //Function to be called when the exe or dll
19 //that uses Boost.Threads first starts
21 //Should be called only before the first call to
23 //Called automatically by Boost.Threads when
24 //a method for doing so has been discovered.
25 //May be omitted; may be called multiple times.
27 BOOST_THREAD_DECL void __cdecl on_process_exit(void);
28 //Function to be called when the exe or dll
29 //that uses Boost.Threads first starts
31 //Should be called only after the last call to
33 //Called automatically by Boost.Threads when
34 //a method for doing so has been discovered.
35 //Must not be omitted; may be called multiple times.
37 BOOST_THREAD_DECL void __cdecl on_thread_enter(void);
38 //Function to be called just after a thread starts
39 //in an exe or dll that uses Boost.Threads.
40 //Must be called in the context of the thread
42 //Called automatically by Boost.Threads when
43 //a method for doing so has been discovered.
44 //May be omitted; may be called multiple times.
46 BOOST_THREAD_DECL void __cdecl on_thread_exit(void);
47 //Function to be called just be fore a thread ends
48 //in an exe or dll that uses Boost.Threads.
49 //Must be called in the context of the thread
51 //Called automatically by Boost.Threads when
52 //a method for doing so has been discovered.
53 //Must not be omitted; may be called multiple times.
55 void tss_cleanup_implemented();
56 //Dummy function used both to detect whether tss cleanup
57 //cleanup has been implemented and to force
58 //it to be linked into the Boost.Threads library.
61 #endif //defined(BOOST_HAS_WINTHREADS)
63 #include <boost/config/abi_suffix.hpp>
65 #endif //!defined(BOOST_TLS_HOOKS_HPP)