////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2008. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Based on the threadalert library of Roland Schwarz // ////////////////////////////////////////////////////////////////////////////// #include namespace boost { thread_preamble* thread_preamble::last_ = 0; void thread_preamble::func() { thread_preamble* p = last_; while (0 != p) { (p->initfunc_)(); p = p->prev_; } } void thread_preamble::proxy::operator()() { thread_preamble::func(); func_(); } }