/usr/include/boost/smart_ptr/detail
NameSizeModeActions
atomic_count.hpp32320644editdlrm
atomic_count_gcc.hpp16230644editdlrm
atomic_count_gcc_atomic.hpp12770644editdlrm
atomic_count_gcc_x86.hpp17390644editdlrm
atomic_count_nt.hpp12000644editdlrm
atomic_count_pt.hpp20600644editdlrm
atomic_count_spin.hpp13060644editdlrm
atomic_count_std_atomic.hpp13490644editdlrm
atomic_count_sync.hpp14350644editdlrm
atomic_count_win32.hpp13540644editdlrm
lightweight_mutex.hpp12570644editdlrm
lightweight_thread.hpp34420644editdlrm
local_counted_base.hpp32170644editdlrm
local_sp_deleter.hpp17310644editdlrm
lwm_pthreads.hpp17530644editdlrm
lwm_std_mutex.hpp10770644editdlrm
lwm_win32_cs.hpp27960644editdlrm
operator_bool.hpp17310644editdlrm
quick_allocator.hpp51370644editdlrm
shared_count.hpp153670644editdlrm
spinlock.hpp18630644editdlrm
spinlock_gcc_arm.hpp27010644editdlrm
spinlock_gcc_atomic.hpp15190644editdlrm
spinlock_nt.hpp16260644editdlrm
spinlock_pool.hpp29540644editdlrm
spinlock_pt.hpp14740644editdlrm
spinlock_std_atomic.hpp17230644editdlrm
spinlock_sync.hpp16440644editdlrm
spinlock_w32.hpp21040644editdlrm
sp_convertible.hpp21570644editdlrm
sp_counted_base.hpp34800644editdlrm
sp_counted_base_acc_ia64.hpp34980644editdlrm
sp_counted_base_aix.hpp32700644editdlrm
sp_counted_base_cw_ppc.hpp34260644editdlrm
sp_counted_base_gcc_atomic.hpp33310644editdlrm
sp_counted_base_gcc_ia64.hpp40100644editdlrm
sp_counted_base_gcc_mips.hpp40970644editdlrm
sp_counted_base_gcc_ppc.hpp38770644editdlrm
sp_counted_base_gcc_sparc.hpp38500644editdlrm
sp_counted_base_gcc_x86.hpp39360644editdlrm
sp_counted_base_nt.hpp27330644editdlrm
sp_counted_base_pt.hpp37260644editdlrm
sp_counted_base_snc_ps3.hpp37760644editdlrm
sp_counted_base_spin.hpp30730644editdlrm
sp_counted_base_std_atomic.hpp35570644editdlrm
sp_counted_base_sync.hpp33260644editdlrm
sp_counted_base_vacpp_ppc.hpp36970644editdlrm
sp_counted_base_w32.hpp32640644editdlrm
sp_counted_impl.hpp68080644editdlrm
sp_disable_deprecated.hpp9830644editdlrm
sp_forward.hpp11800644editdlrm
sp_has_gcc_intrinsics.hpp7860644editdlrm
sp_has_sync_intrinsics.hpp18720644editdlrm
sp_interlocked.hpp65670644editdlrm
sp_noexcept.hpp11850644editdlrm
sp_nullptr_t.hpp9760644editdlrm
sp_obsolete.hpp9140644editdlrm
sp_thread_pause.hpp11010644editdlrm
sp_thread_sleep.hpp20160644editdlrm
sp_thread_yield.hpp18830644editdlrm
sp_typeinfo_.hpp11760644editdlrm
sp_win32_sleep.hpp11680644editdlrm
yield_k.hpp10910644editdlrm
Edit: /usr/include/boost/smart_ptr/detail/lightweight_thread.hpp (3442B)
#ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // boost/detail/lightweight_thread.hpp // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2008, 2018 Peter Dimov // // 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 // // // typedef /*...*/ lw_thread_t; // as pthread_t // template int lw_thread_create( lw_thread_t & th, F f ); // void lw_thread_join( lw_thread_t th ); #include #include #include #if defined( BOOST_HAS_PTHREADS ) #include namespace boost { namespace detail { typedef ::pthread_t lw_thread_t; inline int lw_thread_create_( lw_thread_t* thread, const pthread_attr_t* attr, void* (*start_routine)( void* ), void* arg ) { return ::pthread_create( thread, attr, start_routine, arg ); } inline void lw_thread_join( lw_thread_t th ) { ::pthread_join( th, 0 ); } } // namespace detail } // namespace boost #else // defined( BOOST_HAS_PTHREADS ) #include #include namespace boost { namespace detail { typedef HANDLE lw_thread_t; inline int lw_thread_create_( lw_thread_t * thread, void const *, unsigned (__stdcall * start_routine) (void*), void* arg ) { HANDLE h = (HANDLE)_beginthreadex( 0, 0, start_routine, arg, 0, 0 ); if( h != 0 ) { *thread = h; return 0; } else { return EAGAIN; } } inline void lw_thread_join( lw_thread_t thread ) { ::WaitForSingleObject( thread, INFINITE ); ::CloseHandle( thread ); } } // namespace detail } // namespace boost #endif // defined( BOOST_HAS_PTHREADS ) namespace boost { namespace detail { class lw_abstract_thread { public: virtual ~lw_abstract_thread() {} virtual void run() = 0; }; #if defined( BOOST_HAS_PTHREADS ) extern "C" void * lw_thread_routine( void * pv ) { #if defined(BOOST_NO_CXX11_SMART_PTR) std::auto_ptr pt( static_cast( pv ) ); #else std::unique_ptr pt( static_cast( pv ) ); #endif pt->run(); return 0; } #else unsigned __stdcall lw_thread_routine( void * pv ) { #if defined(BOOST_NO_CXX11_SMART_PTR) std::auto_ptr pt( static_cast( pv ) ); #else std::unique_ptr pt( static_cast( pv ) ); #endif pt->run(); return 0; } #endif template class lw_thread_impl: public lw_abstract_thread { public: explicit lw_thread_impl( F f ): f_( f ) { } void run() { f_(); } private: F f_; }; template int lw_thread_create( lw_thread_t & th, F f ) { #if defined(BOOST_NO_CXX11_SMART_PTR) std::auto_ptr p( new lw_thread_impl( f ) ); #else std::unique_ptr p( new lw_thread_impl( f ) ); #endif int r = lw_thread_create_( &th, 0, lw_thread_routine, p.get() ); if( r == 0 ) { p.release(); } return r; } } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_THREAD_HPP_INCLUDED