From: bangerth Date: Fri, 11 Dec 2009 01:13:00 +0000 (+0000) Subject: Avoid compiler warning. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edb3b8fd0f07decf265b8e0f132bef900f66db12;p=dealii-svn.git Avoid compiler warning. git-svn-id: https://svn.dealii.org/trunk@20227 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/contrib/boost/libs/thread/src/pthread/thread.cpp b/deal.II/contrib/boost/libs/thread/src/pthread/thread.cpp index 3a5ce7cdfb..1232707aa6 100644 --- a/deal.II/contrib/boost/libs/thread/src/pthread/thread.cpp +++ b/deal.II/contrib/boost/libs/thread/src/pthread/thread.cpp @@ -2,7 +2,7 @@ // William E. Kempf // Copyright (C) 2007-8 Anthony Williams // -// Distributed under the Boost Software License, Version 1.0. (See accompanying +// 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) #include @@ -85,14 +85,14 @@ namespace boost } } } - + void create_current_thread_tls_key() { BOOST_VERIFY(!pthread_key_create(¤t_thread_tls_key,&tls_destructor)); } } - + boost::detail::thread_data_base* get_current_thread_data() { boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key); @@ -105,7 +105,7 @@ namespace boost BOOST_VERIFY(!pthread_setspecific(current_thread_tls_key,new_data)); } } - + namespace { extern "C" @@ -145,7 +145,7 @@ namespace boost { interrupt_enabled=false; } - + void run() {} @@ -207,7 +207,7 @@ namespace boost if(local_thread_info) { bool do_join=false; - + { unique_lock lock(local_thread_info->data_mutex); while(!local_thread_info->done) @@ -215,7 +215,7 @@ namespace boost local_thread_info->done_condition.wait(lock); } do_join=!local_thread_info->join_started; - + if(do_join) { local_thread_info->join_started=true; @@ -236,7 +236,7 @@ namespace boost local_thread_info->joined=true; local_thread_info->done_condition.notify_all(); } - + lock_guard l1(thread_info_mutex); if(thread_info==local_thread_info) { @@ -251,7 +251,7 @@ namespace boost if(local_thread_info) { bool do_join=false; - + { unique_lock lock(local_thread_info->data_mutex); while(!local_thread_info->done) @@ -262,7 +262,7 @@ namespace boost } } do_join=!local_thread_info->join_started; - + if(do_join) { local_thread_info->join_started=true; @@ -283,7 +283,7 @@ namespace boost local_thread_info->joined=true; local_thread_info->done_condition.notify_all(); } - + lock_guard l1(thread_info_mutex); if(thread_info==local_thread_info) { @@ -306,7 +306,7 @@ namespace boost lock_guard l1(thread_info_mutex); thread_info.swap(local_thread_info); } - + if(local_thread_info) { lock_guard lock(local_thread_info->data_mutex); @@ -321,20 +321,20 @@ namespace boost namespace this_thread { - + void sleep(const system_time& st) { detail::thread_data_base* const thread_info=detail::get_current_thread_data(); - + if(thread_info) { unique_lock lk(thread_info->sleep_mutex); - while(thread_info->sleep_condition.timed_wait(lk,st)); + while(thread_info->sleep_condition.timed_wait(lk,st)) {} } else { xtime const xt=get_xtime(st); - + for (int foo=0; foo < 5; ++foo) { # if defined(BOOST_HAS_PTHREAD_DELAY_NP) @@ -344,7 +344,7 @@ namespace boost # elif defined(BOOST_HAS_NANOSLEEP) timespec ts; to_timespec_duration(xt, ts); - + // nanosleep takes a timespec that is an offset, not // an absolute time. nanosleep(&ts, 0); @@ -448,8 +448,8 @@ namespace boost return pthread_t(); } } - - + + namespace this_thread { @@ -472,13 +472,13 @@ namespace boost } } } - + bool interruption_enabled() { boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data(); return thread_info && thread_info->interrupt_enabled; } - + bool interruption_requested() { boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data(); @@ -501,7 +501,7 @@ namespace boost detail::get_current_thread_data()->interrupt_enabled=false; } } - + disable_interruption::~disable_interruption() { if(detail::get_current_thread_data()) @@ -517,7 +517,7 @@ namespace boost detail::get_current_thread_data()->interrupt_enabled=true; } } - + restore_interruption::~restore_interruption() { if(detail::get_current_thread_data()) @@ -574,7 +574,7 @@ namespace boost detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data()); current_thread_data->tss_data.erase(key); } - + void set_tss_data(void const* key, boost::shared_ptr func, void* tss_data,bool cleanup_existing)