Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
exithandler.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * foxxll/common/exithandler.hpp
3  *
4  * Part of FOXXLL. See http://foxxll.org
5  *
6  * Copyright (C) 2009 Andreas Beckmann <[email protected]>
7  *
8  * Distributed under the Boost Software License, Version 1.0.
9  * (See accompanying file LICENSE_1_0.txt or copy at
10  * http://www.boost.org/LICENSE_1_0.txt)
11  **************************************************************************/
12 
13 #ifndef FOXXLL_COMMON_EXITHANDLER_HEADER
14 #define FOXXLL_COMMON_EXITHANDLER_HEADER
15 
16 namespace foxxll {
17 
18 // There are several possibilities for the exit handlers. To use the default
19 // implementation (which uses atexit()), nothing special has to be done.
20 //
21 // To work around problems with atexit() being used in a dll you may #define
22 // FOXXLL_NON_DEFAULT_EXIT_HANDLER at library compilation time. In this case
23 // the library/application should call foxxll::run_exit_handlers() during
24 // shutdown.
25 //
26 // To provide your own exit handler implementation, #define
27 // FOXXLL_EXTERNAL_EXIT_HANDLER and implement foxxll::register_exit_handler(void
28 // (*)(void)) and foxxll::run_exit_handlers() in your application.
29 
30 int register_exit_handler(void (* function)(void));
31 void run_exit_handlers();
32 
33 } // namespace foxxll
34 
35 #endif // !FOXXLL_COMMON_EXITHANDLER_HEADER
36 
37 /**************************************************************************/
void run_exit_handlers()
Definition: exithandler.cpp:41
int register_exit_handler(void(*function)(void))
Definition: exithandler.cpp:35