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