|
Boost-Commit : |
From: anthony_at_[hidden]
Date: 2008-05-29 11:16:55
Author: anthonyw
Date: 2008-05-29 11:16:55 EDT (Thu, 29 May 2008)
New Revision: 45909
URL: http://svn.boost.org/trac/boost/changeset/45909
Log:
Move definition of constructor and destructor of condition_variable into condition_variable_fwd.hpp, so they are always available
Text files modified:
trunk/boost/thread/pthread/condition_variable.hpp | 17 -----------------
trunk/boost/thread/pthread/condition_variable_fwd.hpp | 15 +++++++++++++--
trunk/boost/thread/pthread/timespec.hpp | 4 ++++
3 files changed, 17 insertions(+), 19 deletions(-)
Modified: trunk/boost/thread/pthread/condition_variable.hpp
==============================================================================
--- trunk/boost/thread/pthread/condition_variable.hpp (original)
+++ trunk/boost/thread/pthread/condition_variable.hpp 2008-05-29 11:16:55 EDT (Thu, 29 May 2008)
@@ -5,10 +5,6 @@
// http://www.boost.org/LICENSE_1_0.txt)
// (C) Copyright 2007-8 Anthony Williams
-#include <limits.h>
-#include <boost/assert.hpp>
-#include <algorithm>
-#include <pthread.h>
#include "timespec.hpp"
#include "pthread_mutex_scoped_lock.hpp"
#include "thread_data.hpp"
@@ -18,19 +14,6 @@
namespace boost
{
- inline condition_variable::condition_variable()
- {
- int const res=pthread_cond_init(&cond,NULL);
- if(res)
- {
- throw thread_resource_error();
- }
- }
- inline condition_variable::~condition_variable()
- {
- BOOST_VERIFY(!pthread_cond_destroy(&cond));
- }
-
inline void condition_variable::wait(unique_lock<mutex>& m)
{
detail::interruption_checker check_for_interruption(&cond);
Modified: trunk/boost/thread/pthread/condition_variable_fwd.hpp
==============================================================================
--- trunk/boost/thread/pthread/condition_variable_fwd.hpp (original)
+++ trunk/boost/thread/pthread/condition_variable_fwd.hpp 2008-05-29 11:16:55 EDT (Thu, 29 May 2008)
@@ -5,6 +5,7 @@
// http://www.boost.org/LICENSE_1_0.txt)
// (C) Copyright 2007-8 Anthony Williams
+#include <boost/assert.hpp>
#include <pthread.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/locks.hpp>
@@ -24,8 +25,18 @@
condition_variable& operator=(condition_variable&);
public:
- condition_variable();
- ~condition_variable();
+ condition_variable()
+ {
+ int const res=pthread_cond_init(&cond,NULL);
+ if(res)
+ {
+ throw thread_resource_error();
+ }
+ }
+ ~condition_variable()
+ {
+ BOOST_VERIFY(!pthread_cond_destroy(&cond));
+ }
void wait(unique_lock<mutex>& m);
Modified: trunk/boost/thread/pthread/timespec.hpp
==============================================================================
--- trunk/boost/thread/pthread/timespec.hpp (original)
+++ trunk/boost/thread/pthread/timespec.hpp 2008-05-29 11:16:55 EDT (Thu, 29 May 2008)
@@ -8,6 +8,10 @@
#include <boost/thread/thread_time.hpp>
#include <boost/date_time/posix_time/conversion.hpp>
+#include <pthread.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
#include <boost/config/abi_prefix.hpp>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk