STXXL  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
exithandler.h
Go to the documentation of this file.
1 /***************************************************************************
2  * include/stxxl/bits/common/exithandler.h
3  *
4  * Part of the STXXL. See http://stxxl.sourceforge.net
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 STXXL_COMMON_EXITHANDLER_HEADER
14 #define STXXL_COMMON_EXITHANDLER_HEADER
15 
16 #include <stxxl/bits/namespace.h>
17 
18 
20 
21 // There are several possibilities for the exit handlers.
22 // To use the default implementation (which uses atexit()), nothing special has to be done.
23 //
24 // To work around problems with atexit() being used in a dll you may #define STXXL_NON_DEFAULT_EXIT_HANDLER at library compilation time.
25 // In this case the library/application should call stxxl::run_exit_handlers() during shutdown.
26 //
27 // To provide your own exit handler implementation, #define STXXL_EXTERNAL_EXIT_HANDLER and implement
28 // stxxl::register_exit_handler(void (*)(void)) and stxxl::run_exit_handlers() in your application.
29 
30 int register_exit_handler(void (* function)(void));
31 void run_exit_handlers();
32 
34 
35 #endif // !STXXL_COMMON_EXITHANDLER_HEADER
36 // vim: et:ts=4:sw=4
#define STXXL_BEGIN_NAMESPACE
Definition: namespace.h:16
void run_exit_handlers()
Definition: exithandler.cpp:35
int register_exit_handler(void(*function)(void))
Definition: exithandler.cpp:29
#define STXXL_END_NAMESPACE
Definition: namespace.h:17