|
Boost-Commit : |
From: anthony_at_[hidden]
Date: 2008-05-08 08:59:10
Author: anthonyw
Date: 2008-05-08 08:59:10 EDT (Thu, 08 May 2008)
New Revision: 45210
URL: http://svn.boost.org/trac/boost/changeset/45210
Log:
Added native_handle to mutex types where possible
Text files modified:
trunk/boost/thread/pthread/mutex.hpp | 7 +++++++
trunk/boost/thread/pthread/recursive_mutex.hpp | 14 ++++++++++++++
2 files changed, 21 insertions(+), 0 deletions(-)
Modified: trunk/boost/thread/pthread/mutex.hpp
==============================================================================
--- trunk/boost/thread/pthread/mutex.hpp (original)
+++ trunk/boost/thread/pthread/mutex.hpp 2008-05-08 08:59:10 EDT (Thu, 08 May 2008)
@@ -139,6 +139,13 @@
BOOST_ASSERT(!res || res==ETIMEDOUT);
return !res;
}
+
+ typedef pthread_mutex_t* native_handle_type;
+ native_handle_type native_handle()
+ {
+ return &m;
+ }
+
#else
void lock()
{
Modified: trunk/boost/thread/pthread/recursive_mutex.hpp
==============================================================================
--- trunk/boost/thread/pthread/recursive_mutex.hpp (original)
+++ trunk/boost/thread/pthread/recursive_mutex.hpp 2008-05-08 08:59:10 EDT (Thu, 08 May 2008)
@@ -76,6 +76,13 @@
BOOST_ASSERT(!res || res==EBUSY);
return !res;
}
+
+ typedef pthread_mutex_t* native_handle_type;
+ native_handle_type native_handle()
+ {
+ return &m;
+ }
+
typedef unique_lock<recursive_mutex> scoped_lock;
typedef detail::try_lock_wrapper<recursive_mutex> scoped_try_lock;
};
@@ -171,6 +178,13 @@
BOOST_ASSERT(!res || res==EBUSY);
return !res;
}
+
+ typedef pthread_mutex_t* native_handle_type;
+ native_handle_type native_handle()
+ {
+ return &m;
+ }
+
#else
void lock()
{
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