Stxxl  1.4.0
include/stxxl/bits/common/exithandler.h
Go to the documentation of this file.
00001 /***************************************************************************
00002  *  include/stxxl/bits/common/exithandler.h
00003  *
00004  *  Part of the STXXL. See http://stxxl.sourceforge.net
00005  *
00006  *  Copyright (C) 2009 Andreas Beckmann <beckmann@cs.uni-frankfurt.de>
00007  *
00008  *  Distributed under the Boost Software License, Version 1.0.
00009  *  (See accompanying file LICENSE_1_0.txt or copy at
00010  *  http://www.boost.org/LICENSE_1_0.txt)
00011  **************************************************************************/
00012 
00013 #ifndef STXXL_EXITHANDLER_HEADER
00014 #define STXXL_EXITHANDLER_HEADER
00015 
00016 #include <stxxl/bits/namespace.h>
00017 
00018 
00019 __STXXL_BEGIN_NAMESPACE
00020 
00021 // There are several possibilities for the exit handlers.
00022 // To use the default implementation (which uses atexit()), nothing special has to be done.
00023 //
00024 // To work around problems with atexit() being used in a dll you may #define STXXL_NON_DEFAULT_EXIT_HANDLER at library compilation time.
00025 // In this case the library/application should call stxxl::run_exit_handlers() during shutdown.
00026 //
00027 // To provide your own exit handler implementation, #define STXXL_EXTERNAL_EXIT_HANDLER and implement
00028 // stxxl::register_exit_handler(void (*)(void)) and stxxl::run_exit_handlers() in your application.
00029 
00030 int register_exit_handler(void (* function)(void));
00031 void run_exit_handlers();
00032 
00033 __STXXL_END_NAMESPACE
00034 
00035 #endif // !STXXL_EXITHANDLER_HEADER
00036 // vim: et:ts=4:sw=4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines