summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-02-11 12:14:00 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-02-11 12:14:00 (GMT)
commit0efa7c32aaf21a29b42b5926cc116007056843be (patch)
tree882f663a5dd0e65694bf6077b71086dd77fd7ff8 /3rdParty/Boost/boost/thread/pthread/thread_data.hpp
parent1d20eabbc32274b491b4c2bedf73d19933d97bfd (diff)
downloadswift-contrib-0efa7c32aaf21a29b42b5926cc116007056843be.zip
swift-contrib-0efa7c32aaf21a29b42b5926cc116007056843be.tar.bz2
Moved some modules into separate git modules.
Diffstat (limited to '3rdParty/Boost/boost/thread/pthread/thread_data.hpp')
m---------3rdParty/Boost0
-rw-r--r--3rdParty/Boost/boost/thread/pthread/thread_data.hpp118
2 files changed, 0 insertions, 118 deletions
diff --git a/3rdParty/Boost b/3rdParty/Boost
new file mode 160000
+Subproject 3bbdbc8cf1996f23d9a366da8bac0f97be6ad79
diff --git a/3rdParty/Boost/boost/thread/pthread/thread_data.hpp b/3rdParty/Boost/boost/thread/pthread/thread_data.hpp
deleted file mode 100644
index 244035b..0000000
--- a/3rdParty/Boost/boost/thread/pthread/thread_data.hpp
+++ /dev/null
@@ -1,118 +0,0 @@
-#ifndef BOOST_THREAD_PTHREAD_THREAD_DATA_HPP
-#define BOOST_THREAD_PTHREAD_THREAD_DATA_HPP
-// 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)
-// (C) Copyright 2007 Anthony Williams
-
-#include <boost/thread/detail/config.hpp>
-#include <boost/thread/exceptions.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/thread/mutex.hpp>
-#include <boost/optional.hpp>
-#include <pthread.h>
-#include "condition_variable_fwd.hpp"
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost
-{
- class thread;
-
- namespace detail
- {
- struct thread_exit_callback_node;
- struct tss_data_node;
-
- struct thread_data_base;
- typedef boost::shared_ptr<thread_data_base> thread_data_ptr;
-
- struct BOOST_THREAD_DECL thread_data_base:
- enable_shared_from_this<thread_data_base>
- {
- thread_data_ptr self;
- pthread_t thread_handle;
- boost::mutex data_mutex;
- boost::condition_variable done_condition;
- boost::mutex sleep_mutex;
- boost::condition_variable sleep_condition;
- bool done;
- bool join_started;
- bool joined;
- boost::detail::thread_exit_callback_node* thread_exit_callbacks;
- boost::detail::tss_data_node* tss_data;
- bool interrupt_enabled;
- bool interrupt_requested;
- pthread_cond_t* current_cond;
-
- thread_data_base():
- done(false),join_started(false),joined(false),
- thread_exit_callbacks(0),tss_data(0),
- interrupt_enabled(true),
- interrupt_requested(false),
- current_cond(0)
- {}
- virtual ~thread_data_base();
-
- typedef pthread_t native_handle_type;
-
- virtual void run()=0;
- };
-
- BOOST_THREAD_DECL thread_data_base* get_current_thread_data();
-
- class interruption_checker
- {
- thread_data_base* const thread_info;
-
- void check_for_interruption()
- {
- if(thread_info->interrupt_requested)
- {
- thread_info->interrupt_requested=false;
- throw thread_interrupted();
- }
- }
-
- void operator=(interruption_checker&);
- public:
- explicit interruption_checker(pthread_cond_t* cond):
- thread_info(detail::get_current_thread_data())
- {
- if(thread_info && thread_info->interrupt_enabled)
- {
- lock_guard<mutex> guard(thread_info->data_mutex);
- check_for_interruption();
- thread_info->current_cond=cond;
- }
- }
- ~interruption_checker()
- {
- if(thread_info && thread_info->interrupt_enabled)
- {
- lock_guard<mutex> guard(thread_info->data_mutex);
- thread_info->current_cond=NULL;
- check_for_interruption();
- }
- }
- };
- }
-
- namespace this_thread
- {
- void BOOST_THREAD_DECL yield();
-
- void BOOST_THREAD_DECL sleep(system_time const& abs_time);
-
- template<typename TimeDuration>
- inline void sleep(TimeDuration const& rel_time)
- {
- this_thread::sleep(get_system_time()+rel_time);
- }
- }
-}
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif