]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Avoid compiler warning.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 11 Dec 2009 01:13:00 +0000 (01:13 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 11 Dec 2009 01:13:00 +0000 (01:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@20227 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/contrib/boost/libs/thread/src/pthread/thread.cpp

index 3a5ce7cdfbc87cefe0aa1a86287a154d5316f864..1232707aa61b6493d5f0178e712b6d88fb4a604a 100644 (file)
@@ -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 <boost/thread/detail/config.hpp>
@@ -85,14 +85,14 @@ namespace boost
                     }
                 }
             }
-    
+
 
             void create_current_thread_tls_key()
             {
                 BOOST_VERIFY(!pthread_key_create(&current_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<mutex> 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<mutex> 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<mutex> 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<mutex> l1(thread_info_mutex);
             if(thread_info==local_thread_info)
             {
@@ -306,7 +306,7 @@ namespace boost
             lock_guard<mutex> l1(thread_info_mutex);
             thread_info.swap(local_thread_info);
         }
-        
+
         if(local_thread_info)
         {
             lock_guard<mutex> 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<mutex> 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<tss_cleanup_function> func,
                           void* tss_data,bool cleanup_existing)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.